Dashboard
Total Files
11550Total Lines of Code
737485Number of Clones
4456Duplicated Lines
136569 (18.52%)Formats with Duplications
| Format | Files | Lines | Clones | Duplicated Lines | Duplicated Tokens |
|---|---|---|---|---|---|
| json | 552 | 39757 | 176 | 4471 | 31732 |
| javascript | 8807 | 530026 | 3829 | 111729 | 1043273 |
| typescript | 1113 | 76800 | 231 | 11911 | 89183 |
| url | 167 | 3239 | 2 | 28 | 176 |
| markdown | 633 | 71225 | 164 | 7516 | 88252 |
| yaml | 112 | 1624 | 2 | 28 | 234 |
| powershell | 23 | 621 | 22 | 328 | 2443 |
| tsx | 87 | 8130 | 13 | 215 | 2250 |
| css | 50 | 5667 | 16 | 336 | 2652 |
| python | 1 | 148 | 0 | 0 | 0 |
| php | 1 | 155 | 0 | 0 | 0 |
| markup | 3 | 73 | 1 | 7 | 88 |
| bash | 1 | 20 | 0 | 0 | 0 |
json
node_modules\resolve\test\resolver\multirepo\package.json (Line 1:1 - Line 20:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\multirepo\package.json (Line 1:1 - Line 20:2)
{
"name": "ljharb-monorepo-symlink-test",
"private": true,
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "lerna bootstrap",
"test": "node packages/package-a"
},
"author": "",
"license": "MIT",
"dependencies": {
"jquery": "^3.3.1",
"resolve": "../../../"
},
"devDependencies": {
"lerna": "^3.4.3"
}
}node_modules\tinyglobby\node_modules\picomatch\package.json (Line 1:1 - Line 83:2), node_modules\vite\node_modules\picomatch\package.json (Line 1:1 - Line 83:2)
{
"name": "picomatch",
"description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
"version": "4.0.3",
"homepage": "https://github.com/micromatch/picomatch",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"funding": "https://github.com/sponsors/jonschlinkert",
"repository": "micromatch/picomatch",
"bugs": {
"url": "https://github.com/micromatch/picomatch/issues"
},
"license": "MIT",
"files": [
"index.js",
"posix.js",
"lib"
],
"sideEffects": false,
"main": "index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --reporter dot",
"test": "npm run lint && npm run mocha",
"test:ci": "npm run test:cover",
"test:cover": "nyc npm run mocha"
},
"devDependencies": {
"eslint": "^8.57.0",
"fill-range": "^7.0.1",
"gulp-format-md": "^2.0.0",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
"time-require": "github:jonschlinkert/time-require"
},
"keywords": [
"glob",
"match",
"picomatch"
],
"nyc": {
"reporter": [
"html",
"lcov",
"text-summary"
]
},
"verb": {
"toc": {
"render": true,
"method": "preWrite",
"maxdepth": 3
},
"layout": "empty",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
},
"related": {
"list": [
"braces",
"micromatch"
]
},
"reflinks": [
"braces",
"expand-brackets",
"extglob",
"fill-range",
"micromatch",
"minimatch",
"nanomatch",
"picomatch"
]
}
}node_modules\tinyglobby\node_modules\fdir\package.json (Line 1:1 - Line 103:2), node_modules\vite\node_modules\fdir\package.json (Line 1:1 - Line 103:2)
{
"name": "fdir",
"version": "6.5.0",
"description": "The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"type": "module",
"scripts": {
"prepublishOnly": "npm run test && npm run build",
"build": "tsdown",
"format": "prettier --write src __tests__ benchmarks",
"test": "vitest run __tests__/",
"test:coverage": "vitest run --coverage __tests__/",
"test:watch": "vitest __tests__/",
"bench": "ts-node benchmarks/benchmark.js",
"bench:glob": "ts-node benchmarks/glob-benchmark.ts",
"bench:fdir": "ts-node benchmarks/fdir-benchmark.ts",
"release": "./scripts/release.sh"
},
"engines": {
"node": ">=12.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thecodrr/fdir.git"
},
"keywords": [
"util",
"os",
"sys",
"fs",
"walk",
"crawler",
"directory",
"files",
"io",
"tiny-glob",
"glob",
"fast-glob",
"speed",
"javascript",
"nodejs"
],
"author": "thecodrr <thecodrr@protonmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/thecodrr/fdir/issues"
},
"homepage": "https://github.com/thecodrr/fdir#readme",
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.9.4",
"@types/picomatch": "^4.0.0",
"@types/tap": "^15.0.11",
"@vitest/coverage-v8": "^0.34.6",
"all-files-in-tree": "^1.1.2",
"benny": "^3.7.1",
"csv-to-markdown-table": "^1.3.1",
"expect": "^29.7.0",
"fast-glob": "^3.3.2",
"fdir1": "npm:fdir@1.2.0",
"fdir2": "npm:fdir@2.1.0",
"fdir3": "npm:fdir@3.4.2",
"fdir4": "npm:fdir@4.1.0",
"fdir5": "npm:fdir@5.0.0",
"fs-readdir-recursive": "^1.1.0",
"get-all-files": "^4.1.0",
"glob": "^10.3.10",
"klaw-sync": "^6.0.0",
"mock-fs": "^5.2.0",
"picomatch": "^4.0.2",
"prettier": "^3.5.3",
"recur-readdir": "0.0.1",
"recursive-files": "^1.0.2",
"recursive-fs": "^2.1.0",
"recursive-readdir": "^2.2.3",
"rrdir": "^12.1.0",
"systeminformation": "^5.21.17",
"tiny-glob": "^0.2.9",
"ts-node": "^10.9.1",
"tsdown": "^0.12.5",
"typescript": "^5.3.2",
"vitest": "^0.34.6",
"walk-sync": "^3.0.0"
},
"peerDependencies": {
"picomatch": "^3 || ^4"
},
"peerDependenciesMeta": {
"picomatch": {
"optional": true
}
},
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
}
}node_modules\eslint-plugin-import\node_modules\debug\package.json (Line 1:1 - Line 51:2), node_modules\sockjs-client\node_modules\debug\package.json (Line 1:1 - Line 51:2)
{
"name": "debug",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"unpkg": "./dist/debug.js"
}node_modules\eslint-module-utils\node_modules\debug\package.json (Line 1:1 - Line 51:2), node_modules\sockjs-client\node_modules\debug\package.json (Line 1:1 - Line 51:2)
{
"name": "debug",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"unpkg": "./dist/debug.js"
}node_modules\eslint-import-resolver-node\node_modules\debug\package.json (Line 1:1 - Line 51:2), node_modules\sockjs-client\node_modules\debug\package.json (Line 1:1 - Line 51:2)
{
"name": "debug",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"unpkg": "./dist/debug.js"
}node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 158:2 - Line 166:2), node_modules\ajv\lib\refs\json-schema-secure.json (Line 83:5 - Line 90:2)
},
"if": {"$ref": "#"},
"then": {"$ref": "#"},
"else": {"$ref": "#"},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
}node_modules\ajv\lib\refs\json-schema-draft-06.json (Line 3:42 - Line 53:8), node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 3:42 - Line 53:11)
,
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"allOf": [
{ "$ref": "#/definitions/nonNegativeInteger" },
{ "default": 0 }
]
},
"simpleTypes": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
"default": []
}
},
"type": ["object", "boolean"],
"properties": {
"$id": {
"type": "string",
"format": "uri-reference"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$ref": {
"type": "string",
"format": "uri-reference"
},
"title"node_modules\ajv\lib\refs\json-schema-draft-06.json (Line 63:9 - Line 92:2), node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 70:9 - Line 99:5)
},
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": { "$ref": "#" },
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {node_modules\ajv\lib\refs\json-schema-draft-06.json (Line 93:9 - Line 118:10), node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 100:9 - Line 125:16)
},
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": { "$ref": "#" },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default"node_modules\ajv\lib\refs\json-schema-draft-06.json (Line 132:8 - Line 148:8), node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 141:5 - Line 157:19)
,
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"format": { "type": "string" },
"allOf"node_modules\ajv\lib\refs\json-schema-draft-04.json (Line 97:9 - Line 122:7), node_modules\ajv\lib\refs\json-schema-draft-07.json (Line 111:2 - Line 129:16)
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"enum"node_modules\ajv\lib\refs\json-schema-draft-04.json (Line 121:9 - Line 144:15), node_modules\ajv\lib\refs\json-schema-draft-06.json (Line 130:2 - Line 153:10)
},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"format": { "type": "string" },
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"dependencies"node_modules\@babel\compat-data\data\plugins.json (Line 197:29 - Line 211:41), node_modules\@babel\compat-data\data\plugins.json (Line 183:30 - Line 197:29)
: {
"chrome": "75",
"opera": "62",
"edge": "79",
"firefox": "70",
"safari": "13",
"node": "12.5",
"deno": "1",
"ios": "13",
"samsung": "11",
"rhino": "1.7.14",
"opera_mobile": "54",
"electron": "6.0"
},
"transform-logical-assignment-operators"node_modules\@babel\compat-data\data\plugins.json (Line 251:39 - Line 265:30), node_modules\@babel\compat-data\data\plugins.json (Line 237:40 - Line 251:39)
: {
"chrome": "80",
"opera": "67",
"edge": "80",
"firefox": "72",
"safari": "13.1",
"node": "14",
"deno": "1",
"ios": "13.4",
"samsung": "13",
"rhino": "1.8",
"opera_mobile": "57",
"electron": "8.0"
},
"transform-optional-chaining"node_modules\@babel\compat-data\data\plugins.json (Line 305:24 - Line 319:35), node_modules\@babel\compat-data\data\plugins.json (Line 291:25 - Line 305:24)
: {
"chrome": "66",
"opera": "53",
"edge": "79",
"firefox": "62",
"safari": "12",
"node": "10",
"deno": "1",
"ios": "12",
"samsung": "9",
"rhino": "1.7.14",
"opera_mobile": "47",
"electron": "3.0"
},
"transform-optional-catch-binding"node_modules\@babel\compat-data\data\plugins.json (Line 652:28 - Line 666:26), node_modules\@babel\compat-data\data\plugins.json (Line 503:21 - Line 517:26)
: {
"chrome": "44",
"opera": "31",
"edge": "12",
"firefox": "53",
"safari": "9",
"node": "4",
"deno": "1",
"ios": "9",
"samsung": "4",
"rhino": "1.7.15",
"opera_mobile": "32",
"electron": "0.30"
},
"transform-unicode-regex"node_modules\@babel\compat-data\data\plugins.json (Line 775:30 - Line 792:27), node_modules\@babel\compat-data\data\plugins.json (Line 758:39 - Line 775:30)
: {
"chrome": "7",
"opera": "12",
"edge": "12",
"firefox": "2",
"safari": "5.1",
"node": "0.4",
"deno": "1",
"ie": "9",
"android": "4",
"ios": "6",
"phantom": "1.9",
"samsung": "1",
"rhino": "1.7.13",
"opera_mobile": "12",
"electron": "0.20"
},
"transform-reserved-words"node_modules\@babel\compat-data\data\plugins.json (Line 823:33 - Line 837:2), node_modules\@babel\compat-data\data\plugins.json (Line 809:34 - Line 822:2)
: {
"chrome": "72",
"deno": "1.0",
"edge": "79",
"firefox": "80",
"node": "13.2.0",
"opera": "60",
"opera_mobile": "51",
"safari": "14.1",
"ios": "14.5",
"samsung": "11.0",
"android": "72",
"electron": "5.0"
}
}node_modules\@babel\compat-data\data\plugin-bugfixes.json (Line 124:29 - Line 138:23), node_modules\@babel\compat-data\data\plugin-bugfixes.json (Line 110:30 - Line 124:29)
: {
"chrome": "80",
"opera": "67",
"edge": "80",
"firefox": "74",
"safari": "13.1",
"node": "14",
"deno": "1",
"ios": "13.4",
"samsung": "13",
"rhino": "1.8",
"opera_mobile": "57",
"electron": "8.0"
},
"transform-parameters"node_modules\@babel\compat-data\data\plugin-bugfixes.json (Line 180:5 - Line 195:5), node_modules\@babel\compat-data\data\plugins.json (Line 695:5 - Line 710:5)
,
"firefox": "53",
"safari": "10",
"node": "6.5",
"deno": "1",
"ios": "10",
"samsung": "5",
"opera_mobile": "41",
"electron": "1.2"
},
"transform-block-scoping": {
"chrome": "50",
"opera": "37",
"edge": "14",
"firefox": "53",
"safari": "10"node_modules\axe-core\locales\pt_BR.json (Line 553:26 - Line 572:21), node_modules\axe-core\locales\pt_BR.json (Line 534:17 - Line 553:26)
: {
"pass": "O elemento tem contraste suficiente no valor de ${data.contrastRatio}",
"fail": "O elemento tem contraste insuficiente no valor de ${data.contrastRatio} (cor do primeiro plano: ${data.fgColor}, cor de fundo: ${data.bgColor}, tamanho da fonte: ${data.fontSize}, normal/negrito: ${data.fontWeight}). Contraste esperado no valor de ${data.expectedContrastRatio}",
"incomplete": {
"default": "Impossível determinar o contraste",
"bgImage": "A cor de fundo do elemento não pôde ser determinada devido a uma imagem de fundo",
"bgGradient": "A cor de fundo do elemento não pôde ser determinada devido a um gradiente de fundo",
"imgNode": "A cor de fundo do elemento não pôde ser determinada porque o elemento contém um nó de imagem",
"bgOverlap": "A cor de fundo do elemento não pôde ser determinada porque está sobreposta por outro elemento",
"fgAlpha": "A cor do primeiro plano do elemento não pôde ser determinada devido à transparência alfa",
"elmPartiallyObscured": "A cor de fundo do elemento não pôde ser determinada porque está parcialmente obscurecida por outro elemento",
"elmPartiallyObscuring": "A cor de fundo do elemento não pôde ser determinada porque está parcialmente sobreposta a outros elementos",
"outsideViewport": "A cor de fundo do elemento não pôde ser determinada porque está fora da 'viewport'",
"equalRatio": "O elemento tem um contraste de 1:1 com plano de fundo",
"shortTextContent": "O conteúdo do elemento é muito curto para determinar se é conteúdo de texto real",
"nonBmp": "O conteúdo do elemento contém apenas caracteres não textuais",
"pseudoContent": "A cor de fundo do elemento não pode ser determinada devido a um pseudo-elemento"
}
},
"link-in-text-block"node_modules\axe-core\locales\fr.json (Line 572:26 - Line 595:21), node_modules\axe-core\locales\fr.json (Line 549:17 - Line 572:26)
: {
"pass": "L’élément a un contraste de couleurs suffisant de ${data.contrastRatio}",
"fail": {
"default": "L’élément a un contraste de couleurs insuffisant de ${data.contrastRatio} (couleur d’avant plan : ${data.fgColor}, couleur d’arrière plan : ${data.bgColor}, taille de police : ${data.fontSize}, graisse : ${data.fontWeight}). Contraste de couleur attendu : ${data.expectedContrastRatio}",
"fgOnShadowColor": "L’élément a un contraste de couleurs insuffisant de ${data.contrastRatio} entre l’avant plan et la couleur de l’ombre de texte (couleur d’avant plan : ${data.fgColor}, couleur de l’ombre de texte : ${data.shadowColor}, taille de police : ${data.fontSize}, graisse: ${data.fontWeight}). Contraste de couleurs attendu : ${data.expectedContrastRatio}",
"shadowOnBgColor": "L’élément a un contraste de couleurs insuffisant de ${data.contrastRatio} entre la couleur de l’ombre de texte et l’arrière plan (couleur de l’ombre de texte : ${data.shadowColor}, couleur d’arrière plan : ${data.bgColor}, taille de police : ${data.fontSize}, graisse: ${data.fontWeight}). Contraste de couleurs attendu : ${data.expectedContrastRatio}"
},
"incomplete": {
"default": "Impossible de déterminer le rapport de contraste",
"bgImage": "La couleur d’arrière-plan de l’élément n’a pu être déterminée à cause d’une image d’arrière-plan",
"bgGradient": "La couleur d’arrière-plan de l’élément n’a pu être déterminée à cause d’un dégradé d’arrière-plan",
"imgNode": "La couleur d’arrière-plan de l’élément n’a pu être déterminée, car l’élément contient une balise image",
"bgOverlap": "La couleur d’arrière-plan de l’élément n’a pu être déterminée, car un autre élément le chevauche",
"fgAlpha": "La couleur du texte de l’élément n’a pu être déterminée à cause d’une opacité réduite",
"elmPartiallyObscured": "La couleur d’arrière-plan de l’élément n’a pu être déterminée, car l’élément est partiellement masqué par un autre élément",
"elmPartiallyObscuring": "La couleur d’arrière-plan de l’élément n’a pu être déterminée, car il chevauche partiellement un autre élément",
"outsideViewport": "La couleur d’arrière-plan de l’élément n’a pu être déterminée, car il est à l’extérieur du viewport",
"equalRatio": "L’élément a un rapport de contraste de 1:1 avec son arrière-plan",
"shortTextContent": "Le contenu de l’élément est trop court pour déterminer s’il s’agit réellement d’un contenu textuel",
"nonBmp": "Le contenu de l’élément contient seulement des caractères non textuels",
"pseudoContent": "La couleur d’arrière plan de l’élément n’a pu être déterminée à cause d’un pseudo-élément"
}
},
"link-in-text-block"node_modules\axe-core\locales\eu.json (Line 448:26 - Line 465:21), node_modules\axe-core\locales\eu.json (Line 431:17 - Line 448:26)
: {
"pass": "Elementuak ${data.contrastRatio}-ko kolore-kontraste nahikoa du",
"fail": "Elementuaren ${data.contrastRatio}-ko kolore-kontrastea ez da nahikoa (ehen planoaren kolorea: ${data.fgColor}, hondoaren kolorea: ${data.bgColor}, letra-iturriaren tamaina: ${data.fontSize}, letra-iturriaren lodiera: ${data.fontWeight}). Espero den kontraste-ratioa: ${data.expectedContrastRatio}",
"incomplete": {
"bgImage": "Elementuaren hondoko kolorea ezin izan da zehaztu, hondoko irudi batengatik",
"bgGradient": "Elementuaren hondoko kolorea ezin izan da zehaztu hondoko degradatu baten ondorioz",
"imgNode": "Elementuaren hondoaren kolorea ezin izan da zehaztu, elementuak irudi-nodo bat duelako.",
"bgOverlap": "Hondoko kolorea ezin izan da zehaztu, gainjarritako beste elementu bat duelako",
"fgAlpha": "Hondoko kolorea ezin izan da zehaztu alfa gardentasun baten ondorioz",
"elmPartiallyObscured": "Hondoaren kolorea ezin izan da zehaztu, beste elementu batek partzialki ezkutatzen duelako",
"elmPartiallyObscuring": "Elementuaren hondoaren kolorea ezin izan da zehaztu, beste elementu batzuei partzialki gainjartzen baitzaie.",
"outsideViewport": "Elementuaren hondoko kolorea ezin izan da zehaztu, leiho grafikotik kanpo dagoelako ('viewport')",
"equalRatio": "Elementuak 1:1 kontraste-ratioa du hondoarekin",
"shortTextContent": "Elementuaren edukia laburregia da testu-edukia bera den zehazteko",
"default": "Ezinezkoa da kontraste-ratioa zehaztea"
}
},
"link-in-text-block"node_modules\axe-core\locales\es.json (Line 448:26 - Line 465:21), node_modules\axe-core\locales\es.json (Line 431:17 - Line 448:26)
: {
"pass": "El elemento tiene un contraste de color suficiente de ${data.contrastRatio}",
"fail": "El elemento tiene un contraste de color insuficiente de ${data.contrastRatio} (color de primer plano: ${data.fgColor}, color de fondo: ${data.bgColor}, tamaño de fuente: ${data.fontSize}, grosor de fuente: ${data.fontWeight}). Ratio de contraste esperado: ${data.expectedContrastRatio}",
"incomplete": {
"bgImage": "El color de fondo del elemento no se pudo determinar debido a una imagen de fondo",
"bgGradient": "El color de fondo del elemento no se pudo determinar debido a un degradado de fondo",
"imgNode": "El color de fondo del elemento no se pudo determinar porque el elemento contiene un nodo de imagen",
"bgOverlap": "El color de fondo no se pudo determinar porque tiene otro elemento superpuesto",
"fgAlpha": "El color de fondo no se pudo determinar debido a una transparencia alfa",
"elmPartiallyObscured": "El color de fondo no se pudo determinar porque está parcialmente oculto por otro elemento",
"elmPartiallyObscuring": "El color de fondo del elemento no se pudo determinar porque se superpone parcialmente a otros elementos",
"outsideViewport": "El color de fondo del elemento no se pudo determinar porque está fuera de la ventana gráfica ('viewport')",
"equalRatio": "El elemento tiene una ratio de contraste 1:1 con el fondo",
"shortTextContent": "El contenido del elemento es demasiado corto para determinar si es contenido de texto propiamente dicho",
"default": "Imposible determinar la ratio de contraste"
}
},
"link-in-text-block"node_modules\axe-core\locales\da.json (Line 457:26 - Line 474:21), node_modules\axe-core\locales\da.json (Line 440:17 - Line 457:26)
: {
"pass": "Elementet har stor farvekontrast, den er ${data.contrastRatio}",
"fail": "Elementet har ikke nok farvekontrast, den er ${data.contrastRatio} (forgrundsfarve: ${data.fgColor}, baggrundsfarve: ${data.bgColor}, tekststørrelse: ${data.fontSize}, teksttykkelse: ${data.fontWeight}). Forventet kontrastforhold er ${data.expectedContrastRatio}",
"incomplete": {
"bgImage": "Elementets baggrundsfarve kunne ikke detekteres på grund af et baggrundsbillede",
"bgGradient": "Elementets baggrundsfarve kunne ikke detekteres på grund af en baggrundsgradient",
"imgNode": "Elementets baggrundsfarve kunne ikke detekteres, fordi elementet indeholder et billedelement",
"bgOverlap": "Elementets baggrundsfarve kunne ikke detekteres, fordi det er overlappet af et andet element",
"fgAlpha": "Elementets forgrundsfarve kunne ikke detekteres på grund af dets gennemsigtighed",
"elmPartiallyObscured": "Elementets baggrundsfarve kunne ikke detekteres, fordi det er delvist dækket af et andet element",
"elmPartiallyObscuring": "Elementets baggrundsfarve kunne ikke detekteres, fordi det delvist dækker et andet element",
"outsideViewport": "Elementets baggrundsfarve kunne ikke detekteres, fordi det er udenfor sidens 'viewport'",
"equalRatio": "Elementet har et 1:1-kontrastforhold med baggrunden",
"shortTextContent": "Elementets indhold er for kort til at kunne afgøre, om indholdet ren faktisk ER tekst",
"default": "Kan ikke udregne kontrastforhold"
}
},
"link-in-text-block"node_modules\@typescript-eslint\types\package.json (Line 4:43 - Line 27:17), node_modules\@typescript-eslint\visitor-keys\package.json (Line 4:63 - Line 27:24)
,
"files": [
"dist",
"!*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/types"node_modules\@typescript-eslint\type-utils\package.json (Line 27:3 - Line 48:39), node_modules\@typescript-eslint\visitor-keys\package.json (Line 28:3 - Line 49:22)
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"keywords": [
"eslint",
"typescript",
"estree"
],
"scripts": {
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"format": "yarn run -T format",
"lint": "yarn run -BT nx lint",
"test": "yarn run -BT nx test",
"typecheck": "yarn run -BT nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "8.40.0",
"@typescript-eslint/typescript-estree"node_modules\@typescript-eslint\tsconfig-utils\package.json (Line 4:60 - Line 26:26), node_modules\@typescript-eslint\type-utils\package.json (Line 4:63 - Line 26:22)
,
"files": [
"dist",
"!*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/tsconfig-utils"node_modules\@typescript-eslint\scope-manager\package.json (Line 4:39 - Line 27:25), node_modules\@typescript-eslint\visitor-keys\package.json (Line 4:63 - Line 27:24)
,
"files": [
"dist",
"!*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/scope-manager"node_modules\@typescript-eslint\project-service\package.json (Line 4:61 - Line 27:27), node_modules\@typescript-eslint\visitor-keys\package.json (Line 4:63 - Line 27:24)
,
"files": [
"dist",
"!*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/project-service"node_modules\@typescript-eslint\project-service\package.json (Line 28:3 - Line 51:15), node_modules\@typescript-eslint\tsconfig-utils\package.json (Line 27:3 - Line 50:18)
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"keywords": [
"eslint",
"typescript",
"estree"
],
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"format": "yarn run -T format",
"lint": "yarn run -BT nx lint",
"test": "yarn run -BT nx test",
"typecheck": "yarn run -BT nx typecheck"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.0.0"
},
"dependencies"node_modules\@typescript-eslint\parser\package.json (Line 7:17 - Line 25:18), node_modules\@typescript-eslint\type-utils\package.json (Line 8:15 - Line 26:22)
,
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/parser"node_modules\@types\babel__core\package.json (Line 5:83 - Line 24:17), node_modules\@types\babel__template\package.json (Line 5:87 - Line 24:11)
,
"license": "MIT",
"contributors": [
{
"name": "Troy Gerwien",
"githubUsername": "yortus",
"url": "https://github.com/yortus"
},
{
"name": "Marvin Hagemeister",
"githubUsername": "marvinhagemeister",
"url": "https://github.com/marvinhagemeister"
},
{
"name": "Melvin Groenhoff",
"githubUsername": "mgroenhoff",
"url": "https://github.com/mgroenhoff"
},
{
"name": "Jessica Franco"node_modules\@nodelib\fs.scandir\package.json (Line 15:3 - Line 35:15), node_modules\@nodelib\fs.stat\package.json (Line 13:3 - Line 33:18)
],
"engines": {
"node": ">= 8"
},
"files": [
"out/**",
"!out/**/*.map",
"!out/**/*.spec.*"
],
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": {
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap",
"test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch"
},
"dependencies"node_modules\@jridgewell\sourcemap-codec\package.json (Line 38:44 - Line 55:78), node_modules\@jridgewell\trace-mapping\package.json (Line 38:42 - Line 55:76)
,
"build:types": "run-s build:types:force build:types:emit build:types:mts",
"build:types:force": "rimraf tsconfig.build.tsbuildinfo",
"build:types:emit": "tsc --project tsconfig.build.json",
"build:types:mts": "node ../../mts-types.mjs",
"clean": "run-s -n clean:code clean:types",
"clean:code": "tsc --build --clean tsconfig.build.json",
"clean:types": "rimraf dist types",
"test": "run-s -n test:types test:only test:format",
"test:format": "prettier --check '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:types": "eslint '{src,test}/**/*.ts'",
"lint": "run-s -n lint:types lint:format",
"lint:format": "npm run test:format -- --write",
"lint:types": "npm run test:types -- --fix",
"prepublishOnly": "npm run-s -n build test"
},
"homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec"node_modules\@jridgewell\gen-mapping\package.json (Line 38:40 - Line 55:74), node_modules\@jridgewell\trace-mapping\package.json (Line 38:42 - Line 55:76)
,
"build:types": "run-s build:types:force build:types:emit build:types:mts",
"build:types:force": "rimraf tsconfig.build.tsbuildinfo",
"build:types:emit": "tsc --project tsconfig.build.json",
"build:types:mts": "node ../../mts-types.mjs",
"clean": "run-s -n clean:code clean:types",
"clean:code": "tsc --build --clean tsconfig.build.json",
"clean:types": "rimraf dist types",
"test": "run-s -n test:types test:only test:format",
"test:format": "prettier --check '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:types": "eslint '{src,test}/**/*.ts'",
"lint": "run-s -n lint:types lint:format",
"lint:format": "npm run test:format -- --write",
"lint:types": "npm run test:types -- --fix",
"prepublishOnly": "npm run-s -n build test"
},
"homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping"node_modules\@humanwhocodes\retry\package.json (Line 3:8 - Line 77:2), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\package.json (Line 3:8 - Line 77:2)
,
"description": "A utility to retry failed async methods.",
"type": "module",
"main": "dist/retrier.cjs",
"module": "dist/retrier.js",
"types": "dist/retrier.d.ts",
"exports": {
"require": {
"types": "./dist/retrier.d.cts",
"default": "./dist/retrier.cjs"
},
"import": {
"types": "./dist/retrier.d.ts",
"default": "./dist/retrier.js"
}
},
"files": [
"dist"
],
"engines": {
"node": ">=18.18"
},
"publishConfig": {
"access": "public"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": [
"eslint --fix"
]
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/nzakas"
},
"scripts": {
"build:cts-types": "node -e \"fs.copyFileSync('dist/retrier.d.ts', 'dist/retrier.d.cts')\"",
"build": "rollup -c && tsc && npm run build:cts-types",
"prepare": "npm run build",
"lint": "eslint src/ tests/",
"pretest": "npm run build",
"test:unit": "mocha tests/retrier.test.js",
"test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:emfile": "node tools/check-emfile-handling.js",
"test": "npm run test:unit && npm run test:build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/humanwhocodes/retry.git"
},
"keywords": [
"nodejs",
"retry",
"async",
"promises"
],
"author": "Nicholas C. Zaks",
"license": "Apache-2.0",
"devDependencies": {
"@eslint/js": "^8.49.0",
"@rollup/plugin-terser": "0.4.4",
"@tsconfig/node16": "^16.1.1",
"@types/mocha": "^10.0.3",
"@types/node": "20.12.6",
"eslint": "^8.21.0",
"lint-staged": "15.2.1",
"mocha": "^10.3.0",
"rollup": "3.29.4",
"typescript": "5.4.4",
"yorkie": "2.0.0"
}
}node_modules\@humanfs\core\package.json (Line 4:35 - Line 22:17), node_modules\@humanfs\node\package.json (Line 4:47 - Line 22:17)
,
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
"default": "./src/index.js"
}
},
"files": [
"dist",
"src"
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"pretest": "npm run build",
"test": "c8 mocha tests"node_modules\@humanfs\core\package.json (Line 23:3 - Line 47:17), node_modules\@humanfs\node\package.json (Line 23:3 - Line 47:14)
},
"repository": {
"type": "git",
"url": "git+https://github.com/humanwhocodes/humanfs.git"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"filesystem",
"fs",
"hfs",
"files"
],
"author": "Nicholas C. Zakas",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/humanwhocodes/humanfs/issues"
},
"homepage": "https://github.com/humanwhocodes/humanfs#readme",
"engines": {
"node": ">=18.18.0"
},
"devDependencies": {
"@humanfs/types"node_modules\@eslint\object-schema\package.json (Line 4:36 - Line 24:14), node_modules\@eslint\plugin-kit\package.json (Line 5:20 - Line 25:13)
,
"type": "module",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
}
},
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"directories"node_modules\@eslint\config-helpers\package.json (Line 4:53 - Line 28:21), node_modules\@eslint\plugin-kit\package.json (Line 5:20 - Line 28:12)
,
"type": "module",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
}
},
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"directories": {
"test": "tests"
},
"scripts": {
"build:dedupe-types"node_modules\@eslint\config-array\package.json (Line 4:53 - Line 28:24), node_modules\@eslint\plugin-kit\package.json (Line 4:41 - Line 28:22)
,
"author": "Nicholas C. Zakas",
"type": "module",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
}
},
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/eslint/rewrite.git",
"directory": "packages/config-array"node_modules\@babel\plugin-transform-react-jsx-self\package.json (Line 10:71 - Line 35:2), node_modules\@babel\plugin-transform-react-jsx-source\package.json (Line 10:73 - Line 35:2)
,
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.27.1",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/plugin-syntax-jsx": "^7.27.1"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}node_modules\typescript-eslint\package.json (Line 7:17 - Line 26:29), node_modules\@typescript-eslint\visitor-keys\package.json (Line 8:15 - Line 27:24)
,
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/typescript-eslint"node_modules\typescript-eslint\package.json (Line 56:27 - Line 74:20), node_modules\@typescript-eslint\utils\package.json (Line 67:39 - Line 85:8)
: "8.40.0"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <6.0.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^3.1.3",
"eslint": "*",
"rimraf": "*",
"typescript": "*",
"vitest": "^3.1.3"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"nx": {
"name": "typescript-eslint"node_modules\typed-array-length\package.json (Line 74:9 - Line 90:15), node_modules\which-boxed-primitive\package.json (Line 59:9 - Line 75:16)
,
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"dependencies"node_modules\typed-array-byte-offset\package.json (Line 4:48 - Line 21:7), node_modules\typed-array-length\package.json (Line 4:43 - Line 21:15)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"tests-only": "nyc tape 'test/**/*.js'",
"test"node_modules\typed-array-byte-offset\package.json (Line 91:9 - Line 107:11), node_modules\which-builtin-type\package.json (Line 90:9 - Line 106:16)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling"node_modules\typed-array-byte-length\package.json (Line 4:48 - Line 22:39), node_modules\typed-array-length\package.json (Line 4:43 - Line 22:38)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production"node_modules\typed-array-byte-length\package.json (Line 80:10 - Line 94:10), node_modules\typed-array-length\package.json (Line 68:9 - Line 82:17)
,
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"is-callable": "^1.2.7",
"make-arrow-function": "^1.2.0",
"make-generator-function": "^2.0.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines"node_modules\typed-array-byte-length\package.json (Line 89:10 - Line 111:2), node_modules\which-builtin-type\package.json (Line 90:9 - Line 112:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling": {
"files": "test/index.js"
},
"publishConfig": {
"ignore": [
".github/workflows"
]node_modules\typed-array-buffer\package.json (Line 58:9 - Line 82:2), node_modules\typed-array-byte-length\package.json (Line 86:9 - Line 111:2)
,
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\string.prototype.trim\package.json (Line 84:21 - Line 104:2), node_modules\which-typed-array\package.json (Line 107:21 - Line 126:2)
,
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]node_modules\stop-iteration-iterator\package.json (Line 10:6 - Line 26:60), node_modules\unbox-primitive\package.json (Line 5:11 - Line 21:52)
,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/stop-iteration-iterator.git"node_modules\side-channel-weakmap\package.json (Line 66:10 - Line 87:2), node_modules\which-boxed-primitive\package.json (Line 62:10 - Line 83:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\side-channel-map\package.json (Line 56:10 - Line 80:2), node_modules\side-channel-weakmap\package.json (Line 63:9 - Line 83:2)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\side-channel-list\package.json (Line 4:78 - Line 27:54), node_modules\side-channel-map\package.json (Line 4:70 - Line 27:53)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/side-channel-list.git"node_modules\side-channel-list\package.json (Line 46:9 - Line 77:2), node_modules\side-channel-map\package.json (Line 49:9 - Line 83:2)
,
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\side-channel\package.json (Line 3:8 - Line 27:49), node_modules\side-channel-weakmap\package.json (Line 3:8 - Line 27:57)
,
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/side-channel.git"node_modules\side-channel\package.json (Line 55:9 - Line 85:2), node_modules\side-channel-weakmap\package.json (Line 57:9 - Line 83:2)
,
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\set-proto\package.json (Line 58:10 - Line 78:2), node_modules\which-builtin-type\package.json (Line 90:9 - Line 111:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},node_modules\set-function-name\tsconfig.json (Line 8:9 - Line 24:3), node_modules\which-collection\tsconfig.json (Line 8:9 - Line 23:3)
, /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
/*node_modules\set-function-name\tsconfig.json (Line 27:2 - Line 32:3), node_modules\which-collection\tsconfig.json (Line 28:2 - Line 33:9)
, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
//node_modules\set-function-name\tsconfig.json (Line 32:2 - Line 42:16), node_modules\which-collection\tsconfig.json (Line 32:2 - Line 43:3)
files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny"node_modules\safe-regex-test\package.json (Line 57:9 - Line 87:2), node_modules\which-boxed-primitive\package.json (Line 53:9 - Line 83:2)
,
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\safe-push-apply\package.json (Line 56:10 - Line 82:2), node_modules\set-proto\package.json (Line 53:9 - Line 111:2)
,
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\safe-array-concat\package.json (Line 4:80 - Line 26:7), node_modules\safe-push-apply\package.json (Line 4:90 - Line 26:8)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"tests-only": "nyc tape test",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production"
},
"keywords": [
"safe"node_modules\regexp.prototype.flags\package.json (Line 67:10 - Line 105:2), node_modules\string.prototype.trim\package.json (Line 68:10 - Line 106:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\reflect.getprototypeof\package.json (Line 75:9 - Line 95:11), node_modules\string.prototype.trimend\package.json (Line 60:9 - Line 80:10)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"testling"node_modules\react-router\package.json (Line 84:7 - Line 104:17), node_modules\react-router\package.json (Line 29:7 - Line 49:8)
},
"node": {
"types": "./dist/development/index.d.ts",
"module": "./dist/development/index.mjs",
"module-sync": "./dist/development/index.mjs",
"default": "./dist/development/index.js"
},
"module": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"import": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"default": {
"types": "./dist/development/index.d.ts",
"default": "./dist/development/index.js"
}
},
"./package.json"node_modules\react-is\package.json (Line 3:10 - Line 22:18), node_modules\rc-util\node_modules\react-is\package.json (Line 3:9 - Line 22:11)
,
"description": "Brand checking of React Elements.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-is"
},
"keywords": [
"react"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://reactjs.org/",
"files": [
"LICENSE",
"README.md",
"build-info.json"node_modules\possible-typed-array-names\package.json (Line 58:9 - Line 84:2), node_modules\side-channel-map\package.json (Line 54:10 - Line 83:2)
,
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\picomatch\package.json (Line 33:10 - Line 81:2), node_modules\vite\node_modules\picomatch\package.json (Line 35:10 - Line 83:2)
,
"time-require": "github:jonschlinkert/time-require"
},
"keywords": [
"glob",
"match",
"picomatch"
],
"nyc": {
"reporter": [
"html",
"lcov",
"text-summary"
]
},
"verb": {
"toc": {
"render": true,
"method": "preWrite",
"maxdepth": 3
},
"layout": "empty",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
},
"related": {
"list": [
"braces",
"micromatch"
]
},
"reflinks": [
"braces",
"expand-brackets",
"extglob",
"fill-range",
"micromatch",
"minimatch",
"nanomatch",
"picomatch"
]
}
}node_modules\p-limit\package.json (Line 6:23 - Line 25:8), node_modules\p-locate\package.json (Line 6:24 - Line 25:9)
,
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"promise",
"limit"node_modules\own-keys\package.json (Line 4:108 - Line 26:6), node_modules\safe-push-apply\package.json (Line 4:90 - Line 26:8)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"tests-only": "nyc tape test",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production"
},
"keywords": [
"own"node_modules\own-keys\package.json (Line 67:9 - Line 91:2), node_modules\set-proto\package.json (Line 55:10 - Line 111:2)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\object.values\package.json (Line 8:44 - Line 26:46), node_modules\string.prototype.trim\package.json (Line 19:52 - Line 37:54)
,
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/es-shims/Object.values.git"node_modules\object.values\package.json (Line 61:9 - Line 99:2), node_modules\string.prototype.trim\package.json (Line 68:10 - Line 106:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\object.entries\package.json (Line 54:9 - Line 95:2), node_modules\string.prototype.trim\package.json (Line 65:9 - Line 106:2)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\motion-dom\package.json (Line 3:11 - Line 19:15), node_modules\motion-utils\package.json (Line 3:10 - Line 19:10)
,
"author": "Matt Perry",
"license": "MIT",
"repository": "https://github.com/motiondivision/motion",
"main": "./dist/cjs/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/es/index.mjs",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/es/index.mjs",
"default": "./dist/cjs/index.js"
}
},
"dependencies"node_modules\math-intrinsics\package.json (Line 23:2 - Line 41:54), node_modules\possible-typed-array-names\package.json (Line 10:15 - Line 28:63)
,
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "nyc tape 'test/**/*.js'",
"posttest": "npx npm@'>= 10.2' audit --production",
"prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/es-shims/math-intrinsics.git"node_modules\math-intrinsics\package.json (Line 60:10 - Line 86:2), node_modules\which-boxed-primitive\package.json (Line 57:9 - Line 83:2)
,
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\json5\package.json (Line 30:3 - Line 53:18), node_modules\tsconfig-paths\node_modules\json5\package.json (Line 21:3 - Line 44:15)
},
"repository": {
"type": "git",
"url": "git+https://github.com/json5/json5.git"
},
"keywords": [
"json",
"json5",
"es5",
"es2015",
"ecmascript"
],
"author": "Aseem Kishore <aseem.kishore@gmail.com>",
"contributors": [
"Max Nanasy <max.nanasy@gmail.com>",
"Andrew Eisenberg <andrew@eisenberg.as>",
"Jordan Tucker <jordanbtucker@gmail.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/json5/json5/issues"
},
"homepage": "http://json5.org/",
"devDependencies"node_modules\is-weakset\package.json (Line 60:10 - Line 87:2), node_modules\which-boxed-primitive\package.json (Line 56:9 - Line 83:2)
,
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\is-weakmap\tsconfig.json (Line 1:1 - Line 49:2), node_modules\which-collection\tsconfig.json (Line 1:1 - Line 49:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\is-weakmap\package.json (Line 62:9 - Line 81:2), node_modules\which-boxed-primitive\package.json (Line 64:9 - Line 83:2)
,
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\is-typed-array\package.json (Line 89:10 - Line 121:2), node_modules\which-typed-array\package.json (Line 90:10 - Line 123:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,node_modules\is-symbol\package.json (Line 55:9 - Line 95:9), node_modules\is-typed-array\package.json (Line 86:9 - Line 127:13)
,
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
".nvmrc"node_modules\is-string\package.json (Line 54:9 - Line 88:2), node_modules\which-typed-array\package.json (Line 88:9 - Line 121:2)
,
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
}node_modules\is-shared-array-buffer\package.json (Line 58:9 - Line 73:17), node_modules\typed-array-buffer\package.json (Line 51:9 - Line 66:10)
,
"auto-changelog": "^2.5.0",
"available-typed-arrays": "^1.0.7",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog"node_modules\is-shared-array-buffer\package.json (Line 60:9 - Line 82:13), node_modules\which-boxed-primitive\package.json (Line 54:9 - Line 91:12)
,
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"dependencies": {
"call-bound"node_modules\is-set\tsconfig.json (Line 1:1 - Line 49:2), node_modules\which-collection\tsconfig.json (Line 1:1 - Line 49:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\is-set\package.json (Line 40:46 - Line 55:6), node_modules\is-weakmap\package.json (Line 43:50 - Line 58:12)
,
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.0",
"@ljharb/eslint-config": "^21.1.0",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.8.4",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"core-js": "^2.6.12",
"es5-shim": "^4.6.7",
"es6-shim": "^0.35.8",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"nyc"node_modules\is-set\package.json (Line 54:9 - Line 69:10), node_modules\is-weakmap\package.json (Line 58:9 - Line 73:16)
,
"nyc": "^10.3.2",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"engines"node_modules\is-regex\package.json (Line 68:2 - Line 101:17), node_modules\which-typed-array\package.json (Line 94:2 - Line 127:13)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"test-corejs.js"node_modules\is-number-object\package.json (Line 8:105 - Line 27:51), node_modules\is-string\package.json (Line 9:6 - Line 28:44)
,
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test:corejs": "nyc tape test-corejs.js",
"test": "npm run tests-only && npm run test:corejs",
"posttest": "npx npm@'>=10.2' audit --production",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/inspect-js/is-number-object.git"node_modules\is-number-object\package.json (Line 40:56 - Line 57:10), node_modules\is-string\package.json (Line 37:2 - Line 54:5)
,
"dependencies": {
"call-bound": "^1.0.3",
"has-tostringtag": "^1.0.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/core-js": "^2.5.8",
"@types/tape": "^5.7.0",
"auto-changelog": "^2.5.0",
"core-js": "^3.39.0",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"indexof"node_modules\is-negative-zero\tsconfig.json (Line 1:1 - Line 49:2), node_modules\which-collection\tsconfig.json (Line 1:1 - Line 49:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\is-negative-zero\package.json (Line 68:21 - Line 92:2), node_modules\which-typed-array\package.json (Line 105:21 - Line 106:2)
,
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\is-map\tsconfig.json (Line 1:1 - Line 49:2), node_modules\which-collection\tsconfig.json (Line 1:1 - Line 49:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\is-map\package.json (Line 4:95 - Line 17:64), node_modules\is-weakset\package.json (Line 4:99 - Line 17:64)
,
"main": "index.js",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"tests-only": "nyc tape 'test/**/*.js'",
"tests:shims": "nyc tape --require=es5-shim --require=es5-shim 'test/**/*.js'"node_modules\is-map\package.json (Line 6:6 - Line 24:47), node_modules\is-weakmap\package.json (Line 6:5 - Line 24:51)
,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"tests-only": "nyc tape 'test/**/*.js'",
"tests:shims": "nyc tape --require=es5-shim --require=es5-shim 'test/**/*.js'",
"tests:corejs": "nyc tape --require=core-js 'test/**/*.js'",
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs",
"posttest": "aud --production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-map.git"node_modules\is-map\package.json (Line 41:46 - Line 61:22), node_modules\is-weakmap\package.json (Line 43:50 - Line 63:7)
,
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.0",
"@ljharb/eslint-config": "^21.1.0",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.8.4",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"core-js": "^2.6.12",
"es5-shim": "^4.6.7",
"es6-shim": "^0.35.8",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5",
"typescript": "^5.5.0-dev.20240308"node_modules\is-generator-function\package.json (Line 71:2 - Line 106:2), node_modules\which-typed-array\package.json (Line 94:2 - Line 106:2)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\is-finalizationregistry\package.json (Line 55:10 - Line 82:2), node_modules\which-boxed-primitive\package.json (Line 56:9 - Line 83:2)
,
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\is-extglob\package.json (Line 21:3 - Line 46:6), node_modules\is-glob\package.json (Line 29:3 - Line 54:9)
},
"devDependencies": {
"gulp-format-md": "^0.1.10",
"mocha": "^3.0.2"
},
"keywords": [
"bash",
"braces",
"check",
"exec",
"expression",
"extglob",
"glob",
"globbing",
"globstar",
"is",
"match",
"matches",
"pattern",
"regex",
"regular",
"string",
"test"
],
"verb": {
"toc"node_modules\is-date-object\package.json (Line 63:2 - Line 99:2), node_modules\which-typed-array\package.json (Line 94:2 - Line 104:2)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"test-corejs.js"
]
}
}node_modules\is-data-view\package.json (Line 76:10 - Line 98:2), node_modules\is-number-object\package.json (Line 60:10 - Line 81:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]node_modules\is-core-module\core.json (Line 1:1 - Line 94:2), node_modules\resolve\lib\core.json (Line 1:1 - Line 94:10)
{
"assert": true,
"node:assert": [">= 14.18 && < 15", ">= 16"],
"assert/strict": ">= 15",
"node:assert/strict": ">= 16",
"async_hooks": ">= 8",
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
"buffer_ieee754": ">= 0.5 && < 0.9.7",
"buffer": true,
"node:buffer": [">= 14.18 && < 15", ">= 16"],
"child_process": true,
"node:child_process": [">= 14.18 && < 15", ">= 16"],
"cluster": ">= 0.5",
"node:cluster": [">= 14.18 && < 15", ">= 16"],
"console": true,
"node:console": [">= 14.18 && < 15", ">= 16"],
"constants": true,
"node:constants": [">= 14.18 && < 15", ">= 16"],
"crypto": true,
"node:crypto": [">= 14.18 && < 15", ">= 16"],
"_debug_agent": ">= 1 && < 8",
"_debugger": "< 8",
"dgram": true,
"node:dgram": [">= 14.18 && < 15", ">= 16"],
"diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"],
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
"dns": true,
"node:dns": [">= 14.18 && < 15", ">= 16"],
"dns/promises": ">= 15",
"node:dns/promises": ">= 16",
"domain": ">= 0.7.12",
"node:domain": [">= 14.18 && < 15", ">= 16"],
"events": true,
"node:events": [">= 14.18 && < 15", ">= 16"],
"freelist": "< 6",
"fs": true,
"node:fs": [">= 14.18 && < 15", ">= 16"],
"fs/promises": [">= 10 && < 10.1", ">= 14"],
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
"_http_agent": ">= 0.11.1",
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
"_http_client": ">= 0.11.1",
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
"_http_common": ">= 0.11.1",
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
"_http_incoming": ">= 0.11.1",
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
"_http_outgoing": ">= 0.11.1",
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
"_http_server": ">= 0.11.1",
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
"http": true,
"node:http": [">= 14.18 && < 15", ">= 16"],
"http2": ">= 8.8",
"node:http2": [">= 14.18 && < 15", ">= 16"],
"https": true,
"node:https": [">= 14.18 && < 15", ">= 16"],
"inspector": ">= 8",
"node:inspector": [">= 14.18 && < 15", ">= 16"],
"inspector/promises": [">= 19"],
"node:inspector/promises": [">= 19"],
"_linklist": "< 8",
"module": true,
"node:module": [">= 14.18 && < 15", ">= 16"],
"net": true,
"node:net": [">= 14.18 && < 15", ">= 16"],
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
"os": true,
"node:os": [">= 14.18 && < 15", ">= 16"],
"path": true,
"node:path": [">= 14.18 && < 15", ">= 16"],
"path/posix": ">= 15.3",
"node:path/posix": ">= 16",
"path/win32": ">= 15.3",
"node:path/win32": ">= 16",
"perf_hooks": ">= 8.5",
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
"process": ">= 1",
"node:process": [">= 14.18 && < 15", ">= 16"],
"punycode": ">= 0.5",
"node:punycode": [">= 14.18 && < 15", ">= 16"],
"querystring": true,
"node:querystring": [">= 14.18 && < 15", ">= 16"],
"readline": true,
"node:readline": [">= 14.18 && < 15", ">= 16"],
"readline/promises": ">= 17",
"node:readline/promises": ">= 17",
"repl": true,
"node:repl": [">= 14.18 && < 15", ">= 16"],
"node:sea": [">= 20.12 && < 21", ">= 21.7"],
"smalloc": ">= 0.11.5 && < 3",
"node:sqlite": [node_modules\is-core-module\core.json (Line 94:2 - Line 162:2), node_modules\resolve\lib\core.json (Line 94:10 - Line 162:2)
,
"_stream_duplex": ">= 0.9.4",
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
"_stream_transform": ">= 0.9.4",
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
"_stream_wrap": ">= 1.4.1",
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
"_stream_passthrough": ">= 0.9.4",
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
"_stream_readable": ">= 0.9.4",
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
"_stream_writable": ">= 0.9.4",
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
"stream": true,
"node:stream": [">= 14.18 && < 15", ">= 16"],
"stream/consumers": ">= 16.7",
"node:stream/consumers": ">= 16.7",
"stream/promises": ">= 15",
"node:stream/promises": ">= 16",
"stream/web": ">= 16.5",
"node:stream/web": ">= 16.5",
"string_decoder": true,
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
"sys": [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"test/reporters": ">= 19.9 && < 20.2",
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
"test/mock_loader": ">= 22.3 && < 22.7",
"node:test/mock_loader": ">= 22.3 && < 22.7",
"node:test": [">= 16.17 && < 17", ">= 18"],
"timers": true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
"timers/promises": ">= 15",
"node:timers/promises": ">= 16",
"_tls_common": ">= 0.11.13",
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
"_tls_legacy": ">= 0.11.3 && < 10",
"_tls_wrap": ">= 0.11.3",
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
"tls": true,
"node:tls": [">= 14.18 && < 15", ">= 16"],
"trace_events": ">= 10",
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
"tty": true,
"node:tty": [">= 14.18 && < 15", ">= 16"],
"url": true,
"node:url": [">= 14.18 && < 15", ">= 16"],
"util": true,
"node:util": [">= 14.18 && < 15", ">= 16"],
"util/types": ">= 15.3",
"node:util/types": ">= 16",
"v8/tools/arguments": ">= 10 && < 12",
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8": ">= 1",
"node:v8": [">= 14.18 && < 15", ">= 16"],
"vm": true,
"node:vm": [">= 14.18 && < 15", ">= 16"],
"wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
"node:wasi": [">= 18.17 && < 19", ">= 20"],
"worker_threads": ">= 11.7",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
"zlib": ">= 0.5",
"node:zlib": [">= 14.18 && < 15", ">= 16"]
}node_modules\is-callable\package.json (Line 70:2 - Line 99:9), node_modules\which-typed-array\package.json (Line 94:2 - Line 122:9)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "v1.2.5"node_modules\is-boolean-object\package.json (Line 66:10 - Line 100:2), node_modules\which-typed-array\package.json (Line 96:16 - Line 104:2)
,
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"test-corejs.js"
]
}
}node_modules\is-bigint\package.json (Line 44:9 - Line 62:17), node_modules\is-symbol\package.json (Line 45:9 - Line 63:11)
,
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"has-tostringtag": "^1.0.2",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog"node_modules\is-bigint\package.json (Line 53:9 - Line 78:2), node_modules\which-boxed-primitive\package.json (Line 58:9 - Line 83:2)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\is-async-function\package.json (Line 67:9 - Line 110:2), node_modules\is-generator-function\package.json (Line 63:9 - Line 106:2)
,
"make-generator-function": "^2.0.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next",
"uglify-register": "^1.0.1"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\is-array-buffer\package.json (Line 52:9 - Line 75:2), node_modules\is-shared-array-buffer\package.json (Line 56:12 - Line 74:2)
,
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.7.0",
"auto-changelog": "^2.5.0",
"available-typed-arrays": "^1.0.7",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,node_modules\ignore\package.json (Line 29:3 - Line 58:10), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\package.json (Line 41:3 - Line 70:35)
},
"repository": {
"type": "git",
"url": "git@github.com:kaelzhang/node-ignore.git"
},
"keywords": [
"ignore",
".gitignore",
"gitignore",
"npmignore",
"rules",
"manager",
"filter",
"regexp",
"regex",
"fnmatch",
"glob",
"asterisks",
"regular-expression"
],
"author": "kael",
"license": "MIT",
"bugs": {
"url": "https://github.com/kaelzhang/node-ignore/issues"
},
"devDependencies": {
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"codecov"node_modules\hasown\package.json (Line 69:9 - Line 88:2), node_modules\stop-iteration-iterator\package.json (Line 55:9 - Line 75:2)
,
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",node_modules\has-tostringtag\tsconfig.json (Line 1:1 - Line 49:2), node_modules\which-collection\tsconfig.json (Line 1:1 - Line 49:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\has-tostringtag\package.json (Line 86:9 - Line 105:15), node_modules\which-builtin-type\package.json (Line 92:9 - Line 79:11)
,
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"dependencies"node_modules\has-symbols\package.json (Line 69:9 - Line 108:8), node_modules\which-typed-array\package.json (Line 88:9 - Line 127:13)
,
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"types"node_modules\has-proto\package.json (Line 66:9 - Line 85:8), node_modules\which-builtin-type\package.json (Line 90:9 - Line 99:7)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"types"node_modules\has-bigints\package.json (Line 43:9 - Line 69:2), node_modules\side-channel-weakmap\package.json (Line 61:9 - Line 83:2)
,
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\gopd\package.json (Line 56:9 - Line 77:2), node_modules\which-boxed-primitive\package.json (Line 62:10 - Line 83:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\globalthis\package.json (Line 63:2 - Line 95:17), node_modules\which-typed-array\package.json (Line 94:2 - Line 126:20)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
"browserShim.js"node_modules\globals\package.json (Line 3:9 - Line 18:36), node_modules\@eslint\eslintrc\node_modules\globals\package.json (Line 3:9 - Line 18:19)
,
"description": "Global identifiers from different JavaScript environments",
"license": "MIT",
"repository": "sindresorhus/globals",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "npm run build && xo && ava && tsd"node_modules\get-proto\package.json (Line 9:29 - Line 28:46), node_modules\set-proto\package.json (Line 9:29 - Line 28:46)
,
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run tests-only",
"posttest": "npx npm@\">=10.2\" audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/get-proto.git"node_modules\get-proto\package.json (Line 44:9 - Line 81:2), node_modules\set-proto\package.json (Line 45:9 - Line 82:2)
,
"es-object-atoms": "^1.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.2",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.3",
"@types/tape": "^5.8.0",
"auto-changelog": "^2.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"testling": {
"files": "test/index.js"
}
}node_modules\function.prototype.name\package.json (Line 65:2 - Line 93:2), node_modules\string.prototype.trim\package.json (Line 71:2 - Line 100:2)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,node_modules\eslint-visitor-keys\package.json (Line 3:8 - Line 26:34), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\package.json (Line 3:8 - Line 26:35)
,
"description": "Constants and utilities about visitor keys to traverse AST.",
"type": "module",
"main": "dist/eslint-visitor-keys.cjs",
"types": "./dist/index.d.ts",
"exports": {
".": [
{
"import": "./lib/index.js",
"require": "./dist/eslint-visitor-keys.cjs"
},
"./dist/eslint-visitor-keys.cjs"
],
"./package.json": "./package.json"
},
"files": [
"dist/index.d.ts",
"dist/visitor-keys.d.ts",
"dist/eslint-visitor-keys.cjs",
"dist/eslint-visitor-keys.d.cts",
"lib"
],
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"node_modules\es-to-primitive\package.json (Line 72:9 - Line 89:2), node_modules\is-number-object\package.json (Line 60:10 - Line 78:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,node_modules\es-object-atoms\package.json (Line 55:9 - Line 80:2), node_modules\side-channel-map\package.json (Line 55:9 - Line 83:2)
,
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\es-iterator-helpers\package.json (Line 185:10 - Line 205:2), node_modules\string.prototype.trimend\package.json (Line 63:10 - Line 83:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\es-errors\tsconfig.json (Line 8:6 - Line 17:7), node_modules\which-collection\tsconfig.json (Line 8:9 - Line 17:9)
, /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node"node_modules\es-errors\tsconfig.json (Line 21:2 - Line 26:10), node_modules\which-collection\tsconfig.json (Line 21:2 - Line 26:10)
*/
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS`node_modules\es-errors\tsconfig.json (Line 28:2 - Line 36:8), node_modules\which-collection\tsconfig.json (Line 28:2 - Line 36:8)
*/
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow `importnode_modules\es-errors\tsconfig.json (Line 37:2 - Line 47:2), node_modules\which-collection\tsconfig.json (Line 37:2 - Line 48:2)
for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage",node_modules\es-errors\package.json (Line 61:9 - Line 80:2), node_modules\which-boxed-primitive\package.json (Line 64:9 - Line 83:2)
,
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\es-define-property\package.json (Line 54:9 - Line 81:2), node_modules\stop-iteration-iterator\package.json (Line 50:9 - Line 77:2)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\es-abstract\package.json (Line 149:10 - Line 175:10), node_modules\object.assign\package.json (Line 64:10 - Line 90:20)
,
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"publishConfig": {
"ignore": [
".github"node_modules\dunder-proto\package.json (Line 46:9 - Line 65:11), node_modules\side-channel-map\package.json (Line 53:9 - Line 79:16)
,
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling"node_modules\define-properties\package.json (Line 51:2 - Line 80:8), node_modules\which-typed-array\package.json (Line 94:2 - Line 122:9)
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "1.1.5"node_modules\define-data-property\tsconfig.json (Line 1:1 - Line 59:2), node_modules\set-function-name\tsconfig.json (Line 1:1 - Line 59:2)
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
/* Completeness */
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\define-data-property\package.json (Line 83:9 - Line 103:24), node_modules\stop-iteration-iterator\package.json (Line 55:9 - Line 89:7)
,
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"types/reflect.ownkeys"node_modules\data-view-byte-offset\package.json (Line 68:10 - Line 94:2), node_modules\typed-array-buffer\package.json (Line 56:9 - Line 111:2)
,
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\data-view-byte-length\package.json (Line 4:50 - Line 27:41), node_modules\data-view-byte-offset\package.json (Line 4:50 - Line 27:37)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"funding": {
"url": "https://github.com/sponsors/inspect-js"node_modules\data-view-byte-length\package.json (Line 63:9 - Line 92:2), node_modules\data-view-byte-offset\package.json (Line 65:10 - Line 111:2)
,
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\data-view-buffer\package.json (Line 4:51 - Line 18:11), node_modules\data-view-byte-offset\package.json (Line 4:50 - Line 18:22)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p ."node_modules\data-view-buffer\package.json (Line 11:6 - Line 31:57), node_modules\is-data-view\package.json (Line 10:15 - Line 30:53)
,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/data-view-buffer.git"node_modules\data-view-buffer\package.json (Line 57:9 - Line 88:2), node_modules\data-view-byte-offset\package.json (Line 63:9 - Line 111:2)
,
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\call-bound\package.json (Line 79:2 - Line 99:2), node_modules\iterator.prototype\package.json (Line 57:2 - Line 77:2)
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\call-bind-apply-helpers\package.json (Line 14:2 - Line 31:60), node_modules\call-bound\package.json (Line 10:6 - Line 27:47)
,
"scripts": {
"prepack": "npmignore --auto --commentLines=auto",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/call-bind-apply-helpers.git"node_modules\call-bind-apply-helpers\package.json (Line 56:9 - Line 85:2), node_modules\call-bound\package.json (Line 70:9 - Line 77:2)
,
"has-strict-mode": "^1.1.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\call-bind\package.json (Line 27:2 - Line 49:45), node_modules\call-bound\package.json (Line 28:2 - Line 50:46)
},
"keywords": [
"javascript",
"ecmascript",
"es",
"js",
"callbind",
"callbound",
"call",
"bind",
"bound",
"call-bind",
"call-bound",
"function",
"es-abstract"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/call-bind/issues"node_modules\call-bind\package.json (Line 70:10 - Line 93:2), node_modules\iterator.prototype\package.json (Line 54:9 - Line 77:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}node_modules\browserslist\package.json (Line 4:109 - Line 26:28), node_modules\update-browserslist-db\package.json (Line 4:86 - Line 26:25)
,
"keywords": [
"caniuse",
"browsers",
"target"
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": "browserslist/browserslist"node_modules\brace-expansion\package.json (Line 21:9 - Line 48:6), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\package.json (Line 20:9 - Line 47:6)
,
"tape": "^4.6.0"
},
"keywords": [],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
"chrome/25..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"publishConfig": {
"tag": "1.x"node_modules\balanced-match\package.json (Line 25:3 - Line 48:2), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\package.json (Line 23:2 - Line 45:2)
],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
"chrome/25..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
}
}node_modules\available-typed-arrays\tsconfig.json (Line 8:9 - Line 28:2), node_modules\which-collection\tsconfig.json (Line 8:9 - Line 28:2)
, /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 1node_modules\available-typed-arrays\tsconfig.json (Line 23:2 - Line 49:2), node_modules\set-function-name\tsconfig.json (Line 22:2 - Line 49:2)
*/
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}node_modules\async-function\package.json (Line 16:2 - Line 35:51), node_modules\set-proto\package.json (Line 9:29 - Line 28:46)
,
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run tests-only",
"posttest": "npx npm@\">=10.2\" audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/async-function.git"node_modules\async-function\package.json (Line 63:9 - Line 86:2), node_modules\which-builtin-type\package.json (Line 91:9 - Line 82:2)
,
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"testling": {
"files": "test/index.js"
}
}node_modules\arraybuffer.prototype.slice\package.json (Line 9:6 - Line 23:15), node_modules\object.groupby\package.json (Line 4:101 - Line 18:24)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./auto": "./auto.js",
"./polyfill": "./polyfill.js",
"./implementation": "./implementation.js",
"./shim": "./shim.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint"node_modules\arraybuffer.prototype.slice\package.json (Line 18:2 - Line 35:66), node_modules\regexp.prototype.flags\package.json (Line 10:11 - Line 27:55)
,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "evalmd README.md && es-shim-api --bound",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/es-shims/ArrayBuffer.prototype.slice.git"node_modules\arraybuffer.prototype.slice\package.json (Line 82:2 - Line 102:2), node_modules\is-number-object\package.json (Line 64:2 - Line 100:2)
},
"testling": {
"files": "test/index.js"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\array.prototype.tosorted\package.json (Line 64:9 - Line 79:16), node_modules\string.prototype.trimstart\package.json (Line 54:9 - Line 69:15)
,
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig"node_modules\array.prototype.flatmap\package.json (Line 77:2 - Line 104:8), node_modules\which-typed-array\package.json (Line 96:16 - Line 122:9)
,
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "1.3.1"node_modules\array.prototype.flat\package.json (Line 66:9 - Line 113:2), node_modules\array.prototype.flatmap\package.json (Line 64:9 - Line 111:2)
,
"has-strict-mode": "^1.0.1",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": [
"test/index.js",
"test/shimmed.js"
],
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "1.3.1"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\array.prototype.findlast\package.json (Line 4:111 - Line 22:62), node_modules\array.prototype.findlastindex\package.json (Line 4:116 - Line 22:67)
,
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/es-shims/Array.prototype.findLast/issues"node_modules\array.prototype.findlast\package.json (Line 24:62 - Line 38:44), node_modules\array.prototype.findlastindex\package.json (Line 24:67 - Line 38:24)
,
"main": "index.js",
"exports": {
".": "./index.js",
"./auto": "./auto.js",
"./polyfill": "./polyfill.js",
"./implementation": "./implementation.js",
"./shim": "./shim.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run --silent lint && evalmd README.md"node_modules\array.prototype.findlast\package.json (Line 88:2 - Line 111:2), node_modules\array.prototype.findlastindex\package.json (Line 92:2 - Line 115:2)
},
"testling": {
"files": [
"test/index.js",
"test/shimmed.js"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}node_modules\array-includes\package.json (Line 79:25 - Line 108:8), node_modules\array.prototype.flatmap\package.json (Line 75:16 - Line 122:9)
,
"test/shimmed.js"
],
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "3.1.6"node_modules\array-buffer-byte-length\package.json (Line 55:3 - Line 75:17), node_modules\data-view-buffer\package.json (Line 52:3 - Line 78:10)
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/es-value-fixtures": "^1.4.4",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.8.0",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog"node_modules\array-buffer-byte-length\package.json (Line 64:9 - Line 83:11), node_modules\math-intrinsics\package.json (Line 59:9 - Line 75:16)
,
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling"node_modules\array-buffer-byte-length\package.json (Line 70:10 - Line 94:2), node_modules\dunder-proto\package.json (Line 52:10 - Line 76:2)
,
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling": {
"files": "test/index.js"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}javascript
node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\nested_symlinks\mylib\async.js (Line 6:5 - Line 11:18), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\nested_symlinks\mylib\sync.js (Line 5:1 - Line 10:17)
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
console.log(b, ': preserveSymlinks true');
console.log(c, ': preserveSymlinks false');
if (a !== b && a !== c) {
throw 'async: no match'node_modules\resolve\test\resolver\multirepo\packages\package-a\index.js (Line 1:1 - Line 35:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\multirepo\packages\package-a\index.js (Line 1:1 - Line 35:2)
'use strict';
var assert = require('assert');
var path = require('path');
var resolve = require('resolve');
var basedir = __dirname + '/node_modules/@my-scope/package-b';
var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js');
/*
* preserveSymlinks === false
* will search NPM package from
* - packages/package-b/node_modules
* - packages/node_modules
* - node_modules
*/
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected);
assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected);
/*
* preserveSymlinks === true
* will search NPM package from
* - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules
* - packages/package-a/node_modules/@my-scope/packages/node_modules
* - packages/package-a/node_modules/@my-scope/node_modules
* - packages/package-a/node_modules/node_modules
* - packages/package-a/node_modules
* - packages/node_modules
* - node_modules
*/
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected);
assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected);
console.log(' * all monorepo paths successfully resolved through symlinks');node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 242:2 - Line 272:14), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 195:4 - Line 225:2)
;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobTypenode_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\brace-expressions.js (Line 6:1 - Line 36:6), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\brace-expressions.js (Line 3:1 - Line 33:7)
// { <posix class>: [<translation>, /u flag required, negated]
const posixClasses = {
'[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
'[:alpha:]': ['\\p{L}\\p{Nl}', true],
'[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
'[:blank:]': ['\\p{Zs}\\t', true],
'[:cntrl:]': ['\\p{Cc}', true],
'[:digit:]': ['\\p{Nd}', true],
'[:graph:]': ['\\p{Z}\\p{C}', true, true],
'[:lower:]': ['\\p{Ll}', true],
'[:print:]': ['\\p{C}', true],
'[:punct:]': ['\\p{P}', true],
'[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
'[:upper:]': ['\\p{Lu}', true],
'[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
'[:xdigit:]': ['A-Fa-f0-9', false],
};
// only need to escape a few things inside of brace expressions
// escapes: [ \ ] -
const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
// escape all regexp magic characters
const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// everything has already been escaped, we just have to join
const rangesToString = (ranges) => ranges.join('');
// takes a glob string at a posix brace expression, and returns
// an equivalent regular expression source, and boolean indicating
// whether the /u flag needs to be applied, and the number of chars
// consumed to parse the character class.
// This also removes out of order ranges, and returns ($.) if the
// entire class just no good.
constnode_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\brace-expressions.js (Line 36:1 - Line 151:8), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\brace-expressions.js (Line 33:2 - Line 148:46)
const parseClass = (glob, position) => {
const pos = position;
/* c8 ignore start */
if (glob.charAt(pos) !== '[') {
throw new Error('not in a brace expression');
}
/* c8 ignore stop */
const ranges = [];
const negs = [];
let i = pos + 1;
let sawStart = false;
let uflag = false;
let escaping = false;
let negate = false;
let endPos = pos;
let rangeStart = '';
WHILE: while (i < glob.length) {
const c = glob.charAt(i);
if ((c === '!' || c === '^') && i === pos + 1) {
negate = true;
i++;
continue;
}
if (c === ']' && sawStart && !escaping) {
endPos = i + 1;
break;
}
sawStart = true;
if (c === '\\') {
if (!escaping) {
escaping = true;
i++;
continue;
}
// escaped \ char, fall through and treat like normal char
}
if (c === '[' && !escaping) {
// either a posix class, a collation equivalent, or just a [
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
if (glob.startsWith(cls, i)) {
// invalid, [a-[] is fine, but not [a-[:alpha]]
if (rangeStart) {
return ['$.', false, glob.length - pos, true];
}
i += cls.length;
if (neg)
negs.push(unip);
else
ranges.push(unip);
uflag = uflag || u;
continue WHILE;
}
}
}
// now it's just a normal character, effectively
escaping = false;
if (rangeStart) {
// throw this range away if it's not valid, but others
// can still match.
if (c > rangeStart) {
ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
}
else if (c === rangeStart) {
ranges.push(braceEscape(c));
}
rangeStart = '';
i++;
continue;
}
// now might be the start of a range.
// can be either c-d or c-] or c<more...>] or c] at this point
if (glob.startsWith('-]', i + 1)) {
ranges.push(braceEscape(c + '-'));
i += 2;
continue;
}
if (glob.startsWith('-', i + 1)) {
rangeStart = c;
i += 2;
continue;
}
// not the start of a range, just a single character
ranges.push(braceEscape(c));
i++;
}
if (endPos < i) {
// didn't see the end of the class, not a valid class,
// but might still be valid as a literal match.
return ['', false, 0, false];
}
// if we got no ranges and no negates, then we have a range that
// cannot possibly match anything, and that poisons the whole glob
if (!ranges.length && !negs.length) {
return ['$.', false, glob.length - pos, true];
}
// if we got one positive range, and it's a single character, then that's
// not actually a magic pattern, it's just that one literal character.
// we should not treat that as "magic", we should just return the literal
// character. [_] is a perfectly valid way to escape glob magic chars.
if (negs.length === 0 &&
ranges.length === 1 &&
/^\\?.$/.test(ranges[0]) &&
!negate) {
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
return [regexpEscape(r), false, endPos - pos, false];
}
const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
const comb = ranges.length && negs.length
? '(' + sranges + '|' + snegs + ')'
: ranges.length
? sranges
: snegs;
return [comb, uflag, endPos - pos, true];
};
exportsnode_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 6:2 - Line 32:6), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 3:16 - Line 29:7)
;
const types = new Set(['!', '?', '+', '*', '@']);
const isExtglobType = (c) => types.has(c);
// Patterns that get prepended to bind to the start of either the
// entire string, or just a single path portion, to prevent dots
// and/or traversal patterns, when needed.
// Exts don't need the ^ or / bit, because the root binds that already.
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
const startNoDot = '(?!\\.)';
// characters that indicate a start of pattern needs the "no dots" bit,
// because a dot *might* be matched. ( is not in the list, because in
// the case of a child extglob, it will handle the prevention itself.
const addPatternStart = new Set(['[', '.']);
// cases where traversal is A-OK, no dot prevention needed
const justDots = new Set(['..', '.']);
const reSpecials = new Set('().*{}+?[]^$\\!');
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// any single thing other than /
const qmark = '[^/]';
// * => any number of characters
const star = qmark + '*?';
// use + when we need to ensure that *something* matches, because the * is
// the only thing in the path portion.
const starNoEmpty = qmark + '+?';
// remove the \ chars that we added if we end up doing a nonmagic compare
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
classnode_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 32:1 - Line 465:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 29:2 - Line 462:9)
class AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
// extglobs are inherently magical
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === '!' && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
/* c8 ignore start */
if (this.#hasMagic !== undefined)
return this.#hasMagic;
/* c8 ignore stop */
for (const p of this.#parts) {
if (typeof p === 'string')
continue;
if (p.type || p.hasMagic)
return (this.#hasMagic = true);
}
// note: will be undefined until we generate the regexp src and find out
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== undefined)
return this.#toString;
if (!this.type) {
return (this.#toString = this.#parts.map(p => String(p)).join(''));
}
else {
return (this.#toString =
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
}
}
#fillNegs() {
/* c8 ignore start */
if (this !== this.#root)
throw new Error('should only call on root');
if (this.#filledNegs)
return this;
/* c8 ignore stop */
// call toString() once to fill this out
this.toString();
this.#filledNegs = true;
let n;
while ((n = this.#negs.pop())) {
if (n.type !== '!')
continue;
// walk up the tree, appending everthing that comes AFTER parentIndex
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
/* c8 ignore start */
if (typeof part === 'string') {
throw new Error('string part in extglob AST??');
}
/* c8 ignore stop */
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === '')
continue;
/* c8 ignore start */
if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
throw new Error('invalid part: ' + p);
}
/* c8 ignore stop */
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null
? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
: [this.type, ...this.#parts.map(p => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() &&
(this === this.#root ||
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
// if (this.type) return !!this.#parent?.isStart()
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
// if everything AHEAD of this is a negation, then it's still the "start"
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof AST && pp.type === '!')) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === '!')
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
// if not root, it'll always have a parent
/* c8 ignore start */
const pl = this.#parent ? this.#parent.#parts.length : 0;
/* c8 ignore stop */
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === 'string')
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
// outside of a extglob, append until we find a start
let i = pos;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
ast.push(acc);
acc = '';
const ext = new AST(c, ast);
i = AST.#parseAST(str, ext, i, opt);
ast.push(ext);
continue;
}
acc += c;
}
ast.push(acc);
return i;
}
// some kind of extglob, pos is at the (
// find the next | or )
let i = pos + 1;
let part = new AST(null, ast);
const parts = [];
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === '(') {
part.push(acc);
acc = '';
const ext = new AST(c, part);
part.push(ext);
i = AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === '|') {
part.push(acc);
acc = '';
parts.push(part);
part = new AST(null, ast);
continue;
}
if (c === ')') {
if (acc === '' && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = '';
ast.push(...parts, part);
return i;
}
acc += c;
}
// unfinished extglob
// if we got here, it was a malformed extglob! not an extglob, but
// maybe something else in there.
ast.type = null;
ast.#hasMagic = undefined;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new AST(null, undefined, options);
AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
// should only be called on root
/* c8 ignore start */
if (this !== this.#root)
return this.#root.toMMPattern();
/* c8 ignore stop */
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
// if we're in nocase mode, and not nocaseMagicOnly, then we do
// still need a regular expression if we have to case-insensitively
// match capital/lowercase characters.
const anyMagic = hasMagic ||
this.#hasMagic ||
(this.#options.nocase &&
!this.#options.nocaseMagicOnly &&
glob.toUpperCase() !== glob.toLowerCase());
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob,
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() && this.isEnd();
const src = this.#parts
.map(p => {
const [re, _, hasMagic, uflag] = typeof p === 'string'
? AST.#parseGlob(p, this.#hasMagic, noEmpty)
: p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
})
.join('');
let start = '';
if (this.isStart()) {
if (typeof this.#parts[0] === 'string') {
// this is the string that will match the start of the pattern,
// so we need to protect against dots and such.
// '.' and '..' cannot match unless the pattern is that exactly,
// even if it starts with . or dot:true is set.
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
// check if we have a possibility of matching . or ..,
// and prevent that.
const needNoTrav =
// dots are allowed, and the pattern starts with [ or .
(dot && aps.has(src.charAt(0))) ||
// the pattern starts with \., and then [ or .
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
// the pattern starts with \.\., and then [ or .
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
// no need to prevent dots if it can't match a dot, or if a
// sub-pattern will be preventing it anyway.
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
}
}
}
// append the "end of path portion" pattern to negation tails
let end = '';
if (this.isEnd() &&
this.#root.#filledNegs &&
this.#parent?.type === '!') {
end = '(?:$|\\/)';
}
const final = start + src + end;
return [
final,
(node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 465:2 - Line 484:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 462:9 - Line 481:9)
(src),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
// We need to calculate the body *twice* if it's a repeat pattern
// at the start, once in nodot mode, then again in dot mode, so a
// pattern like *(?) can match 'x.y'
const repeated = this.type === '*' || this.type === '+';
// some kind of extglob
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
// invalid extglob, has to at least be *something* present, if it's
// the entire path portion.
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = undefined;
return [s, (node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 484:2 - Line 521:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 481:9 - Line 518:9)
(this.toString()), false, false];
}
// XXX abstract out this map method
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
? ''
: this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = '';
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
// an empty !() is exactly equivalent to a starNoEmpty
let final = '';
if (this.type === '!' && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
}
else {
const close = this.type === '!'
? // !() must match something,but !(x) can match ''
'))' +
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
star +
')'
: this.type === '@'
? ')'
: this.type === '?'
? ')?'
: this.type === '+' && bodyDotAllowed
? ')'
: this.type === '*' && bodyDotAllowed
? `)?`
: `)${this.type}`;
final = start + body + close;
}
return [
final,
(node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 521:2 - Line 564:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 518:9 - Line 561:11)
(body),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
#partsToRegExp(dot) {
return this.#parts
.map(p => {
// extglob ASTs should only contain parent ASTs
/* c8 ignore start */
if (typeof p === 'string') {
throw new Error('string type in extglob ast??');
}
/* c8 ignore stop */
// can ignore hasMagic, because extglobs are already always magic
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
})
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
.join('|');
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = '';
let uflag = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? '\\' : '') + c;
continue;
}
if (c === '\\') {
if (i === glob.length - 1) {
re += '\\\\';
}
else {
escaping = true;
}
continue;
}
if (c === '[') {
const [src, needUflag, consumed, magic] = (node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.js (Line 564:2 - Line 588:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.js (Line 561:11 - Line 585:9)
(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
continue;
}
}
if (c === '*') {
if (noEmpty && glob === '*')
re += starNoEmpty;
else
re += star;
hasMagic = true;
continue;
}
if (c === '?') {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, (node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.js (Line 2:1 - Line 302:2), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 1:1 - Line 301:2)
/**
* @fileoverview A utility for retrying failed async method calls.
*/
/* global setTimeout, clearTimeout */
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const MAX_TASK_TIMEOUT = 60000;
const MAX_TASK_DELAY = 100;
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#queue = [];
/**
* The timeout for the queue.
* @type {number}
*/
#timeout;
/**
* The maximum delay for the queue.
* @type {number}
*/
#maxDelay;
/**
* The setTimeout() timer ID.
* @type {NodeJS.Timeout|undefined}
*/
#timerId;
/**
* The function to call.
* @type {Function}
*/
#check;
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
*/
constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY } = {}) {
if (typeof check !== "function") {
throw new Error("Missing function to check errors");
}
this.#check = check;
this.#timeout = timeout;
this.#maxDelay = maxDelay;
}
/**
* Adds a new retry job to the queue.
* @param {Function} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<any>} A promise that resolves when the queue is
* processed.
*/
retry(fn, { signal } = {}) {
signal?.throwIfAborted();
let result;
try {
result = fn();
} catch (/** @type {any} */ error) {
return Promise.reject(new Error(`Synchronous error: ${error.message}`, { cause: error }));
}
// if the result is not a promise then reject an error
if (!result || typeof result.then !== "function") {
return Promise.reject(new Error("Result is not a promise."));
}
// call the original function and catch any ENFILE or EMFILE errors
// @ts-ignore because we know it's any
return Promise.resolve(result).catch(error => {
if (!this.#check(error)) {
throw error;
}
return new Promise((resolve, reject) => {
this.#queue.push(new RetryTask(fn, error, resolve, reject, signal));
signal?.addEventListener("abort", () => {
reject(signal.reason);
});
this.#processQueue();
});
});
}
/**
* Processes the queue.
* @returns {void}
*/
#processQueue() {
// clear any timer because we're going to check right now
clearTimeout(this.#timerId);
this.#timerId = undefined;
// if there's nothing in the queue, we're done
const task = this.#queue.shift();
if (!task) {
return;
}
const processAgain = () => {
this.#timerId = setTimeout(() => this.#processQueue(), 0);
};
// if it's time to bail, then bail
if (isTimeToBail(task, this.#timeout)) {
task.reject(task.error);
processAgain();
return;
}
// if it's not time to retry, then wait and try again
if (!isTimeToRetry(task, this.#maxDelay)) {
this.#queue.push(task);
processAgain();
return;
}
// otherwise, try again
task.lastAttempt = Date.now();
// Promise.resolve needed in case it's a thenable but not a Promise
Promise.resolve(task.fn())
// @ts-ignore because we know it's any
.then(result => task.resolve(result))
// @ts-ignore because we know it's any
.catch(error => {
if (!this.#check(error)) {
task.reject(error);
return;
}
// update the task timestamp and push to back of queue to try again
task.lastAttempt = Date.now();
this.#queue.push(task);
})
.finally(() => this.#processQueue());
}
}
export { Retrier };node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.cjs (Line 3:1 - Line 303:8), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 1:1 - Line 301:7)
/**
* @fileoverview A utility for retrying failed async method calls.
*/
/* global setTimeout, clearTimeout */
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const MAX_TASK_TIMEOUT = 60000;
const MAX_TASK_DELAY = 100;
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#queue = [];
/**
* The timeout for the queue.
* @type {number}
*/
#timeout;
/**
* The maximum delay for the queue.
* @type {number}
*/
#maxDelay;
/**
* The setTimeout() timer ID.
* @type {NodeJS.Timeout|undefined}
*/
#timerId;
/**
* The function to call.
* @type {Function}
*/
#check;
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
*/
constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY } = {}) {
if (typeof check !== "function") {
throw new Error("Missing function to check errors");
}
this.#check = check;
this.#timeout = timeout;
this.#maxDelay = maxDelay;
}
/**
* Adds a new retry job to the queue.
* @param {Function} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<any>} A promise that resolves when the queue is
* processed.
*/
retry(fn, { signal } = {}) {
signal?.throwIfAborted();
let result;
try {
result = fn();
} catch (/** @type {any} */ error) {
return Promise.reject(new Error(`Synchronous error: ${error.message}`, { cause: error }));
}
// if the result is not a promise then reject an error
if (!result || typeof result.then !== "function") {
return Promise.reject(new Error("Result is not a promise."));
}
// call the original function and catch any ENFILE or EMFILE errors
// @ts-ignore because we know it's any
return Promise.resolve(result).catch(error => {
if (!this.#check(error)) {
throw error;
}
return new Promise((resolve, reject) => {
this.#queue.push(new RetryTask(fn, error, resolve, reject, signal));
signal?.addEventListener("abort", () => {
reject(signal.reason);
});
this.#processQueue();
});
});
}
/**
* Processes the queue.
* @returns {void}
*/
#processQueue() {
// clear any timer because we're going to check right now
clearTimeout(this.#timerId);
this.#timerId = undefined;
// if there's nothing in the queue, we're done
const task = this.#queue.shift();
if (!task) {
return;
}
const processAgain = () => {
this.#timerId = setTimeout(() => this.#processQueue(), 0);
};
// if it's time to bail, then bail
if (isTimeToBail(task, this.#timeout)) {
task.reject(task.error);
processAgain();
return;
}
// if it's not time to retry, then wait and try again
if (!isTimeToRetry(task, this.#maxDelay)) {
this.#queue.push(task);
processAgain();
return;
}
// otherwise, try again
task.lastAttempt = Date.now();
// Promise.resolve needed in case it's a thenable but not a Promise
Promise.resolve(task.fn())
// @ts-ignore because we know it's any
.then(result => task.resolve(result))
// @ts-ignore because we know it's any
.catch(error => {
if (!this.#check(error)) {
task.reject(error);
return;
}
// update the task timestamp and push to back of queue to try again
task.lastAttempt = Date.now();
this.#queue.push(task);
})
.finally(() => this.#processQueue());
}
}
exportsnode_modules\resolve\test\resolver\nested_symlinks\mylib\sync.js (Line 1:1 - Line 12:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\nested_symlinks\mylib\sync.js (Line 1:1 - Line 12:2)
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
console.log(b, ': preserveSymlinks true');
console.log(c, ': preserveSymlinks false');
if (a !== b && a !== c) {
throw 'sync: no match';
}
console.log('sync: success! a matched either b or c\n');node_modules\resolve\test\resolver\nested_symlinks\mylib\async.js (Line 1:1 - Line 25:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver\nested_symlinks\mylib\async.js (Line 1:1 - Line 25:2)
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
var b;
var c;
var test = function test() {
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
console.log(b, ': preserveSymlinks true');
console.log(c, ': preserveSymlinks false');
if (a !== b && a !== c) {
throw 'async: no match';
}
console.log('async: success! a matched either b or c\n');
};
require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) {
if (err) { throw err; }
b = result.replace(process.cwd(), '$CWD');
if (b && c) { test(); }
});
require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) {
if (err) { throw err; }
c = result.replace(process.cwd(), '$CWD');
if (b && c) { test(); }
});node_modules\motion-dom\dist\es\effects\style\transform.mjs (Line 18:7 - Line 28:2), node_modules\framer-motion\dist\es\render\html\utils\build-transform.mjs (Line 26:13 - Line 36:3)
[key];
if (value === undefined)
continue;
let valueIsDefault = true;
if (typeof value === "number") {
valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
}
else {
valueIsDefault = parseFloat(value) === 0;
}
if (!valueIsDefault)node_modules\aria-query\lib\etc\roles\literal\tabpanelRole.js (Line 7:2 - Line 18:2), node_modules\aria-query\lib\etc\roles\literal\treegridRole.js (Line 7:2 - Line 18:2)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: []node_modules\aria-query\lib\etc\roles\literal\tabpanelRole.js (Line 9:5 - Line 20:2), node_modules\aria-query\lib\etc\roles\literal\timerRole.js (Line 9:6 - Line 20:2)
,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']node_modules\aria-query\lib\etc\roles\literal\tabpanelRole.js (Line 12:9 - Line 22:13), node_modules\aria-query\lib\etc\roles\literal\tooltipRole.js (Line 12:11 - Line 22:12)
],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = tabpanelRolenode_modules\aria-query\lib\etc\roles\literal\searchRole.js (Line 7:2 - Line 20:11), node_modules\aria-query\lib\etc\roles\literal\timerRole.js (Line 7:2 - Line 20:9)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark'node_modules\aria-query\lib\etc\roles\literal\noteRole.js (Line 7:2 - Line 22:9), node_modules\aria-query\lib\etc\roles\literal\timerRole.js (Line 7:2 - Line 22:12)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = noteRolenode_modules\aria-query\lib\etc\roles\literal\menuitemcheckboxRole.js (Line 7:2 - Line 27:2), node_modules\aria-query\lib\etc\roles\literal\menuitemradioRole.js (Line 7:2 - Line 27:2)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: true,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
name: 'menuitem'
},
module: 'ARIA'
}],
requireContextRole: ['group', 'menu', 'menubar'],
requiredContextRole: ['group', 'menu', 'menubar'],
requiredOwnedElements: [],
requiredProps: {
'aria-checked': null
},
superClass: [['roletype', 'widget', 'input', 'checkbox']node_modules\aria-query\lib\etc\roles\literal\menubarRole.js (Line 22:3 - Line 27:2), node_modules\aria-query\lib\etc\roles\literal\menuRole.js (Line 37:3 - Line 42:2)
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],
requiredProps: {},
superClass: [['roletype', 'widget', 'composite', 'select',node_modules\aria-query\lib\etc\roles\literal\marqueeRole.js (Line 7:2 - Line 22:12), node_modules\aria-query\lib\etc\roles\literal\treegridRole.js (Line 7:2 - Line 22:12)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = marqueeRolenode_modules\aria-query\lib\etc\roles\literal\mainRole.js (Line 18:5 - Line 27:9), node_modules\aria-query\lib\etc\roles\literal\navigationRole.js (Line 18:5 - Line 27:15)
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = mainRolenode_modules\aria-query\lib\etc\roles\literal\formRole.js (Line 9:6 - Line 21:7), node_modules\aria-query\lib\etc\roles\literal\regionRole.js (Line 9:5 - Line 21:10)
,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
attributes: [{
constraints: ['set'],
name: 'aria-label'
}],
name: 'form'node_modules\aria-query\lib\etc\roles\literal\formRole.js (Line 40:5 - Line 49:9), node_modules\aria-query\lib\etc\roles\literal\navigationRole.js (Line 18:5 - Line 27:15)
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = formRolenode_modules\aria-query\lib\etc\roles\literal\feedRole.js (Line 7:2 - Line 18:2), node_modules\aria-query\lib\etc\roles\literal\timerRole.js (Line 7:2 - Line 18:2)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [[node_modules\aria-query\lib\etc\roles\literal\contentinfoRole.js (Line 19:5 - Line 28:16), node_modules\aria-query\lib\etc\roles\literal\navigationRole.js (Line 18:5 - Line 27:15)
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = contentinfoRolenode_modules\aria-query\lib\etc\roles\literal\complementaryRole.js (Line 39:5 - Line 48:18), node_modules\aria-query\lib\etc\roles\literal\navigationRole.js (Line 18:5 - Line 27:15)
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = complementaryRolenode_modules\aria-query\lib\etc\roles\literal\comboboxRole.js (Line 80:7 - Line 99:12), node_modules\aria-query\lib\etc\roles\literal\comboboxRole.js (Line 68:7 - Line 87:6)
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'url'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['undefined'node_modules\aria-query\lib\etc\roles\literal\columnheaderRole.js (Line 42:6 - Line 47:17), node_modules\aria-query\lib\etc\roles\literal\rowheaderRole.js (Line 37:11 - Line 42:14)
],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]
};
var _default = exports.default = columnheaderRolenode_modules\aria-query\lib\etc\roles\literal\bannerRole.js (Line 7:2 - Line 18:9), node_modules\aria-query\lib\etc\roles\literal\contentinfoRole.js (Line 7:2 - Line 18:9)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
constraints: ['scoped to the body element'],
name: 'header'node_modules\aria-query\lib\etc\roles\literal\bannerRole.js (Line 19:5 - Line 28:11), node_modules\aria-query\lib\etc\roles\literal\navigationRole.js (Line 18:5 - Line 27:15)
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = bannerRolenode_modules\aria-query\lib\etc\roles\graphics\graphicsSymbolRole.js (Line 1:1 - Line 28:2), node_modules\aria-query\lib\etc\roles\literal\graphicsSymbolRole.js (Line 1:1 - Line 28:2)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var graphicsSymbolRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: true,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'img']]
};
var _default = exports.default = graphicsSymbolRole;node_modules\aria-query\lib\etc\roles\graphics\graphicsObjectRole.js (Line 1:1 - Line 47:2), node_modules\aria-query\lib\etc\roles\literal\graphicsObjectRole.js (Line 1:1 - Line 47:2)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var graphicsObjectRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
module: 'GRAPHICS',
concept: {
name: 'graphics-document'
}
}, {
module: 'ARIA',
concept: {
name: 'group'
}
}, {
module: 'ARIA',
concept: {
name: 'img'
}
}, {
module: 'GRAPHICS',
concept: {
name: 'graphics-symbol'
}
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'group']]
};
var _default = exports.default = graphicsObjectRole;node_modules\aria-query\lib\etc\roles\graphics\graphicsDocumentRole.js (Line 1:1 - Line 43:2), node_modules\aria-query\lib\etc\roles\literal\graphicsDocumentRole.js (Line 1:1 - Line 43:2)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var graphicsDocumentRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
module: 'GRAPHICS',
concept: {
name: 'graphics-object'
}
}, {
module: 'ARIA',
concept: {
name: 'img'
}
}, {
module: 'ARIA',
concept: {
name: 'article'
}
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'document']]
};
var _default = exports.default = graphicsDocumentRole;node_modules\aria-query\lib\etc\roles\dpub\docTipRole.js (Line 7:2 - Line 23:18), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'help [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docSubtitleRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'subtitle [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docQnaRole.js (Line 7:2 - Line 23:17), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'qna [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'prologue [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docPrefaceRole.js (Line 7:2 - Line 23:21), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'preface [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docPrefaceRole.js (Line 24:5 - Line 33:15), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docPrefaceRolenode_modules\aria-query\lib\etc\roles\dpub\docPartRole.js (Line 7:2 - Line 23:18), node_modules\aria-query\lib\etc\roles\literal\graphicsDocumentRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'part [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docPartRole.js (Line 24:5 - Line 33:12), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docPartRolenode_modules\aria-query\lib\etc\roles\dpub\docPagelistRole.js (Line 7:2 - Line 23:23), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'page-list [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docPagelistRole.js (Line 24:5 - Line 33:16), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 24:5 - Line 33:11)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]
};
var _default = exports.default = docPagelistRolenode_modules\aria-query\lib\etc\roles\dpub\docPagefooterRole.js (Line 7:2 - Line 30:18), node_modules\aria-query\lib\etc\roles\dpub\docPageheaderRole.js (Line 7:2 - Line 30:18)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['prohibited'],
prohibitedProps: [],
props: {
'aria-braillelabel': null,
'aria-brailleroledescription': null,
'aria-description': null,
'aria-disabled': null,
'aria-errormessage': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = docPagefooterRolenode_modules\aria-query\lib\etc\roles\dpub\docNoticeRole.js (Line 7:2 - Line 23:20), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'notice [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docNoticeRole.js (Line 24:5 - Line 33:14), node_modules\aria-query\lib\etc\roles\dpub\docTipRole.js (Line 24:5 - Line 33:11)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'note']]
};
var _default = exports.default = docNoticeRolenode_modules\aria-query\lib\etc\roles\dpub\docIntroductionRole.js (Line 7:2 - Line 23:26), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'introduction [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docIntroductionRole.js (Line 24:5 - Line 33:20), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docIntroductionRolenode_modules\aria-query\lib\etc\roles\dpub\docIndexRole.js (Line 7:2 - Line 23:19), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'index [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docIndexRole.js (Line 24:5 - Line 33:13), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 24:5 - Line 33:11)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]
};
var _default = exports.default = docIndexRolenode_modules\aria-query\lib\etc\roles\dpub\docGlossrefRole.js (Line 7:2 - Line 20:22), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 7:2 - Line 20:21)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'glossref [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docGlossrefRole.js (Line 21:5 - Line 30:16), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 21:5 - Line 30:15)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget', 'command', 'link']]
};
var _default = exports.default = docGlossrefRolenode_modules\aria-query\lib\etc\roles\dpub\docGlossaryRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'glossary [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docForewordRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'foreword [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docForewordRole.js (Line 24:5 - Line 33:16), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docForewordRolenode_modules\aria-query\lib\etc\roles\dpub\docFootnoteRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'footnote [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docExampleRole.js (Line 7:2 - Line 21:2), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 21:2)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: []node_modules\aria-query\lib\etc\roles\dpub\docExampleRole.js (Line 11:6 - Line 26:2), node_modules\aria-query\lib\etc\roles\literal\graphicsSymbolRole.js (Line 11:5 - Line 26:2)
,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']node_modules\aria-query\lib\etc\roles\dpub\docExampleRole.js (Line 17:16 - Line 28:15), node_modules\aria-query\lib\etc\roles\dpub\docPageheaderRole.js (Line 19:20 - Line 30:18)
: null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = docExampleRolenode_modules\aria-query\lib\etc\roles\dpub\docErrataRole.js (Line 7:2 - Line 23:20), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'errata [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docErrataRole.js (Line 24:5 - Line 33:14), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docErrataRolenode_modules\aria-query\lib\etc\roles\dpub\docEpilogueRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'epilogue [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docEpilogueRole.js (Line 24:5 - Line 33:16), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docEpilogueRolenode_modules\aria-query\lib\etc\roles\dpub\docEpigraphRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'epigraph [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docEndnotesRole.js (Line 7:2 - Line 23:23), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'rearnotes [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docEndnoteRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'rearnote [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docDedicationRole.js (Line 7:2 - Line 23:24), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'dedication [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docCreditsRole.js (Line 7:2 - Line 23:21), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'credits [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docCreditsRole.js (Line 24:5 - Line 33:15), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docCreditsRolenode_modules\aria-query\lib\etc\roles\dpub\docCreditRole.js (Line 7:2 - Line 23:20), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'credit [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docCoverRole.js (Line 7:2 - Line 23:19), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'cover [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docConclusionRole.js (Line 7:2 - Line 23:24), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'conclusion [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docConclusionRole.js (Line 24:5 - Line 33:18), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docConclusionRolenode_modules\aria-query\lib\etc\roles\dpub\docColophonRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'colophon [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docChapterRole.js (Line 7:2 - Line 23:21), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'chapter [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docChapterRole.js (Line 24:5 - Line 33:15), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docChapterRolenode_modules\aria-query\lib\etc\roles\dpub\docBibliorefRole.js (Line 7:2 - Line 20:23), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 7:2 - Line 20:21)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'biblioref [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docBibliorefRole.js (Line 21:5 - Line 30:17), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 21:5 - Line 30:15)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget', 'command', 'link']]
};
var _default = exports.default = docBibliorefRolenode_modules\aria-query\lib\etc\roles\dpub\docBibliographyRole.js (Line 7:2 - Line 23:26), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'bibliography [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docBiblioentryRole.js (Line 7:2 - Line 23:30), node_modules\aria-query\lib\etc\roles\literal\graphicsDocumentRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'EPUB biblioentry [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docBacklinkRole.js (Line 7:2 - Line 20:22), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 7:2 - Line 20:21)
= {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'referrer [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docBacklinkRole.js (Line 21:5 - Line 30:16), node_modules\aria-query\lib\etc\roles\dpub\docNoterefRole.js (Line 21:5 - Line 30:15)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget', 'command', 'link']]
};
var _default = exports.default = docBacklinkRolenode_modules\aria-query\lib\etc\roles\dpub\docAppendixRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'appendix [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docAppendixRole.js (Line 24:5 - Line 33:16), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docAppendixRolenode_modules\aria-query\lib\etc\roles\dpub\docAfterwordRole.js (Line 7:2 - Line 23:23), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'afterword [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docAfterwordRole.js (Line 24:5 - Line 33:17), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docAfterwordRolenode_modules\aria-query\lib\etc\roles\dpub\docAcknowledgmentsRole.js (Line 7:2 - Line 23:29), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'acknowledgments [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\dpub\docAcknowledgmentsRole.js (Line 24:5 - Line 33:23), node_modules\aria-query\lib\etc\roles\dpub\docPrologueRole.js (Line 24:5 - Line 33:16)
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docAcknowledgmentsRolenode_modules\aria-query\lib\etc\roles\dpub\docAbstractRole.js (Line 7:2 - Line 23:22), node_modules\aria-query\lib\etc\roles\dpub\docTocRole.js (Line 7:2 - Line 23:17)
= {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'abstract [EPUB-SSV]'node_modules\aria-query\lib\etc\roles\abstract\widgetRole.js (Line 8:5 - Line 20:2), node_modules\aria-query\lib\etc\roles\literal\noneRole.js (Line 8:6 - Line 20:2)
,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: [],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [[node_modules\aria-query\lib\etc\roles\abstract\structureRole.js (Line 7:2 - Line 22:14), node_modules\aria-query\lib\etc\roles\abstract\widgetRole.js (Line 7:2 - Line 22:11)
= {
abstract: true,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: [],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype']]
};
var _default = exports.default = structureRolenode_modules\aria-query\lib\etc\roles\abstract\sectionheadRole.js (Line 9:6 - Line 20:2), node_modules\aria-query\lib\etc\roles\literal\tooltipRole.js (Line 9:5 - Line 20:2)
,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure']node_modules\aria-query\lib\etc\roles\abstract\landmarkRole.js (Line 8:5 - Line 22:13), node_modules\aria-query\lib\etc\roles\literal\timerRole.js (Line 8:6 - Line 22:12)
,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = landmarkRolenode_modules\aria-query\lib\etc\roles\abstract\commandRole.js (Line 7:2 - Line 20:9), node_modules\aria-query\lib\etc\roles\abstract\landmarkRole.js (Line 7:2 - Line 20:12)
= {
abstract: true,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget'node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\ReferenceTracker.js (Line 1:1 - Line 36:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceTrackernode_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\predicates.js (Line 1:1 - Line 36:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotSemicolonTokennode_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\PatternMatcher.js (Line 1:1 - Line 36:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatternMatchernode_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\index.js (Line 1:1 - Line 13:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 13:19)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStarnode_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\astUtilities.js (Line 1:1 - Line 36:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isParenthesizednode_modules\@typescript-eslint\typescript-estree\node_modules\semver\classes\semver.js (Line 163:16 - Line 178:80), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\classes\semver.js (Line 139:21 - Line 154:13)
, i, a, b)
if (a === undefined && b === undefined) {
return 0
} else if (b === undefined) {
return 1
} else if (a === undefined) {
return -1
} else if (a === b) {
continue
} else {
return compareIdentifiers(a, b)
}
} while (++i)
}
// preminor will bump the version up to the next minor release, and immediatelynode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\gatherLogicalOperands.js (Line 1:1 - Line 36:22), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullishComparisonTypenode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\checkNullishAndReport.js (Line 1:1 - Line 36:22), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkNullishAndReportnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\analyzeChain.js (Line 1:1 - Line 36:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.analyzeChainnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\analyzeChain.js (Line 114:2 - Line 127:21), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\analyzeChain.js (Line 71:2 - Line 84:24)
&&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Undefined)) {
// we know the next operand is not an `undefined` check and that this
// operand includes `undefined` - which means that making this an
// optional chain would change the runtime behavior of the expression
return null;
}
return [operand];
}
case gatherLogicalOperands_1.NullishComparisonType.StrictEqualUndefinednode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\analyzeChain.js (Line 130:2 - Line 153:4), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-optional-chain-utils\analyzeChain.js (Line 88:2 - Line 105:6)
&&
(0, compareNodes_1.compareNodes)(operand.comparedName, nextOperand.comparedName) ===
compareNodes_1.NodeComparisonResult.Equal) {
return [operand, nextOperand];
}
if (includesType(parserServices, operand.comparedName, ts.TypeFlags.Null)) {
// we know the next operand is not a `null` check and that this
// operand includes `null` - which means that making this an
// optional chain would change the runtime behavior of the expression
return null;
}
return [operand];
}
default:
return null;
}
};
/**
* Returns the range that needs to be reported from the chain.
* @param chain The chain of logical expressions.
* @param boundary The boundary range that the range to report cannot fall outside.
* @param sourceCode The source code to get tokens.
* @returns The range to report.
*/node_modules\@typescript-eslint\eslint-plugin\dist\rules\enum-utils\shared.js (Line 1:1 - Line 36:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnumLiteralsnode_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic-type-checked.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Contains all of `stylistic`, along with additional stylistic rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic-type-checked-only.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
* @see {@link https://typescript-eslint.io/users/configs#strict}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked-only.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked-only.js (Line 54:38 - Line 88:36), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked.js (Line 87:46 - Line 121:44)
: 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/related-getter-setter-pairs': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: false,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNever: false,
allowNullish: false,
allowNumber: false,
allowRegExp: false,
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': [
'error',
'error-handling-correctness-only',
],
'@typescript-eslint/unbound-method'node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Recommended rules for code correctness that you can drop in without additional configuration.
* @see {@link https://typescript-eslint.io/users/configs#recommended}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended-type-checked.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended-type-checked.js (Line 47:52 - Line 61:45), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked.js (Line 66:52 - Line 80:25)
: 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types'node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended-type-checked-only.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\all.js (Line 1:1 - Line 17:4), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 1:1 - Line 17:4)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
* @see {@link https://typescript-eslint.io/users/configs#all}
*/node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\all.js (Line 107:46 - Line 122:46), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked.js (Line 60:46 - Line 75:43)
: 'error',
'@typescript-eslint/no-unnecessary-template-expression': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-type-assertion'node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic.js (Line 9:2 - Line 26:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic.js (Line 22:30 - Line 39:2)
,
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic-type-checked.js (Line 1:1 - Line 19:15), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic.js (Line 1:1 - Line 19:53)
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
module.exports = {
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'dot-notation'node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic-type-checked.js (Line 9:2 - Line 35:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\stylistic-type-checked.js (Line 22:43 - Line 48:2)
,
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'@typescript-eslint/prefer-find': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict.js (Line 9:2 - Line 47:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict.js (Line 22:27 - Line 60:2)
,
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{ minimumDescriptionLength: 10 },
],
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unified-signatures': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked.js (Line 9:2 - Line 113:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked.js (Line 22:40 - Line 126:2)
,
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
{ minimumDescriptionLength: 10 },
],
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-deprecated': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-misused-spread': 'error',
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-template-expression': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/related-getter-setter-pairs': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: false,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNever: false,
allowNullish: false,
allowNumber: false,
allowRegExp: false,
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': [
'error',
'error-handling-correctness-only',
],
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked-only.js (Line 9:2 - Line 78:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\strict-type-checked-only.js (Line 22:45 - Line 91:2)
,
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-deprecated': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-misused-spread': 'error',
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-template-expression': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/related-getter-setter-pairs': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: false,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNever: false,
allowNullish: false,
allowNumber: false,
allowRegExp: false,
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': [
'error',
'error-handling-correctness-only',
],
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended.js (Line 9:2 - Line 35:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended.js (Line 22:32 - Line 48:2)
,
rules: {
'@typescript-eslint/ban-ts-comment': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked.js (Line 9:2 - Line 62:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended-type-checked.js (Line 22:45 - Line 75:2)
,
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unbound-method': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked-only.js (Line 9:2 - Line 39:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\recommended-type-checked-only.js (Line 22:50 - Line 52:2)
,
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/unbound-method': 'error',
},
};node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\disable-type-checked.js (Line 9:2 - Line 71:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\disable-type-checked.js (Line 14:41 - Line 76:16)
,
rules: {
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/consistent-return': 'off',
'@typescript-eslint/consistent-type-exports': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-array-delete': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-deprecated': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-for-in-array': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-meaningless-void-operator': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-misused-spread': 'off',
'@typescript-eslint/no-mixed-enums': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unnecessary-qualifier': 'off',
'@typescript-eslint/no-unnecessary-template-expression': 'off',
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unnecessary-type-conversion': 'off',
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-type-assertion': 'off',
'@typescript-eslint/no-unsafe-unary-minus': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/prefer-destructuring': 'off',
'@typescript-eslint/prefer-find': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/prefer-return-this-type': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/related-getter-setter-pairs': 'off',
'@typescript-eslint/require-array-sort-compare': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/switch-exhaustiveness-check': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
},
}node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\all.js (Line 9:2 - Line 161:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\all.js (Line 22:24 - Line 174:2)
,
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'class-methods-use-this': 'off',
'@typescript-eslint/class-methods-use-this': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'consistent-return': 'off',
'@typescript-eslint/consistent-return': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'default-param-last': 'off',
'@typescript-eslint/default-param-last': 'error',
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'init-declarations': 'off',
'@typescript-eslint/init-declarations': 'error',
'max-params': 'off',
'@typescript-eslint/max-params': 'error',
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/method-signature-style': 'error',
'@typescript-eslint/naming-convention': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-deprecated': 'error',
'no-dupe-class-members': 'off',
'@typescript-eslint/no-dupe-class-members': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'no-invalid-this': 'off',
'@typescript-eslint/no-invalid-this': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
'no-loop-func': 'off',
'@typescript-eslint/no-loop-func': 'error',
'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-misused-spread': 'error',
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-require-imports': 'error',
'no-restricted-imports': 'off',
'@typescript-eslint/no-restricted-imports': 'error',
'@typescript-eslint/no-restricted-types': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-template-expression': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-type-assertion': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-useless-empty-export': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'prefer-destructuring': 'off',
'@typescript-eslint/prefer-destructuring': 'error',
'@typescript-eslint/prefer-enum-initializers': 'error',
'@typescript-eslint/prefer-find': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/prefer-readonly-parameter-types': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/related-getter-setter-pairs': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
},
};node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\dist\eslint-visitor-keys.cjs (Line 5:1 - Line 322:4), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 1:1 - Line 315:7)
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
const KEYS = {
ArrayExpression: [
"elements"
],
ArrayPattern: [
"elements"
],
ArrowFunctionExpression: [
"params",
"body"
],
AssignmentExpression: [
"left",
"right"
],
AssignmentPattern: [
"left",
"right"
],
AwaitExpression: [
"argument"
],
BinaryExpression: [
"left",
"right"
],
BlockStatement: [
"body"
],
BreakStatement: [
"label"
],
CallExpression: [
"callee",
"arguments"
],
CatchClause: [
"param",
"body"
],
ChainExpression: [
"expression"
],
ClassBody: [
"body"
],
ClassDeclaration: [
"id",
"superClass",
"body"
],
ClassExpression: [
"id",
"superClass",
"body"
],
ConditionalExpression: [
"test",
"consequent",
"alternate"
],
ContinueStatement: [
"label"
],
DebuggerStatement: [],
DoWhileStatement: [
"body",
"test"
],
EmptyStatement: [],
ExperimentalRestProperty: [
"argument"
],
ExperimentalSpreadProperty: [
"argument"
],
ExportAllDeclaration: [
"exported",
"source"
],
ExportDefaultDeclaration: [
"declaration"
],
ExportNamedDeclaration: [
"declaration",
"specifiers",
"source"
],
ExportSpecifier: [
"exported",
"local"
],
ExpressionStatement: [
"expression"
],
ForInStatement: [
"left",
"right",
"body"
],
ForOfStatement: [
"left",
"right",
"body"
],
ForStatement: [
"init",
"test",
"update",
"body"
],
FunctionDeclaration: [
"id",
"params",
"body"
],
FunctionExpression: [
"id",
"params",
"body"
],
Identifier: [],
IfStatement: [
"test",
"consequent",
"alternate"
],
ImportDeclaration: [
"specifiers",
"source"
],
ImportDefaultSpecifier: [
"local"
],
ImportExpression: [
"source"
],
ImportNamespaceSpecifier: [
"local"
],
ImportSpecifier: [
"imported",
"local"
],
JSXAttribute: [
"name",
"value"
],
JSXClosingElement: [
"name"
],
JSXClosingFragment: [],
JSXElement: [
"openingElement",
"children",
"closingElement"
],
JSXEmptyExpression: [],
JSXExpressionContainer: [
"expression"
],
JSXFragment: [
"openingFragment",
"children",
"closingFragment"
],
JSXIdentifier: [],
JSXMemberExpression: [
"object",
"property"
],
JSXNamespacedName: [
"namespace",
"name"
],
JSXOpeningElement: [
"name",
"attributes"
],
JSXOpeningFragment: [],
JSXSpreadAttribute: [
"argument"
],
JSXSpreadChild: [
"expression"
],
JSXText: [],
LabeledStatement: [
"label",
"body"
],
Literal: [],
LogicalExpression: [
"left",
"right"
],
MemberExpression: [
"object",
"property"
],
MetaProperty: [
"meta",
"property"
],
MethodDefinition: [
"key",
"value"
],
NewExpression: [
"callee",
"arguments"
],
ObjectExpression: [
"properties"
],
ObjectPattern: [
"properties"
],
PrivateIdentifier: [],
Program: [
"body"
],
Property: [
"key",
"value"
],
PropertyDefinition: [
"key",
"value"
],
RestElement: [
"argument"
],
ReturnStatement: [
"argument"
],
SequenceExpression: [
"expressions"
],
SpreadElement: [
"argument"
],
StaticBlock: [
"body"
],
Super: [],
SwitchCase: [
"test",
"consequent"
],
SwitchStatement: [
"discriminant",
"cases"
],
TaggedTemplateExpression: [
"tag",
"quasi"
],
TemplateElement: [],
TemplateLiteral: [
"quasis",
"expressions"
],
ThisExpression: [],
ThrowStatement: [
"argument"
],
TryStatement: [
"block",
"handler",
"finalizer"
],
UnaryExpression: [
"argument"
],
UpdateExpression: [
"argument"
],
VariableDeclaration: [
"declarations"
],
VariableDeclarator: [
"id",
"init"
],
WhileStatement: [
"test",
"body"
],
WithStatement: [
"object",
"body"
],
YieldExpression: [
"argument"
]
};
// Types.
const NODE_TYPES = Object.keys(KEYS);
// Freeze the keys.
for (const type of NODE_TYPES) {
Object.freeze(KEYS[type]);
}
Object.freeze(KEYS);
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\dist\eslint-visitor-keys.cjs (Line 360:1 - Line 382:8), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\index.js (Line 43:2 - Line 65:7)
function unionWith(additionalKeys) {
const retv = /** @type {{
[type: string]: ReadonlyArray<string>
}} */ (Object.assign({}, KEYS));
for (const type of Object.keys(additionalKeys)) {
if (Object.prototype.hasOwnProperty.call(retv, type)) {
const keys = new Set(additionalKeys[type]);
for (const key of retv[type]) {
keys.add(key);
}
retv[type] = Object.freeze(Array.from(keys));
} else {
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
}
}
return Object.freeze(retv);
}
exportsnode_modules\@babel\types\lib\modifications\flow\removeTypeDuplicates.js (Line 1:1 - Line 9:2), node_modules\@babel\types\lib\modifications\typescript\removeTypeDuplicates.js (Line 1:1 - Line 9:2)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = removeTypeDuplicates;
var _index = require("../../validators/generated/index.js");
function getQualifiedName(node) {
return (0, _index.isIdentifier)(node) ? node.name : `node_modules\@babel\types\lib\modifications\flow\removeTypeDuplicates.js (Line 9:14 - Line 23:20), node_modules\@babel\types\lib\modifications\typescript\removeTypeDuplicates.js (Line 9:5 - Line 23:15)
)}`;
}
function removeTypeDuplicates(nodesIn) {
const nodes = Array.from(nodesIn);
const generics = new Map();
const bases = new Map();
const typeGroups = new Set();
const types = [];
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
if (!node) continue;
if (types.includes(node)) {
continue;
}
if ((0, _index.isAnyTypeAnnotationnode_modules\@babel\types\lib\modifications\flow\removeTypeDuplicates.js (Line 47:15 - Line 65:49), node_modules\@babel\types\lib\modifications\typescript\removeTypeDuplicates.js (Line 48:14 - Line 66:49)
;
}
} else {
generics.set(name, node);
}
continue;
}
types.push(node);
}
for (const [, baseType] of bases) {
types.push(baseType);
}
for (const [, genericName] of generics) {
types.push(genericName);
}
return types;
}
//# sourceMappingURL=removeTypeDuplicates.js.mapnode_modules\@babel\core\lib\config\validation\option-assertions.js (Line 169:10 - Line 179:60), node_modules\@babel\core\lib\config\validation\option-assertions.js (Line 145:10 - Line 155:57)
) {
return value;
}
if (Array.isArray(value)) {
value.forEach((item, i) => {
if (!checkValidTest(item)) {
throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
}
});
} else if (!checkValidTest(value)) {
throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp `node_modules\@babel\core\lib\config\files\configuration.js (Line 205:2 - Line 213:5), node_modules\@babel\core\lib\config\files\plugins.js (Line 120:2 - Line 128:3)
(((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
paths: [b]
}, M = require("module")) => {
let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
if (f) return f;
f = new Error(`Cannot resolve module '${r}'`);
f.code = "MODULE_NOT_FOUND";
throw f;
})(namenode_modules\vite\node_modules\fdir\dist\index.cjs (Line 48:2 - Line 60:2), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 30:5 - Line 42:9)
, pathSeparator);
}
//#endregion
//#region src/api/functions/join-path.ts
function joinPathWithBasePath(filename, directoryPath) {
return directoryPath + filename;
}
function joinPathWithRelativePath(root, options) {
return function(filename, directoryPath) {
const sameRoot = directoryPath.startsWith(root);
if (sameRoot) return directoryPath.slice(root.length) + filename;
else return convertSlashes((node_modules\vite\node_modules\fdir\dist\index.cjs (Line 60:2 - Line 91:6), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 42:9 - Line 73:5)
(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
};
}
function joinPath(filename) {
return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
return directoryPath + filename + separator;
}
function build$7(root, options) {
const { relativePaths, includeBasePath } = options;
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
}
//#endregion
//#region src/api/functions/push-directory.ts
function pushDirectoryWithRelativePath(root) {
return function(directoryPath, paths) {
paths.push(directoryPath.substring(root.length) || ".");
};
}
function pushDirectoryFilterWithRelativePath(root) {
return function(directoryPath, paths, filters) {
const relativePath = directoryPath.substring(root.length) || ".";
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
};
}
const pushDirectory = (directoryPath, paths) => {
paths.push(directoryPath || ".");
};
const pushDirectoryFilter = (directoryPath, paths, filters) => {
const path$node_modules\vite\node_modules\fdir\dist\index.cjs (Line 92:2 - Line 153:6), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 74:5 - Line 135:5)
);
};
const empty$2 = () => {};
function build$6(root, options) {
const { includeDirs, filters, relativePaths } = options;
if (!includeDirs) return empty$2;
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
}
//#endregion
//#region src/api/functions/push-file.ts
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
if (filters.every((filter) => filter(filename, false))) counts.files++;
};
const pushFileFilter = (filename, paths, _counts, filters) => {
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
};
const pushFileCount = (_filename, _paths, counts, _filters) => {
counts.files++;
};
const pushFile = (filename, paths) => {
paths.push(filename);
};
const empty$1 = () => {};
function build$5(options) {
const { excludeFiles, filters, onlyCounts } = options;
if (excludeFiles) return empty$1;
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
else if (onlyCounts) return pushFileCount;
else return pushFile;
}
//#endregion
//#region src/api/functions/get-array.ts
const getArray = (paths) => {
return paths;
};
const getArrayGroup = () => {
return [""].slice(0, 0);
};
function build$4(options) {
return options.group ? getArrayGroup : getArray;
}
//#endregion
//#region src/api/functions/group-files.ts
const groupFiles = (groups, directory, files) => {
groups.push({
directory,
files,
dir: directory
});
};
const empty = () => {};
function build$3(options) {
return options.group ? groupFiles : empty;
}
//#endregion
//#region src/api/functions/resolve-symlink.ts
const resolveSymlinksAsync = function(path$node_modules\vite\node_modules\fdir\dist\index.cjs (Line 172:2 - Line 182:6), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 154:5 - Line 164:5)
, resolvedPath, state)) return;
callback$1(stat, resolvedPath);
} catch (e) {
if (!suppressErrors) throw e;
}
};
function build$2(options, isSynchronous) {
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
}
function isRecursive(path$node_modules\vite\node_modules\fdir\dist\index.cjs (Line 184:2 - Line 190:2), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 166:5 - Line 172:8)
);
let depth = 1;
while (parent !== state.root && depth < 2) {
const resolvedPath = state.symlinks.get(parent);
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
if (isSameRoot) depth++;
else parent = (node_modules\vite\node_modules\fdir\dist\index.cjs (Line 192:2 - Line 247:2), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 174:5 - Line 229:2)
, resolved);
return depth > 1;
}
function isRecursiveUsingRealPaths(resolved, state) {
return state.visited.includes(resolved + state.options.pathSeparator);
}
//#endregion
//#region src/api/functions/invoke-callback.ts
const onlyCountsSync = (state) => {
return state.counts;
};
const groupsSync = (state) => {
return state.groups;
};
const defaultSync = (state) => {
return state.paths;
};
const limitFilesSync = (state) => {
return state.paths.slice(0, state.options.maxFiles);
};
const onlyCountsAsync = (state, error, callback$1) => {
report(error, callback$1, state.counts, state.options.suppressErrors);
return null;
};
const defaultAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths, state.options.suppressErrors);
return null;
};
const limitFilesAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
return null;
};
const groupsAsync = (state, error, callback$1) => {
report(error, callback$1, state.groups, state.options.suppressErrors);
return null;
};
function report(error, callback$1, output, suppressErrors) {
if (error && !suppressErrors) callback$1(error, output);
else callback$1(null, output);
}
function build$1(options, isSynchronous) {
const { onlyCounts, group, maxFiles } = options;
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
else if (group) return isSynchronous ? groupsSync : groupsAsync;
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
else return isSynchronous ? defaultSync : defaultAsync;
}
//#endregion
//#region src/api/functions/walk-directory.ts
const readdirOpts = { withFileTypes: true };
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
state.queue.enqueue();
if (currentDepth < 0) return state.queue.dequeue(null, state);
const { fs:node_modules\vite\node_modules\fdir\dist\index.cjs (Line 250:3 - Line 256:2), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 232:2 - Line 238:2)
readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
callback$1(entries, directoryPath, currentDepth);
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
});
};
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
const { fs:node_modules\vite\node_modules\fdir\dist\index.cjs (Line 262:3 - Line 366:3), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 244:2 - Line 348:9)
readdirSync(crawlPath || ".", readdirOpts);
} catch (e) {
if (!state.options.suppressErrors) throw e;
}
callback$1(entries, directoryPath, currentDepth);
};
function build(isSynchronous) {
return isSynchronous ? walkSync : walkAsync;
}
//#endregion
//#region src/api/queue.ts
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
var Queue = class {
count = 0;
constructor(onQueueEmpty) {
this.onQueueEmpty = onQueueEmpty;
}
enqueue() {
this.count++;
return this.count;
}
dequeue(error, output) {
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
this.onQueueEmpty(error, output);
if (error) {
output.controller.abort();
this.onQueueEmpty = void 0;
}
}
}
};
//#endregion
//#region src/api/counter.ts
var Counter = class {
_files = 0;
_directories = 0;
set files(num) {
this._files = num;
}
get files() {
return this._files;
}
set directories(num) {
this._directories = num;
}
get directories() {
return this._directories;
}
/**
* @deprecated use `directories` instead
*/
/* c8 ignore next 3 */
get dirs() {
return this._directories;
}
};
//#endregion
//#region src/api/aborter.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
var Aborter = class {
aborted = false;
abort() {
this.aborted = true;
}
};
//#endregion
//#region src/api/walker.ts
var Walker = class {
root;
isSynchronous;
state;
joinPath;
pushDirectory;
pushFile;
getArray;
groupFiles;
resolveSymlink;
walkDirectory;
callbackInvoker;
constructor(root, options, callback$1) {
this.isSynchronous = !callback$1;
this.callbackInvoker = build$1(options, this.isSynchronous);
this.root = normalizePath(root, options);
this.state = {
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
paths: [""].slice(0, 0),
groups: [],
counts: new Counter(),
options,
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
symlinks: /* @__PURE__ */ new Map(),
visited: [""].slice(0, 0),
controller: new Aborter(),
fs: options.fs || fsnode_modules\vite\node_modules\fdir\dist\index.cjs (Line 367:3 - Line 391:6), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 349:3 - Line 373:5)
};
this.joinPath = build$7(this.root, options);
this.pushDirectory = build$6(this.root, options);
this.pushFile = build$5(options);
this.getArray = build$4(options);
this.groupFiles = build$3(options);
this.resolveSymlink = build$2(options, this.isSynchronous);
this.walkDirectory = build(this.isSynchronous);
}
start() {
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
}
walk = (entries, directoryPath, depth) => {
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
const files = this.getArray(this.state.paths);
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
const filename = this.joinPath(entry.name, directoryPath);
this.pushFile(filename, files, this.state.counts, filters);
} else if (entry.isDirectory()) {
let path$node_modules\vite\node_modules\fdir\dist\index.cjs (Line 405:2 - Line 461:8), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 387:8 - Line 443:10)
(resolvedPath), this.state.options);
resolvedPath = this.joinPath(filename, directoryPath$1);
this.pushFile(resolvedPath, files, this.state.counts, filters);
}
});
}
}
this.groupFiles(this.state.groups, directoryPath, files);
};
};
//#endregion
//#region src/api/async.ts
function promise(root, options) {
return new Promise((resolve$1, reject) => {
callback(root, options, (err, output) => {
if (err) return reject(err);
resolve$1(output);
});
});
}
function callback(root, options, callback$1) {
let walker = new Walker(root, options, callback$1);
walker.start();
}
//#endregion
//#region src/api/sync.ts
function sync(root, options) {
const walker = new Walker(root, options);
return walker.start();
}
//#endregion
//#region src/builder/api-builder.ts
var APIBuilder = class {
constructor(root, options) {
this.root = root;
this.options = options;
}
withPromise() {
return promise(this.root, this.options);
}
withCallback(cb) {
callback(this.root, this.options, cb);
}
sync() {
return sync(this.root, this.options);
}
};
//#endregion
//#region src/builder/index.ts
let pm = null;
/* c8 ignore next 6 */
try {
requirenode_modules\vite\node_modules\fdir\dist\index.cjs (Line 469:2 - Line 582:6), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 451:2 - Line 564:5)
sep,
filters: []
};
globFunction;
constructor(options) {
this.options = {
...this.options,
...options
};
this.globFunction = this.options.globFunction;
}
group() {
this.options.group = true;
return this;
}
withPathSeparator(separator) {
this.options.pathSeparator = separator;
return this;
}
withBasePath() {
this.options.includeBasePath = true;
return this;
}
withRelativePaths() {
this.options.relativePaths = true;
return this;
}
withDirs() {
this.options.includeDirs = true;
return this;
}
withMaxDepth(depth) {
this.options.maxDepth = depth;
return this;
}
withMaxFiles(limit) {
this.options.maxFiles = limit;
return this;
}
withFullPaths() {
this.options.resolvePaths = true;
this.options.includeBasePath = true;
return this;
}
withErrors() {
this.options.suppressErrors = false;
return this;
}
withSymlinks({ resolvePaths = true } = {}) {
this.options.resolveSymlinks = true;
this.options.useRealPaths = resolvePaths;
return this.withFullPaths();
}
withAbortSignal(signal) {
this.options.signal = signal;
return this;
}
normalize() {
this.options.normalizePath = true;
return this;
}
filter(predicate) {
this.options.filters.push(predicate);
return this;
}
onlyDirs() {
this.options.excludeFiles = true;
this.options.includeDirs = true;
return this;
}
exclude(predicate) {
this.options.exclude = predicate;
return this;
}
onlyCounts() {
this.options.onlyCounts = true;
return this;
}
crawl(root) {
return new APIBuilder(root || ".", this.options);
}
withGlobFunction(fn) {
this.globFunction = fn;
return this;
}
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
/* c8 ignore next 4 */
crawlWithOptions(root, options) {
this.options = {
...this.options,
...options
};
return new APIBuilder(root || ".", this.options);
}
glob(...patterns) {
if (this.globFunction) return this.globWithOptions(patterns);
return this.globWithOptions(patterns, ...[{ dot: true }]);
}
globWithOptions(patterns, ...options) {
const globFn = this.globFunction || pm;
/* c8 ignore next 5 */
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
var isMatch = this.globCache[patterns.join("\0")];
if (!isMatch) {
isMatch = globFn(patterns, ...options);
this.globCache[patterns.join("\0")] = isMatch;
}
this.options.filters.push((path$node_modules\vite\dist\node\chunks\dep-lCKrEJQm.js (Line 12:2 - Line 27:4), node_modules\vite\node_modules\fdir\dist\index.cjs (Line 7:15 - Line 23:13)
;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i];
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
varnode_modules\tsconfig-paths\lib\__tests__\data\match-path-data.js (Line 83:2 - Line 90:49), node_modules\tsconfig-paths\lib\__tests__\data\match-path-data.js (Line 19:9 - Line 26:57)
},
existingFiles: [(0, path_1.join)("/root", "location", "mylib", "index.ts")],
requestedModule: "lib/mylib",
expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")),
extensions: defaultExtensionsWhenRunningInTsNode,
},
{
name: "should resolve from main field in package.json"node_modules\tinyglobby\node_modules\picomatch\lib\utils.js (Line 1:1 - Line 72:2), node_modules\vite\node_modules\picomatch\lib\utils.js (Line 1:1 - Line 72:2)
/*global navigator*/
'use strict';
const {
REGEX_BACKSLASH,
REGEX_REMOVE_BACKSLASH,
REGEX_SPECIAL_CHARS,
REGEX_SPECIAL_CHARS_GLOBAL
} = require('./constants');
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
exports.isWindows = () => {
if (typeof navigator !== 'undefined' && navigator.platform) {
const platform = navigator.platform.toLowerCase();
return platform === 'win32' || platform === 'windows';
}
if (typeof process !== 'undefined' && process.platform) {
return process.platform === 'win32';
}
return false;
};
exports.removeBackslashes = str => {
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
return match === '\\' ? '' : match;
});
};
exports.escapeLast = (input, char, lastIdx) => {
const idx = input.lastIndexOf(char, lastIdx);
if (idx === -1) return input;
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
};
exports.removePrefix = (input, state = {}) => {
let output = input;
if (output.startsWith('./')) {
output = output.slice(2);
state.prefix = './';
}
return output;
};
exports.wrapOutput = (input, state = {}, options = {}) => {
const prepend = options.contains ? '' : '^';
const append = options.contains ? '' : '$';
let output = `${prepend}(?:${input})${append}`;
if (state.negated === true) {
output = `(?:^(?!${output}).*$)`;
}
return output;
};
exports.basename = (path, { windows } = {}) => {
const segs = path.split(windows ? /[\\/]/ : '/');
const last = segs[segs.length - 1];
if (last === '') {
return segs[segs.length - 2];
}
return last;
};node_modules\tinyglobby\node_modules\picomatch\lib\scan.js (Line 1:1 - Line 391:2), node_modules\vite\node_modules\picomatch\lib\scan.js (Line 1:1 - Line 391:2)
'use strict';
const utils = require('./utils');
const {
CHAR_ASTERISK, /* * */
CHAR_AT, /* @ */
CHAR_BACKWARD_SLASH, /* \ */
CHAR_COMMA, /* , */
CHAR_DOT, /* . */
CHAR_EXCLAMATION_MARK, /* ! */
CHAR_FORWARD_SLASH, /* / */
CHAR_LEFT_CURLY_BRACE, /* { */
CHAR_LEFT_PARENTHESES, /* ( */
CHAR_LEFT_SQUARE_BRACKET, /* [ */
CHAR_PLUS, /* + */
CHAR_QUESTION_MARK, /* ? */
CHAR_RIGHT_CURLY_BRACE, /* } */
CHAR_RIGHT_PARENTHESES, /* ) */
CHAR_RIGHT_SQUARE_BRACKET /* ] */
} = require('./constants');
const isPathSeparator = code => {
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
};
const depth = token => {
if (token.isPrefix !== true) {
token.depth = token.isGlobstar ? Infinity : 1;
}
};
/**
* Quickly scans a glob pattern and returns an object with a handful of
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
*
* ```js
* const pm = require('picomatch');
* console.log(pm.scan('foo/bar/*.js'));
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {Object} Returns an object with tokens and regex source string.
* @api public
*/
const scan = (input, options) => {
const opts = options || {};
const length = input.length - 1;
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
const slashes = [];
const tokens = [];
const parts = [];
let str = input;
let index = -1;
let start = 0;
let lastIndex = 0;
let isBrace = false;
let isBracket = false;
let isGlob = false;
let isExtglob = false;
let isGlobstar = false;
let braceEscaped = false;
let backslashes = false;
let negated = false;
let negatedExtglob = false;
let finished = false;
let braces = 0;
let prev;
let code;
let token = { value: '', depth: 0, isGlob: false };
const eos = () => index >= length;
const peek = () => str.charCodeAt(index + 1);
const advance = () => {
prev = code;
return str.charCodeAt(++index);
};
while (index < length) {
code = advance();
let next;
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
if (code === CHAR_LEFT_CURLY_BRACE) {
braceEscaped = true;
}
continue;
}
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
braces++;
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (code === CHAR_LEFT_CURLY_BRACE) {
braces++;
continue;
}
if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (braceEscaped !== true && code === CHAR_COMMA) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_RIGHT_CURLY_BRACE) {
braces--;
if (braces === 0) {
braceEscaped = false;
isBrace = token.isBrace = true;
finished = true;
break;
}
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_FORWARD_SLASH) {
slashes.push(index);
tokens.push(token);
token = { value: '', depth: 0, isGlob: false };
if (finished === true) continue;
if (prev === CHAR_DOT && index === (start + 1)) {
start += 2;
continue;
}
lastIndex = index + 1;
continue;
}
if (opts.noext !== true) {
const isExtglobChar = code === CHAR_PLUS
|| code === CHAR_AT
|| code === CHAR_ASTERISK
|| code === CHAR_QUESTION_MARK
|| code === CHAR_EXCLAMATION_MARK;
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
isExtglob = token.isExtglob = true;
finished = true;
if (code === CHAR_EXCLAMATION_MARK && index === start) {
negatedExtglob = true;
}
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
isGlob = token.isGlob = true;
finished = true;
break;
}
}
continue;
}
break;
}
}
if (code === CHAR_ASTERISK) {
if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_QUESTION_MARK) {
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_LEFT_SQUARE_BRACKET) {
while (eos() !== true && (next = advance())) {
if (next === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
isBracket = token.isBracket = true;
isGlob = token.isGlob = true;
finished = true;
break;
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
negated = token.negated = true;
start++;
continue;
}
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_LEFT_PARENTHESES) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
finished = true;
break;
}
}
continue;
}
break;
}
if (isGlob === true) {
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
}
if (opts.noext === true) {
isExtglob = false;
isGlob = false;
}
let base = str;
let prefix = '';
let glob = '';
if (start > 0) {
prefix = str.slice(0, start);
str = str.slice(start);
lastIndex -= start;
}
if (base && isGlob === true && lastIndex > 0) {
base = str.slice(0, lastIndex);
glob = str.slice(lastIndex);
} else if (isGlob === true) {
base = '';
glob = str;
} else {
base = str;
}
if (base && base !== '' && base !== '/' && base !== str) {
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
base = base.slice(0, -1);
}
}
if (opts.unescape === true) {
if (glob) glob = utils.removeBackslashes(glob);
if (base && backslashes === true) {
base = utils.removeBackslashes(base);
}
}
const state = {
prefix,
input,
start,
base,
glob,
isBrace,
isBracket,
isGlob,
isExtglob,
isGlobstar,
negated,
negatedExtglob
};
if (opts.tokens === true) {
state.maxDepth = 0;
if (!isPathSeparator(code)) {
tokens.push(token);
}
state.tokens = tokens;
}
if (opts.parts === true || opts.tokens === true) {
let prevIndex;
for (let idx = 0; idx < slashes.length; idx++) {
const n = prevIndex ? prevIndex + 1 : start;
const i = slashes[idx];
const value = input.slice(n, i);
if (opts.tokens) {
if (idx === 0 && start !== 0) {
tokens[idx].isPrefix = true;
tokens[idx].value = prefix;
} else {
tokens[idx].value = value;
}
depth(tokens[idx]);
state.maxDepth += tokens[idx].depth;
}
if (idx !== 0 || value !== '') {
parts.push(value);
}
prevIndex = i;
}
if (prevIndex && prevIndex + 1 < input.length) {
const value = input.slice(prevIndex + 1);
parts.push(value);
if (opts.tokens) {
tokens[tokens.length - 1].value = value;
depth(tokens[tokens.length - 1]);
state.maxDepth += tokens[tokens.length - 1].depth;
}
}
state.slashes = slashes;
state.parts = parts;
}
return state;
};
module.exports = scan;node_modules\tinyglobby\node_modules\picomatch\lib\picomatch.js (Line 1:1 - Line 341:2), node_modules\vite\node_modules\picomatch\lib\picomatch.js (Line 1:1 - Line 341:2)
'use strict';
const scan = require('./scan');
const parse = require('./parse');
const utils = require('./utils');
const constants = require('./constants');
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
/**
* Creates a matcher function from one or more glob patterns. The
* returned function takes a string to match as its first argument,
* and returns true if the string is a match. The returned matcher
* function also takes a boolean as the second argument that, when true,
* returns an object with additional information.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch(glob[, options]);
*
* const isMatch = picomatch('*.!(*a)');
* console.log(isMatch('a.a')); //=> false
* console.log(isMatch('a.b')); //=> true
* ```
* @name picomatch
* @param {String|Array} `globs` One or more glob patterns.
* @param {Object=} `options`
* @return {Function=} Returns a matcher function.
* @api public
*/
const picomatch = (glob, options, returnState = false) => {
if (Array.isArray(glob)) {
const fns = glob.map(input => picomatch(input, options, returnState));
const arrayMatcher = str => {
for (const isMatch of fns) {
const state = isMatch(str);
if (state) return state;
}
return false;
};
return arrayMatcher;
}
const isState = isObject(glob) && glob.tokens && glob.input;
if (glob === '' || (typeof glob !== 'string' && !isState)) {
throw new TypeError('Expected pattern to be a non-empty string');
}
const opts = options || {};
const posix = opts.windows;
const regex = isState
? picomatch.compileRe(glob, options)
: picomatch.makeRe(glob, options, false, true);
const state = regex.state;
delete regex.state;
let isIgnored = () => false;
if (opts.ignore) {
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
}
const matcher = (input, returnObject = false) => {
const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
const result = { glob, state, regex, posix, input, output, match, isMatch };
if (typeof opts.onResult === 'function') {
opts.onResult(result);
}
if (isMatch === false) {
result.isMatch = false;
return returnObject ? result : false;
}
if (isIgnored(input)) {
if (typeof opts.onIgnore === 'function') {
opts.onIgnore(result);
}
result.isMatch = false;
return returnObject ? result : false;
}
if (typeof opts.onMatch === 'function') {
opts.onMatch(result);
}
return returnObject ? result : true;
};
if (returnState) {
matcher.state = state;
}
return matcher;
};
/**
* Test `input` with the given `regex`. This is used by the main
* `picomatch()` function to test the input string.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.test(input, regex[, options]);
*
* console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
* // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
* ```
* @param {String} `input` String to test.
* @param {RegExp} `regex`
* @return {Object} Returns an object with matching info.
* @api public
*/
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
if (typeof input !== 'string') {
throw new TypeError('Expected input to be a string');
}
if (input === '') {
return { isMatch: false, output: '' };
}
const opts = options || {};
const format = opts.format || (posix ? utils.toPosixSlashes : null);
let match = input === glob;
let output = (match && format) ? format(input) : input;
if (match === false) {
output = format ? format(input) : input;
match = output === glob;
}
if (match === false || opts.capture === true) {
if (opts.matchBase === true || opts.basename === true) {
match = picomatch.matchBase(input, regex, options, posix);
} else {
match = regex.exec(output);
}
}
return { isMatch: Boolean(match), match, output };
};
/**
* Match the basename of a filepath.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.matchBase(input, glob[, options]);
* console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
* ```
* @param {String} `input` String to test.
* @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
* @return {Boolean}
* @api public
*/
picomatch.matchBase = (input, glob, options) => {
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
return regex.test(utils.basename(input));
};
/**
* Returns true if **any** of the given glob `patterns` match the specified `string`.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.isMatch(string, patterns[, options]);
*
* console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
* console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
* ```
* @param {String|Array} str The string to test.
* @param {String|Array} patterns One or more glob patterns to use for matching.
* @param {Object} [options] See available [options](#options).
* @return {Boolean} Returns true if any patterns match `str`
* @api public
*/
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
/**
* Parse a glob pattern to create the source string for a regular
* expression.
*
* ```js
* const picomatch = require('picomatch');
* const result = picomatch.parse(pattern[, options]);
* ```
* @param {String} `pattern`
* @param {Object} `options`
* @return {Object} Returns an object with useful properties and output to be used as a regex source string.
* @api public
*/
picomatch.parse = (pattern, options) => {
if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
return parse(pattern, { ...options, fastpaths: false });
};
/**
* Scan a glob pattern to separate the pattern into segments.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.scan(input[, options]);
*
* const result = picomatch.scan('!./foo/*.js');
* console.log(result);
* { prefix: '!./',
* input: '!./foo/*.js',
* start: 3,
* base: 'foo',
* glob: '*.js',
* isBrace: false,
* isBracket: false,
* isGlob: true,
* isExtglob: false,
* isGlobstar: false,
* negated: true }
* ```
* @param {String} `input` Glob pattern to scan.
* @param {Object} `options`
* @return {Object} Returns an object with
* @api public
*/
picomatch.scan = (input, options) => scan(input, options);
/**
* Compile a regular expression from the `state` object returned by the
* [parse()](#parse) method.
*
* @param {Object} `state`
* @param {Object} `options`
* @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
* @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
* @return {RegExp}
* @api public
*/
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
if (returnOutput === true) {
return state.output;
}
const opts = options || {};
const prepend = opts.contains ? '' : '^';
const append = opts.contains ? '' : '$';
let source = `${prepend}(?:${state.output})${append}`;
if (state && state.negated === true) {
source = `^(?!${source}).*$`;
}
const regex = picomatch.toRegex(source, options);
if (returnState === true) {
regex.state = state;
}
return regex;
};
/**
* Create a regular expression from a parsed glob pattern.
*
* ```js
* const picomatch = require('picomatch');
* const state = picomatch.parse('*.js');
* // picomatch.compileRe(state[, options]);
*
* console.log(picomatch.compileRe(state));
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
* ```
* @param {String} `state` The object returned from the `.parse` method.
* @param {Object} `options`
* @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
* @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
* @return {RegExp} Returns a regex created from the given pattern.
* @api public
*/
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
if (!input || typeof input !== 'string') {
throw new TypeError('Expected a non-empty string');
}
let parsed = { negated: false, fastpaths: true };
if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
parsed.output = parse.fastpaths(input, options);
}
if (!parsed.output) {
parsed = parse(input, options);
}
return picomatch.compileRe(parsed, options, returnOutput, returnState);
};
/**
* Create a regular expression from the given regex source string.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.toRegex(source[, options]);
*
* const { output } = picomatch.parse('*.js');
* console.log(picomatch.toRegex(output));
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
* ```
* @param {String} `source` Regular expression source string.
* @param {Object} `options`
* @return {RegExp}
* @api public
*/
picomatch.toRegex = (source, options) => {
try {
const opts = options || {};
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
} catch (err) {
if (options && options.debug === true) throw err;
return /$^/;
}
};
/**
* Picomatch constants.
* @return {Object}
*/
picomatch.constants = constants;
/**
* Expose "picomatch"
*/
module.exports = picomatch;node_modules\tinyglobby\node_modules\picomatch\lib\constants.js (Line 1:1 - Line 180:2), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 1:1 - Line 180:2)
'use strict';
const WIN_SLASH = '\\\\/';
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
/**
* Posix glob regex
*/
const DOT_LITERAL = '\\.';
const PLUS_LITERAL = '\\+';
const QMARK_LITERAL = '\\?';
const SLASH_LITERAL = '\\/';
const ONE_CHAR = '(?=.)';
const QMARK = '[^/]';
const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
const NO_DOT = `(?!${DOT_LITERAL})`;
const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
const STAR = `${QMARK}*?`;
const SEP = '/';
const POSIX_CHARS = {
DOT_LITERAL,
PLUS_LITERAL,
QMARK_LITERAL,
SLASH_LITERAL,
ONE_CHAR,
QMARK,
END_ANCHOR,
DOTS_SLASH,
NO_DOT,
NO_DOTS,
NO_DOT_SLASH,
NO_DOTS_SLASH,
QMARK_NO_DOT,
STAR,
START_ANCHOR,
SEP
};
/**
* Windows glob regex
*/
const WINDOWS_CHARS = {
...POSIX_CHARS,
SLASH_LITERAL: `[${WIN_SLASH}]`,
QMARK: WIN_NO_SLASH,
STAR: `${WIN_NO_SLASH}*?`,
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
NO_DOT: `(?!${DOT_LITERAL})`,
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
SEP: '\\'
};
/**
* POSIX Bracket Regex
*/
const POSIX_REGEX_SOURCE = {
alnum: 'a-zA-Z0-9',
alpha: 'a-zA-Z',
ascii: '\\x00-\\x7F',
blank: ' \\t',
cntrl: '\\x00-\\x1F\\x7F',
digit: '0-9',
graph: '\\x21-\\x7E',
lower: 'a-z',
print: '\\x20-\\x7E ',
punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
space: ' \\t\\r\\n\\v\\f',
upper: 'A-Z',
word: 'A-Za-z0-9_',
xdigit: 'A-Fa-f0-9'
};
module.exports = {
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE,
// regular expressions
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
// Replace globs with equivalent patterns to reduce parsing time.
REPLACEMENTS: {
__proto__: null,
'***': '*',
'**/**': '**',
'**/**/**': '**'
},
// Digits
CHAR_0: 48, /* 0 */
CHAR_9: 57, /* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 65, /* A */
CHAR_LOWERCASE_A: 97, /* a */
CHAR_UPPERCASE_Z: 90, /* Z */
CHAR_LOWERCASE_Z: 122, /* z */
CHAR_LEFT_PARENTHESES: 40, /* ( */
CHAR_RIGHT_PARENTHESES: 41, /* ) */
CHAR_ASTERISK: 42, /* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: 38, /* & */
CHAR_AT: 64, /* @ */
CHAR_BACKWARD_SLASH: 92, /* \ */
CHAR_CARRIAGE_RETURN: 13, /* \r */
CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
CHAR_COLON: 58, /* : */
CHAR_COMMA: 44, /* , */
CHAR_DOT: 46, /* . */
CHAR_DOUBLE_QUOTE: 34, /* " */
CHAR_EQUAL: 61, /* = */
CHAR_EXCLAMATION_MARK: 33, /* ! */
CHAR_FORM_FEED: 12, /* \f */
CHAR_FORWARD_SLASH: 47, /* / */
CHAR_GRAVE_ACCENT: 96, /* ` */
CHAR_HASH: 35, /* # */
CHAR_HYPHEN_MINUS: 45, /* - */
CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
CHAR_LEFT_CURLY_BRACE: 123, /* { */
CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
CHAR_LINE_FEED: 10, /* \n */
CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
CHAR_PERCENT: 37, /* % */
CHAR_PLUS: 43, /* + */
CHAR_QUESTION_MARK: 63, /* ? */
CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
CHAR_RIGHT_CURLY_BRACE: 125, /* } */
CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
CHAR_SEMICOLON: 59, /* ; */
CHAR_SINGLE_QUOTE: 39, /* ' */
CHAR_SPACE: 32, /* */
CHAR_TAB: 9, /* \t */
CHAR_UNDERSCORE: 95, /* _ */
CHAR_VERTICAL_LINE: 124, /* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
/**
* Create EXTGLOB_CHARS
*/
extglobChars(chars) {
return {
'!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
'?': { type: 'qmark', open: '(?:', close: ')?' },
'+': { type: 'plus', open: '(?:', close: ')+' },
'*': { type: 'star', open: '(?:', close: ')*' },
'@': { type: 'at', open: '(?:', close: ')' }
};
},
/**
* Create GLOB_CHARS
*/
globChars(win32) {
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
}
};node_modules\tinyglobby\node_modules\fdir\dist\index.mjs (Line 1:1 - Line 570:2), node_modules\vite\node_modules\fdir\dist\index.mjs (Line 1:1 - Line 570:2)
import { createRequire } from "module";
import { basename, dirname, normalize, relative, resolve, sep } from "path";
import * as nativeFs from "fs";
//#region rolldown:runtime
var __require = /* @__PURE__ */ createRequire(import.meta.url);
//#endregion
//#region src/utils.ts
function cleanPath(path) {
let normalized = normalize(path);
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
return normalized;
}
const SLASHES_REGEX = /[\\/]/g;
function convertSlashes(path, separator) {
return path.replace(SLASHES_REGEX, separator);
}
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
function isRootDirectory(path) {
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
}
function normalizePath(path, options) {
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
if (resolvePaths) path = resolve(path);
if (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);
if (path === ".") return "";
const needsSeperator = path[path.length - 1] !== pathSeparator;
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
}
//#endregion
//#region src/api/functions/join-path.ts
function joinPathWithBasePath(filename, directoryPath) {
return directoryPath + filename;
}
function joinPathWithRelativePath(root, options) {
return function(filename, directoryPath) {
const sameRoot = directoryPath.startsWith(root);
if (sameRoot) return directoryPath.slice(root.length) + filename;
else return convertSlashes(relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
};
}
function joinPath(filename) {
return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
return directoryPath + filename + separator;
}
function build$7(root, options) {
const { relativePaths, includeBasePath } = options;
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
}
//#endregion
//#region src/api/functions/push-directory.ts
function pushDirectoryWithRelativePath(root) {
return function(directoryPath, paths) {
paths.push(directoryPath.substring(root.length) || ".");
};
}
function pushDirectoryFilterWithRelativePath(root) {
return function(directoryPath, paths, filters) {
const relativePath = directoryPath.substring(root.length) || ".";
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
};
}
const pushDirectory = (directoryPath, paths) => {
paths.push(directoryPath || ".");
};
const pushDirectoryFilter = (directoryPath, paths, filters) => {
const path = directoryPath || ".";
if (filters.every((filter) => filter(path, true))) paths.push(path);
};
const empty$2 = () => {};
function build$6(root, options) {
const { includeDirs, filters, relativePaths } = options;
if (!includeDirs) return empty$2;
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
}
//#endregion
//#region src/api/functions/push-file.ts
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
if (filters.every((filter) => filter(filename, false))) counts.files++;
};
const pushFileFilter = (filename, paths, _counts, filters) => {
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
};
const pushFileCount = (_filename, _paths, counts, _filters) => {
counts.files++;
};
const pushFile = (filename, paths) => {
paths.push(filename);
};
const empty$1 = () => {};
function build$5(options) {
const { excludeFiles, filters, onlyCounts } = options;
if (excludeFiles) return empty$1;
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
else if (onlyCounts) return pushFileCount;
else return pushFile;
}
//#endregion
//#region src/api/functions/get-array.ts
const getArray = (paths) => {
return paths;
};
const getArrayGroup = () => {
return [""].slice(0, 0);
};
function build$4(options) {
return options.group ? getArrayGroup : getArray;
}
//#endregion
//#region src/api/functions/group-files.ts
const groupFiles = (groups, directory, files) => {
groups.push({
directory,
files,
dir: directory
});
};
const empty = () => {};
function build$3(options) {
return options.group ? groupFiles : empty;
}
//#endregion
//#region src/api/functions/resolve-symlink.ts
const resolveSymlinksAsync = function(path, state, callback$1) {
const { queue, fs, options: { suppressErrors } } = state;
queue.enqueue();
fs.realpath(path, (error, resolvedPath) => {
if (error) return queue.dequeue(suppressErrors ? null : error, state);
fs.stat(resolvedPath, (error$1, stat) => {
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
callback$1(stat, resolvedPath);
queue.dequeue(null, state);
});
});
};
const resolveSymlinks = function(path, state, callback$1) {
const { queue, fs, options: { suppressErrors } } = state;
queue.enqueue();
try {
const resolvedPath = fs.realpathSync(path);
const stat = fs.statSync(resolvedPath);
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
callback$1(stat, resolvedPath);
} catch (e) {
if (!suppressErrors) throw e;
}
};
function build$2(options, isSynchronous) {
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
}
function isRecursive(path, resolved, state) {
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
let parent = dirname(path);
let depth = 1;
while (parent !== state.root && depth < 2) {
const resolvedPath = state.symlinks.get(parent);
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
if (isSameRoot) depth++;
else parent = dirname(parent);
}
state.symlinks.set(path, resolved);
return depth > 1;
}
function isRecursiveUsingRealPaths(resolved, state) {
return state.visited.includes(resolved + state.options.pathSeparator);
}
//#endregion
//#region src/api/functions/invoke-callback.ts
const onlyCountsSync = (state) => {
return state.counts;
};
const groupsSync = (state) => {
return state.groups;
};
const defaultSync = (state) => {
return state.paths;
};
const limitFilesSync = (state) => {
return state.paths.slice(0, state.options.maxFiles);
};
const onlyCountsAsync = (state, error, callback$1) => {
report(error, callback$1, state.counts, state.options.suppressErrors);
return null;
};
const defaultAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths, state.options.suppressErrors);
return null;
};
const limitFilesAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
return null;
};
const groupsAsync = (state, error, callback$1) => {
report(error, callback$1, state.groups, state.options.suppressErrors);
return null;
};
function report(error, callback$1, output, suppressErrors) {
if (error && !suppressErrors) callback$1(error, output);
else callback$1(null, output);
}
function build$1(options, isSynchronous) {
const { onlyCounts, group, maxFiles } = options;
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
else if (group) return isSynchronous ? groupsSync : groupsAsync;
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
else return isSynchronous ? defaultSync : defaultAsync;
}
//#endregion
//#region src/api/functions/walk-directory.ts
const readdirOpts = { withFileTypes: true };
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
state.queue.enqueue();
if (currentDepth < 0) return state.queue.dequeue(null, state);
const { fs } = state;
state.visited.push(crawlPath);
state.counts.directories++;
fs.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
callback$1(entries, directoryPath, currentDepth);
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
});
};
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
const { fs } = state;
if (currentDepth < 0) return;
state.visited.push(crawlPath);
state.counts.directories++;
let entries = [];
try {
entries = fs.readdirSync(crawlPath || ".", readdirOpts);
} catch (e) {
if (!state.options.suppressErrors) throw e;
}
callback$1(entries, directoryPath, currentDepth);
};
function build(isSynchronous) {
return isSynchronous ? walkSync : walkAsync;
}
//#endregion
//#region src/api/queue.ts
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
var Queue = class {
count = 0;
constructor(onQueueEmpty) {
this.onQueueEmpty = onQueueEmpty;
}
enqueue() {
this.count++;
return this.count;
}
dequeue(error, output) {
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
this.onQueueEmpty(error, output);
if (error) {
output.controller.abort();
this.onQueueEmpty = void 0;
}
}
}
};
//#endregion
//#region src/api/counter.ts
var Counter = class {
_files = 0;
_directories = 0;
set files(num) {
this._files = num;
}
get files() {
return this._files;
}
set directories(num) {
this._directories = num;
}
get directories() {
return this._directories;
}
/**
* @deprecated use `directories` instead
*/
/* c8 ignore next 3 */
get dirs() {
return this._directories;
}
};
//#endregion
//#region src/api/aborter.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
var Aborter = class {
aborted = false;
abort() {
this.aborted = true;
}
};
//#endregion
//#region src/api/walker.ts
var Walker = class {
root;
isSynchronous;
state;
joinPath;
pushDirectory;
pushFile;
getArray;
groupFiles;
resolveSymlink;
walkDirectory;
callbackInvoker;
constructor(root, options, callback$1) {
this.isSynchronous = !callback$1;
this.callbackInvoker = build$1(options, this.isSynchronous);
this.root = normalizePath(root, options);
this.state = {
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
paths: [""].slice(0, 0),
groups: [],
counts: new Counter(),
options,
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
symlinks: /* @__PURE__ */ new Map(),
visited: [""].slice(0, 0),
controller: new Aborter(),
fs: options.fs || nativeFs
};
this.joinPath = build$7(this.root, options);
this.pushDirectory = build$6(this.root, options);
this.pushFile = build$5(options);
this.getArray = build$4(options);
this.groupFiles = build$3(options);
this.resolveSymlink = build$2(options, this.isSynchronous);
this.walkDirectory = build(this.isSynchronous);
}
start() {
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
}
walk = (entries, directoryPath, depth) => {
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
const files = this.getArray(this.state.paths);
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
const filename = this.joinPath(entry.name, directoryPath);
this.pushFile(filename, files, this.state.counts, filters);
} else if (entry.isDirectory()) {
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
if (exclude && exclude(entry.name, path)) continue;
this.pushDirectory(path, paths, filters);
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
let path = joinPathWithBasePath(entry.name, directoryPath);
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
if (stat.isDirectory()) {
resolvedPath = normalizePath(resolvedPath, this.state.options);
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
} else {
resolvedPath = useRealPaths ? resolvedPath : path;
const filename = basename(resolvedPath);
const directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
resolvedPath = this.joinPath(filename, directoryPath$1);
this.pushFile(resolvedPath, files, this.state.counts, filters);
}
});
}
}
this.groupFiles(this.state.groups, directoryPath, files);
};
};
//#endregion
//#region src/api/async.ts
function promise(root, options) {
return new Promise((resolve$1, reject) => {
callback(root, options, (err, output) => {
if (err) return reject(err);
resolve$1(output);
});
});
}
function callback(root, options, callback$1) {
let walker = new Walker(root, options, callback$1);
walker.start();
}
//#endregion
//#region src/api/sync.ts
function sync(root, options) {
const walker = new Walker(root, options);
return walker.start();
}
//#endregion
//#region src/builder/api-builder.ts
var APIBuilder = class {
constructor(root, options) {
this.root = root;
this.options = options;
}
withPromise() {
return promise(this.root, this.options);
}
withCallback(cb) {
callback(this.root, this.options, cb);
}
sync() {
return sync(this.root, this.options);
}
};
//#endregion
//#region src/builder/index.ts
let pm = null;
/* c8 ignore next 6 */
try {
__require.resolve("picomatch");
pm = __require("picomatch");
} catch {}
var Builder = class {
globCache = {};
options = {
maxDepth: Infinity,
suppressErrors: true,
pathSeparator: sep,
filters: []
};
globFunction;
constructor(options) {
this.options = {
...this.options,
...options
};
this.globFunction = this.options.globFunction;
}
group() {
this.options.group = true;
return this;
}
withPathSeparator(separator) {
this.options.pathSeparator = separator;
return this;
}
withBasePath() {
this.options.includeBasePath = true;
return this;
}
withRelativePaths() {
this.options.relativePaths = true;
return this;
}
withDirs() {
this.options.includeDirs = true;
return this;
}
withMaxDepth(depth) {
this.options.maxDepth = depth;
return this;
}
withMaxFiles(limit) {
this.options.maxFiles = limit;
return this;
}
withFullPaths() {
this.options.resolvePaths = true;
this.options.includeBasePath = true;
return this;
}
withErrors() {
this.options.suppressErrors = false;
return this;
}
withSymlinks({ resolvePaths = true } = {}) {
this.options.resolveSymlinks = true;
this.options.useRealPaths = resolvePaths;
return this.withFullPaths();
}
withAbortSignal(signal) {
this.options.signal = signal;
return this;
}
normalize() {
this.options.normalizePath = true;
return this;
}
filter(predicate) {
this.options.filters.push(predicate);
return this;
}
onlyDirs() {
this.options.excludeFiles = true;
this.options.includeDirs = true;
return this;
}
exclude(predicate) {
this.options.exclude = predicate;
return this;
}
onlyCounts() {
this.options.onlyCounts = true;
return this;
}
crawl(root) {
return new APIBuilder(root || ".", this.options);
}
withGlobFunction(fn) {
this.globFunction = fn;
return this;
}
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
/* c8 ignore next 4 */
crawlWithOptions(root, options) {
this.options = {
...this.options,
...options
};
return new APIBuilder(root || ".", this.options);
}
glob(...patterns) {
if (this.globFunction) return this.globWithOptions(patterns);
return this.globWithOptions(patterns, ...[{ dot: true }]);
}
globWithOptions(patterns, ...options) {
const globFn = this.globFunction || pm;
/* c8 ignore next 5 */
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
var isMatch = this.globCache[patterns.join("\0")];
if (!isMatch) {
isMatch = globFn(patterns, ...options);
this.globCache[patterns.join("\0")] = isMatch;
}
this.options.filters.push((path) => isMatch(path));
return this;
}
};
//#endregion
export { Builder as fdir };node_modules\tinyglobby\node_modules\fdir\dist\index.cjs (Line 1:1 - Line 588:2), node_modules\vite\node_modules\fdir\dist\index.cjs (Line 1:1 - Line 588:2)
//#region rolldown:runtime
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i];
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
const path = __toESM(require("path"));
const fs = __toESM(require("fs"));
//#region src/utils.ts
function cleanPath(path$1) {
let normalized = (0, path.normalize)(path$1);
if (normalized.length > 1 && normalized[normalized.length - 1] === path.sep) normalized = normalized.substring(0, normalized.length - 1);
return normalized;
}
const SLASHES_REGEX = /[\\/]/g;
function convertSlashes(path$1, separator) {
return path$1.replace(SLASHES_REGEX, separator);
}
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
function isRootDirectory(path$1) {
return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
}
function normalizePath(path$1, options) {
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
if (resolvePaths) path$1 = (0, path.resolve)(path$1);
if (normalizePath$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
if (path$1 === ".") return "";
const needsSeperator = path$1[path$1.length - 1] !== pathSeparator;
return convertSlashes(needsSeperator ? path$1 + pathSeparator : path$1, pathSeparator);
}
//#endregion
//#region src/api/functions/join-path.ts
function joinPathWithBasePath(filename, directoryPath) {
return directoryPath + filename;
}
function joinPathWithRelativePath(root, options) {
return function(filename, directoryPath) {
const sameRoot = directoryPath.startsWith(root);
if (sameRoot) return directoryPath.slice(root.length) + filename;
else return convertSlashes((0, path.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
};
}
function joinPath(filename) {
return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
return directoryPath + filename + separator;
}
function build$7(root, options) {
const { relativePaths, includeBasePath } = options;
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
}
//#endregion
//#region src/api/functions/push-directory.ts
function pushDirectoryWithRelativePath(root) {
return function(directoryPath, paths) {
paths.push(directoryPath.substring(root.length) || ".");
};
}
function pushDirectoryFilterWithRelativePath(root) {
return function(directoryPath, paths, filters) {
const relativePath = directoryPath.substring(root.length) || ".";
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
};
}
const pushDirectory = (directoryPath, paths) => {
paths.push(directoryPath || ".");
};
const pushDirectoryFilter = (directoryPath, paths, filters) => {
const path$1 = directoryPath || ".";
if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
};
const empty$2 = () => {};
function build$6(root, options) {
const { includeDirs, filters, relativePaths } = options;
if (!includeDirs) return empty$2;
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
}
//#endregion
//#region src/api/functions/push-file.ts
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
if (filters.every((filter) => filter(filename, false))) counts.files++;
};
const pushFileFilter = (filename, paths, _counts, filters) => {
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
};
const pushFileCount = (_filename, _paths, counts, _filters) => {
counts.files++;
};
const pushFile = (filename, paths) => {
paths.push(filename);
};
const empty$1 = () => {};
function build$5(options) {
const { excludeFiles, filters, onlyCounts } = options;
if (excludeFiles) return empty$1;
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
else if (onlyCounts) return pushFileCount;
else return pushFile;
}
//#endregion
//#region src/api/functions/get-array.ts
const getArray = (paths) => {
return paths;
};
const getArrayGroup = () => {
return [""].slice(0, 0);
};
function build$4(options) {
return options.group ? getArrayGroup : getArray;
}
//#endregion
//#region src/api/functions/group-files.ts
const groupFiles = (groups, directory, files) => {
groups.push({
directory,
files,
dir: directory
});
};
const empty = () => {};
function build$3(options) {
return options.group ? groupFiles : empty;
}
//#endregion
//#region src/api/functions/resolve-symlink.ts
const resolveSymlinksAsync = function(path$1, state, callback$1) {
const { queue, fs: fs$1, options: { suppressErrors } } = state;
queue.enqueue();
fs$1.realpath(path$1, (error, resolvedPath) => {
if (error) return queue.dequeue(suppressErrors ? null : error, state);
fs$1.stat(resolvedPath, (error$1, stat) => {
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
callback$1(stat, resolvedPath);
queue.dequeue(null, state);
});
});
};
const resolveSymlinks = function(path$1, state, callback$1) {
const { queue, fs: fs$1, options: { suppressErrors } } = state;
queue.enqueue();
try {
const resolvedPath = fs$1.realpathSync(path$1);
const stat = fs$1.statSync(resolvedPath);
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
callback$1(stat, resolvedPath);
} catch (e) {
if (!suppressErrors) throw e;
}
};
function build$2(options, isSynchronous) {
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
}
function isRecursive(path$1, resolved, state) {
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
let parent = (0, path.dirname)(path$1);
let depth = 1;
while (parent !== state.root && depth < 2) {
const resolvedPath = state.symlinks.get(parent);
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
if (isSameRoot) depth++;
else parent = (0, path.dirname)(parent);
}
state.symlinks.set(path$1, resolved);
return depth > 1;
}
function isRecursiveUsingRealPaths(resolved, state) {
return state.visited.includes(resolved + state.options.pathSeparator);
}
//#endregion
//#region src/api/functions/invoke-callback.ts
const onlyCountsSync = (state) => {
return state.counts;
};
const groupsSync = (state) => {
return state.groups;
};
const defaultSync = (state) => {
return state.paths;
};
const limitFilesSync = (state) => {
return state.paths.slice(0, state.options.maxFiles);
};
const onlyCountsAsync = (state, error, callback$1) => {
report(error, callback$1, state.counts, state.options.suppressErrors);
return null;
};
const defaultAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths, state.options.suppressErrors);
return null;
};
const limitFilesAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
return null;
};
const groupsAsync = (state, error, callback$1) => {
report(error, callback$1, state.groups, state.options.suppressErrors);
return null;
};
function report(error, callback$1, output, suppressErrors) {
if (error && !suppressErrors) callback$1(error, output);
else callback$1(null, output);
}
function build$1(options, isSynchronous) {
const { onlyCounts, group, maxFiles } = options;
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
else if (group) return isSynchronous ? groupsSync : groupsAsync;
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
else return isSynchronous ? defaultSync : defaultAsync;
}
//#endregion
//#region src/api/functions/walk-directory.ts
const readdirOpts = { withFileTypes: true };
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
state.queue.enqueue();
if (currentDepth < 0) return state.queue.dequeue(null, state);
const { fs: fs$1 } = state;
state.visited.push(crawlPath);
state.counts.directories++;
fs$1.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
callback$1(entries, directoryPath, currentDepth);
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
});
};
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
const { fs: fs$1 } = state;
if (currentDepth < 0) return;
state.visited.push(crawlPath);
state.counts.directories++;
let entries = [];
try {
entries = fs$1.readdirSync(crawlPath || ".", readdirOpts);
} catch (e) {
if (!state.options.suppressErrors) throw e;
}
callback$1(entries, directoryPath, currentDepth);
};
function build(isSynchronous) {
return isSynchronous ? walkSync : walkAsync;
}
//#endregion
//#region src/api/queue.ts
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
var Queue = class {
count = 0;
constructor(onQueueEmpty) {
this.onQueueEmpty = onQueueEmpty;
}
enqueue() {
this.count++;
return this.count;
}
dequeue(error, output) {
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
this.onQueueEmpty(error, output);
if (error) {
output.controller.abort();
this.onQueueEmpty = void 0;
}
}
}
};
//#endregion
//#region src/api/counter.ts
var Counter = class {
_files = 0;
_directories = 0;
set files(num) {
this._files = num;
}
get files() {
return this._files;
}
set directories(num) {
this._directories = num;
}
get directories() {
return this._directories;
}
/**
* @deprecated use `directories` instead
*/
/* c8 ignore next 3 */
get dirs() {
return this._directories;
}
};
//#endregion
//#region src/api/aborter.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
var Aborter = class {
aborted = false;
abort() {
this.aborted = true;
}
};
//#endregion
//#region src/api/walker.ts
var Walker = class {
root;
isSynchronous;
state;
joinPath;
pushDirectory;
pushFile;
getArray;
groupFiles;
resolveSymlink;
walkDirectory;
callbackInvoker;
constructor(root, options, callback$1) {
this.isSynchronous = !callback$1;
this.callbackInvoker = build$1(options, this.isSynchronous);
this.root = normalizePath(root, options);
this.state = {
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
paths: [""].slice(0, 0),
groups: [],
counts: new Counter(),
options,
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
symlinks: /* @__PURE__ */ new Map(),
visited: [""].slice(0, 0),
controller: new Aborter(),
fs: options.fs || fs
};
this.joinPath = build$7(this.root, options);
this.pushDirectory = build$6(this.root, options);
this.pushFile = build$5(options);
this.getArray = build$4(options);
this.groupFiles = build$3(options);
this.resolveSymlink = build$2(options, this.isSynchronous);
this.walkDirectory = build(this.isSynchronous);
}
start() {
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
}
walk = (entries, directoryPath, depth) => {
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
const files = this.getArray(this.state.paths);
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
const filename = this.joinPath(entry.name, directoryPath);
this.pushFile(filename, files, this.state.counts, filters);
} else if (entry.isDirectory()) {
let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
if (exclude && exclude(entry.name, path$1)) continue;
this.pushDirectory(path$1, paths, filters);
this.walkDirectory(this.state, path$1, path$1, depth - 1, this.walk);
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
let path$1 = joinPathWithBasePath(entry.name, directoryPath);
this.resolveSymlink(path$1, this.state, (stat, resolvedPath) => {
if (stat.isDirectory()) {
resolvedPath = normalizePath(resolvedPath, this.state.options);
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth - 1, this.walk);
} else {
resolvedPath = useRealPaths ? resolvedPath : path$1;
const filename = (0, path.basename)(resolvedPath);
const directoryPath$1 = normalizePath((0, path.dirname)(resolvedPath), this.state.options);
resolvedPath = this.joinPath(filename, directoryPath$1);
this.pushFile(resolvedPath, files, this.state.counts, filters);
}
});
}
}
this.groupFiles(this.state.groups, directoryPath, files);
};
};
//#endregion
//#region src/api/async.ts
function promise(root, options) {
return new Promise((resolve$1, reject) => {
callback(root, options, (err, output) => {
if (err) return reject(err);
resolve$1(output);
});
});
}
function callback(root, options, callback$1) {
let walker = new Walker(root, options, callback$1);
walker.start();
}
//#endregion
//#region src/api/sync.ts
function sync(root, options) {
const walker = new Walker(root, options);
return walker.start();
}
//#endregion
//#region src/builder/api-builder.ts
var APIBuilder = class {
constructor(root, options) {
this.root = root;
this.options = options;
}
withPromise() {
return promise(this.root, this.options);
}
withCallback(cb) {
callback(this.root, this.options, cb);
}
sync() {
return sync(this.root, this.options);
}
};
//#endregion
//#region src/builder/index.ts
let pm = null;
/* c8 ignore next 6 */
try {
require.resolve("picomatch");
pm = require("picomatch");
} catch {}
var Builder = class {
globCache = {};
options = {
maxDepth: Infinity,
suppressErrors: true,
pathSeparator: path.sep,
filters: []
};
globFunction;
constructor(options) {
this.options = {
...this.options,
...options
};
this.globFunction = this.options.globFunction;
}
group() {
this.options.group = true;
return this;
}
withPathSeparator(separator) {
this.options.pathSeparator = separator;
return this;
}
withBasePath() {
this.options.includeBasePath = true;
return this;
}
withRelativePaths() {
this.options.relativePaths = true;
return this;
}
withDirs() {
this.options.includeDirs = true;
return this;
}
withMaxDepth(depth) {
this.options.maxDepth = depth;
return this;
}
withMaxFiles(limit) {
this.options.maxFiles = limit;
return this;
}
withFullPaths() {
this.options.resolvePaths = true;
this.options.includeBasePath = true;
return this;
}
withErrors() {
this.options.suppressErrors = false;
return this;
}
withSymlinks({ resolvePaths = true } = {}) {
this.options.resolveSymlinks = true;
this.options.useRealPaths = resolvePaths;
return this.withFullPaths();
}
withAbortSignal(signal) {
this.options.signal = signal;
return this;
}
normalize() {
this.options.normalizePath = true;
return this;
}
filter(predicate) {
this.options.filters.push(predicate);
return this;
}
onlyDirs() {
this.options.excludeFiles = true;
this.options.includeDirs = true;
return this;
}
exclude(predicate) {
this.options.exclude = predicate;
return this;
}
onlyCounts() {
this.options.onlyCounts = true;
return this;
}
crawl(root) {
return new APIBuilder(root || ".", this.options);
}
withGlobFunction(fn) {
this.globFunction = fn;
return this;
}
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
/* c8 ignore next 4 */
crawlWithOptions(root, options) {
this.options = {
...this.options,
...options
};
return new APIBuilder(root || ".", this.options);
}
glob(...patterns) {
if (this.globFunction) return this.globWithOptions(patterns);
return this.globWithOptions(patterns, ...[{ dot: true }]);
}
globWithOptions(patterns, ...options) {
const globFn = this.globFunction || pm;
/* c8 ignore next 5 */
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
var isMatch = this.globCache[patterns.join("\0")];
if (!isMatch) {
isMatch = globFn(patterns, ...options);
this.globCache[patterns.join("\0")] = isMatch;
}
this.options.filters.push((path$1) => isMatch(path$1));
return this;
}
};
//#endregion
exports.fdir = Builder;node_modules\rc-util\node_modules\react-is\cjs\react-is.development.js (Line 14:2 - Line 220:2), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 14:8 - Line 220:2)
) {
'use strict';
// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types.
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
var REACT_MEMO_TYPE = Symbol.for('react.memo');
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
// -----------------------------------------------------------------------------
var enableScopeAPI = false; // Experimental Create Event Handle API.
var enableCacheElement = false;
var enableTransitionTracing = false; // No known bugs, but needs performance testing
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
// stuff. Intended to enable React core members to more easily debug scheduling
// issues in DEV builds.
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
}
function isValidElementType(type) {
if (typeof type === 'string' || typeof type === 'function') {
return true;
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
return true;
}
if (typeof type === 'object' && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
return true;
}
}
return false;
}
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_SERVER_CONTEXT_TYPE:
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return undefined;
}
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
}
}
return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
}
}
return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
function isSuspenseList(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
}
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isSuspenseList = isSuspenseList;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
})(node_modules\lucide-react\dist\esm\icons\zoom-in.js (Line 1:1 - Line 13:5), node_modules\lucide-react\dist\esm\icons\zoom-out.js (Line 1:1 - Line 13:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
["line", { x1: "11"node_modules\lucide-react\dist\esm\icons\user-round-minus.js (Line 1:1 - Line 13:12), node_modules\lucide-react\dist\esm\icons\user-round-plus.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
["path", { d: "M22 19h-6"node_modules\lucide-react\dist\esm\icons\user-round-cog.js (Line 1:1 - Line 17:30), node_modules\lucide-react\dist\esm\icons\wifi-cog.js (Line 1:1 - Line 17:27)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "m14.305 19.53.923-.382", key: "3m78fa" }],
["path", { d: "m15.228 16.852-.923-.383", key: "npixar" }],
["path", { d: "m16.852 15.228-.383-.923", key: "5xggr7" }],
["path", { d: "m16.852 20.772-.383.924", key: "dpfhf9" }],
["path", { d: "m19.148 15.228.383-.923", key: "1reyyz" }],
["path", { d: "m19.53 21.696-.382-.924", key: "1goivc" }],
["path", { d: "M2 21a8 8 0 0 1 10.434-7.62"node_modules\lucide-react\dist\esm\icons\user-round-check.js (Line 1:1 - Line 13:17), node_modules\lucide-react\dist\esm\icons\user-round-plus.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
["path", { d: "m16 19 2 2 4-4"node_modules\lucide-react\dist\esm\icons\user-plus.js (Line 1:1 - Line 13:5), node_modules\lucide-react\dist\esm\icons\user-x.js (Line 1:1 - Line 13:5)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["line", { x1: "19"node_modules\lucide-react\dist\esm\icons\user-minus.js (Line 1:1 - Line 13:5), node_modules\lucide-react\dist\esm\icons\user-x.js (Line 1:1 - Line 13:5)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["line", { x1: "22"node_modules\lucide-react\dist\esm\icons\tickets-plane.js (Line 13:3 - Line 19:13), node_modules\lucide-react\dist\esm\icons\tickets.js (Line 11:3 - Line 17:8)
["path", { d: "m4.5 8 10.58-5.06a1 1 0 0 1 1.342.488L18.5 8", key: "12lg5p" }],
["path", { d: "M6 10V8", key: "1y41hn" }],
["path", { d: "M6 14v1", key: "cao2tf" }],
["path", { d: "M6 19v2", key: "1loha6" }],
["rect", { x: "2", y: "8", width: "20", height: "13", rx: "2", key: "p3bz5l" }]
];
const TicketsPlanenode_modules\lucide-react\dist\esm\icons\tally-4.js (Line 1:1 - Line 15:2), node_modules\lucide-react\dist\esm\icons\tally-5.js (Line 1:1 - Line 14:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 4v16", key: "6qkkli" }],
["path", { d: "M9 4v16", key: "81ygyz" }],
["path", { d: "M14 4v16", key: "12vmem" }],
["path", { d: "M19 4v16", key: "8ij5ei" }]
]node_modules\lucide-react\dist\esm\icons\tally-3.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\tally-5.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 4v16", key: "6qkkli" }],
["path", { d: "M9 4v16", key: "81ygyz" }],
["path", { d: "M14 4v16", key: "12vmem" }]
]node_modules\lucide-react\dist\esm\icons\table-cells-merge.js (Line 12:2 - Line 17:16), node_modules\lucide-react\dist\esm\icons\table-cells-split.js (Line 11:2 - Line 16:16)
}],
["path", { d: "M3 15h18", key: "5xshup" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
];
const TableCellsMergenode_modules\lucide-react\dist\esm\icons\sword.js (Line 1:1 - Line 15:2), node_modules\lucide-react\dist\esm\icons\swords.js (Line 1:1 - Line 14:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["polyline", { points: "14.5 17.5 3 6 3 3 6 3 17.5 14.5", key: "1hfsw2" }],
["line", { x1: "13", x2: "19", y1: "19", y2: "13", key: "1vrmhu" }],
["line", { x1: "16", x2: "20", y1: "16", y2: "20", key: "1bron3" }],
["line", { x1: "19", x2: "21", y1: "21", y2: "19", key: "13pww6" }]
]node_modules\lucide-react\dist\esm\icons\sunrise.js (Line 11:2 - Line 17:15), node_modules\lucide-react\dist\esm\icons\sunset.js (Line 11:2 - Line 17:16)
}],
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
["path", { d: "M2 18h2", key: "j10viu" }],
["path", { d: "M20 18h2", key: "wocana" }],
["path", { d: "m19.07 10.93-1.41 1.41", key: "15zs5n" }],
["path", { d: "M22 22H2", key: "19qnx5" }],
["path", { d: "m8 6 4-4 4 4"node_modules\lucide-react\dist\esm\icons\square-minus.js (Line 1:1 - Line 13:2), node_modules\lucide-react\dist\esm\icons\square-plus.js (Line 1:1 - Line 12:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M8 12h8", key: "1wcyev" }]
]node_modules\lucide-react\dist\esm\icons\square-function.js (Line 1:1 - Line 12:45), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 12:12)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3"node_modules\lucide-react\dist\esm\icons\square-dot.js (Line 1:1 - Line 12:5), node_modules\lucide-react\dist\esm\icons\square-user.js (Line 1:1 - Line 12:5)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["circle", { cx: "12", cy: "12"node_modules\lucide-react\dist\esm\icons\square-dashed-top-solid.js (Line 11:2 - Line 16:38), node_modules\lucide-react\dist\esm\icons\text-select.js (Line 13:2 - Line 18:9)
}],
["path", { d: "M21 14v1", key: "169vum" }],
["path", { d: "M21 19a2 2 0 0 1-2 2", key: "1j7049" }],
["path", { d: "M21 9v1", key: "mxsmne" }],
["path", { d: "M3 14v1", key: "vnatye" }],
["path", { d: "M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"node_modules\lucide-react\dist\esm\icons\square-bottom-dashed-scissors.js (Line 16:2 - Line 23:27), node_modules\lucide-react\dist\esm\icons\square-scissors.js (Line 11:2 - Line 18:15)
}],
["circle", { cx: "8", cy: "8", r: "2", key: "14cg06" }],
["path", { d: "M9.414 9.414 12 12", key: "qz4lzr" }],
["path", { d: "M14.8 14.8 18 18", key: "11flf1" }],
["circle", { cx: "8", cy: "16", r: "2", key: "1acxsx" }],
["path", { d: "m18 6-8.586 8.586", key: "11kzk1" }]
];
const SquareBottomDashedScissorsnode_modules\lucide-react\dist\esm\icons\square-arrow-right.js (Line 1:1 - Line 13:17), node_modules\lucide-react\dist\esm\icons\square-plus.js (Line 1:1 - Line 13:10)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["path", { d: "m12 16 4-4-4-4"node_modules\lucide-react\dist\esm\icons\square-arrow-down.js (Line 1:1 - Line 13:16), node_modules\lucide-react\dist\esm\icons\square-asterisk.js (Line 1:1 - Line 13:14)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M12 8v8", key: "napkw2" }],
["path", { d: "m8 12 4 4 4-4"node_modules\lucide-react\dist\esm\icons\smartphone-charging.js (Line 1:1 - Line 12:29), node_modules\lucide-react\dist\esm\icons\smartphone.js (Line 1:1 - Line 12:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
["path", { d: "M12.667 8 10 12h4l-2.667 4"node_modules\lucide-react\dist\esm\icons\signal-medium.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\signal.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 20h.01", key: "4haj6o" }],
["path", { d: "M7 20v-4", key: "j294jx" }],
["path", { d: "M12 20v-8", key: "i3yub9" }]
]node_modules\lucide-react\dist\esm\icons\signal-high.js (Line 1:1 - Line 15:2), node_modules\lucide-react\dist\esm\icons\signal.js (Line 1:1 - Line 14:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 20h.01", key: "4haj6o" }],
["path", { d: "M7 20v-4", key: "j294jx" }],
["path", { d: "M12 20v-8", key: "i3yub9" }],
["path", { d: "M17 20V8", key: "1tkaf5" }]
]node_modules\lucide-react\dist\esm\icons\sheet.js (Line 1:1 - Line 12:4), node_modules\lucide-react\dist\esm\icons\square-divide.js (Line 1:1 - Line 12:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["line", { x1: "3"node_modules\lucide-react\dist\esm\icons\screen-share-off.js (Line 1:1 - Line 14:12), node_modules\lucide-react\dist\esm\icons\screen-share.js (Line 1:1 - Line 14:12)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3", key: "i8wdob" }],
["path", { d: "M8 21h8", key: "1ev6f3" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "m22 3-5 5"node_modules\lucide-react\dist\esm\icons\scan-text.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],node_modules\lucide-react\dist\esm\icons\scan-search.js (Line 1:1 - Line 15:9), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:7)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["circle"node_modules\lucide-react\dist\esm\icons\scan-line.js (Line 1:1 - Line 15:11), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:9)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["path", { d: "M7 12h10"node_modules\lucide-react\dist\esm\icons\scan-face.js (Line 1:1 - Line 15:26), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:9)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2"node_modules\lucide-react\dist\esm\icons\scan-eye.js (Line 1:1 - Line 15:4), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["circle", { cx: "12", cy: "12", r: "1"node_modules\lucide-react\dist\esm\icons\scan-barcode.js (Line 1:1 - Line 15:10), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:9)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["path", { d: "M8 7v10"node_modules\lucide-react\dist\esm\icons\repeat-1.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\repeat.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }],node_modules\lucide-react\dist\esm\icons\refresh-ccw-dot.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\refresh-ccw.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
["path", { d: "M16 16h5v5", key: "ccwih5" }],node_modules\lucide-react\dist\esm\icons\panel-top.js (Line 1:1 - Line 13:2), node_modules\lucide-react\dist\esm\icons\panels-top-left.js (Line 1:1 - Line 12:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }]
]node_modules\lucide-react\dist\esm\icons\panel-top-open.js (Line 1:1 - Line 13:17), node_modules\lucide-react\dist\esm\icons\panels-top-left.js (Line 1:1 - Line 14:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["path", { d: "m15 14-3 3-3-3"node_modules\lucide-react\dist\esm\icons\panel-top-close.js (Line 1:1 - Line 13:16), node_modules\lucide-react\dist\esm\icons\panels-top-left.js (Line 1:1 - Line 14:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["path", { d: "m9 16 3-3 3 3"node_modules\lucide-react\dist\esm\icons\panel-right-open.js (Line 1:1 - Line 12:2), node_modules\lucide-react\dist\esm\icons\panel-right.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M15 3v18", key: "14nvp0" }],node_modules\lucide-react\dist\esm\icons\panel-right-close.js (Line 1:1 - Line 13:15), node_modules\lucide-react\dist\esm\icons\panel-right.js (Line 1:1 - Line 13:17)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M15 3v18", key: "14nvp0" }],
["path", { d: "m8 9 3 3-3 3"node_modules\lucide-react\dist\esm\icons\panel-left.js (Line 1:1 - Line 13:2), node_modules\lucide-react\dist\esm\icons\panels-left-bottom.js (Line 1:1 - Line 12:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M9 3v18", key: "fh3hqa" }]
]node_modules\lucide-react\dist\esm\icons\panel-left-open.js (Line 1:1 - Line 13:16), node_modules\lucide-react\dist\esm\icons\panels-left-bottom.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M9 3v18", key: "fh3hqa" }],
["path", { d: "m14 9 3 3-3 3"node_modules\lucide-react\dist\esm\icons\panel-left-close.js (Line 1:1 - Line 13:17), node_modules\lucide-react\dist\esm\icons\panels-left-bottom.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M9 3v18", key: "fh3hqa" }],
["path", { d: "m16 15-3-3 3-3"node_modules\lucide-react\dist\esm\icons\panel-bottom-open.js (Line 1:1 - Line 12:2), node_modules\lucide-react\dist\esm\icons\panel-bottom.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 15h18", key: "5xshup" }],node_modules\lucide-react\dist\esm\icons\panel-bottom-close.js (Line 1:1 - Line 13:16), node_modules\lucide-react\dist\esm\icons\panel-bottom.js (Line 1:1 - Line 13:16)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 15h18", key: "5xshup" }],
["path", { d: "m15 8-3 3-3-3"node_modules\lucide-react\dist\esm\icons\package-search.js (Line 1:1 - Line 21:9), node_modules\lucide-react\dist\esm\icons\package-x.js (Line 1:1 - Line 21:7)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
[
"path",
{
d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",
key: "e7tb2h"
}
],
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }],
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "12", key: "a4e8g8" }],
["circle"node_modules\lucide-react\dist\esm\icons\package-plus.js (Line 13:3 - Line 23:2), node_modules\lucide-react\dist\esm\icons\package-x.js (Line 11:3 - Line 20:2)
[
"path",
{
d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",
key: "e7tb2h"
}
],
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }],
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "12", key: "a4e8g8" }]
]node_modules\lucide-react\dist\esm\icons\package-minus.js (Line 11:2 - Line 23:13), node_modules\lucide-react\dist\esm\icons\package-plus.js (Line 12:2 - Line 24:12)
}],
[
"path",
{
d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",
key: "e7tb2h"
}
],
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }],
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "12", key: "a4e8g8" }]
];
const PackageMinusnode_modules\lucide-react\dist\esm\icons\package-check.js (Line 11:2 - Line 23:13), node_modules\lucide-react\dist\esm\icons\package-plus.js (Line 12:2 - Line 24:12)
}],
[
"path",
{
d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",
key: "e7tb2h"
}
],
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }],
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "12", key: "a4e8g8" }]
];
const PackageChecknode_modules\lucide-react\dist\esm\icons\notepad-text-dashed.js (Line 1:1 - Line 14:7), node_modules\lucide-react\dist\esm\icons\notepad-text.js (Line 1:1 - Line 14:7)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M12 2v4", key: "3427ic" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path"node_modules\lucide-react\dist\esm\icons\notebook-text.js (Line 1:1 - Line 16:11), node_modules\lucide-react\dist\esm\icons\notebook.js (Line 1:1 - Line 16:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 6h4", key: "aawbzj" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
["path", { d: "M9.5 8h5"node_modules\lucide-react\dist\esm\icons\notebook-tabs.js (Line 1:1 - Line 16:11), node_modules\lucide-react\dist\esm\icons\notebook.js (Line 1:1 - Line 16:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M2 6h4", key: "aawbzj" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
["path", { d: "M15 2v20"node_modules\lucide-react\dist\esm\icons\notebook-pen.js (Line 12:3 - Line 17:7), node_modules\lucide-react\dist\esm\icons\notebook.js (Line 11:3 - Line 15:7)
["path", { d: "M2 6h4", key: "aawbzj" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
[
"path"node_modules\lucide-react\dist\esm\icons\monitor-up.js (Line 12:2 - Line 17:10), node_modules\lucide-react\dist\esm\icons\monitor-x.js (Line 12:2 - Line 17:9)
}],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
];
const MonitorUpnode_modules\lucide-react\dist\esm\icons\monitor-pause.js (Line 12:2 - Line 17:13), node_modules\lucide-react\dist\esm\icons\monitor-x.js (Line 12:2 - Line 17:9)
}],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
];
const MonitorPausenode_modules\lucide-react\dist\esm\icons\monitor-down.js (Line 12:2 - Line 17:12), node_modules\lucide-react\dist\esm\icons\monitor-x.js (Line 12:2 - Line 17:9)
}],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
];
const MonitorDownnode_modules\lucide-react\dist\esm\icons\monitor-check.js (Line 11:2 - Line 16:13), node_modules\lucide-react\dist\esm\icons\monitor-x.js (Line 12:2 - Line 17:9)
}],
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "M8 21h8", key: "1ev6f3" }]
];
const MonitorChecknode_modules\lucide-react\dist\esm\icons\lock-open.js (Line 1:1 - Line 12:26), node_modules\lucide-react\dist\esm\icons\lock.js (Line 1:1 - Line 12:27)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1"node_modules\lucide-react\dist\esm\icons\locate-fixed.js (Line 1:1 - Line 15:2), node_modules\lucide-react\dist\esm\icons\locate.js (Line 1:1 - Line 16:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["line", { x1: "2", x2: "5", y1: "12", y2: "12", key: "bvdh0s" }],
["line", { x1: "19", x2: "22", y1: "12", y2: "12", key: "1tbv5k" }],
["line", { x1: "12", x2: "12", y1: "2", y2: "5", key: "11lu5j" }],
["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }],
["circle", { cx: "12", cy: "12", r: "7", key: "fim9np" }],node_modules\lucide-react\dist\esm\icons\list-plus.js (Line 1:1 - Line 14:10), node_modules\lucide-react\dist\esm\icons\list-x.js (Line 1:1 - Line 14:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M11 12H3", key: "51ecnj" }],
["path", { d: "M16 6H3", key: "1wxfjs" }],
["path", { d: "M16 18H3", key: "12xzn7" }],
["path", { d: "M18 9v6"node_modules\lucide-react\dist\esm\icons\list-minus.js (Line 1:1 - Line 14:12), node_modules\lucide-react\dist\esm\icons\list-x.js (Line 1:1 - Line 14:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M11 12H3", key: "51ecnj" }],
["path", { d: "M16 6H3", key: "1wxfjs" }],
["path", { d: "M16 18H3", key: "12xzn7" }],
["path", { d: "M21 12h-6"node_modules\lucide-react\dist\esm\icons\list-collapse.js (Line 1:1 - Line 14:16), node_modules\lucide-react\dist\esm\icons\list-ordered.js (Line 1:1 - Line 14:10)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M10 12h11", key: "6m4ad9" }],
["path", { d: "M10 18h11", key: "11hvi2" }],
["path", { d: "M10 6h11", key: "c7qv1k" }],
["path", { d: "m3 10 3-3-3-3"node_modules\lucide-react\dist\esm\icons\layout-grid.js (Line 1:1 - Line 12:5), node_modules\lucide-react\dist\esm\icons\layout-list.js (Line 1:1 - Line 12:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
["rect", { width: "7", height: "7", x: "14"node_modules\lucide-react\dist\esm\icons\indent-decrease.js (Line 1:1 - Line 14:15), node_modules\lucide-react\dist\esm\icons\indent-increase.js (Line 1:1 - Line 14:15)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M21 12H11", key: "wd7e0v" }],
["path", { d: "M21 18H11", key: "4wu86t" }],
["path", { d: "M21 6H11", key: "6dy1d6" }],
["path", { d: "m7 8-4 4 4 4"node_modules\lucide-react\dist\esm\icons\heading-5.js (Line 1:1 - Line 14:7), node_modules\lucide-react\dist\esm\icons\heading-6.js (Line 1:1 - Line 14:9)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 12h8", key: "17cfdx" }],
["path", { d: "M4 18V6", key: "1rz3zl" }],
["path", { d: "M12 18V6", key: "zqpxq5" }],
["path"node_modules\lucide-react\dist\esm\icons\heading-3.js (Line 1:1 - Line 14:47), node_modules\lucide-react\dist\esm\icons\heading-6.js (Line 1:1 - Line 14:14)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 12h8", key: "17cfdx" }],
["path", { d: "M4 18V6", key: "1rz3zl" }],
["path", { d: "M12 18V6", key: "zqpxq5" }],
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"node_modules\lucide-react\dist\esm\icons\heading-2.js (Line 1:1 - Line 14:40), node_modules\lucide-react\dist\esm\icons\heading-6.js (Line 1:1 - Line 14:14)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 12h8", key: "17cfdx" }],
["path", { d: "M4 18V6", key: "1rz3zl" }],
["path", { d: "M12 18V6", key: "zqpxq5" }],
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"node_modules\lucide-react\dist\esm\icons\heading-1.js (Line 1:1 - Line 14:15), node_modules\lucide-react\dist\esm\icons\heading-6.js (Line 1:1 - Line 14:14)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 12h8", key: "17cfdx" }],
["path", { d: "M4 18V6", key: "1rz3zl" }],
["path", { d: "M12 18V6", key: "zqpxq5" }],
["path", { d: "m17 12 3-2v8"node_modules\lucide-react\dist\esm\icons\hard-drive-download.js (Line 12:2 - Line 17:18), node_modules\lucide-react\dist\esm\icons\hard-drive-upload.js (Line 12:2 - Line 17:16)
}],
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", key: "w68u3i" }],
["path", { d: "M6 18h.01", key: "uhywen" }],
["path", { d: "M10 18h.01", key: "h775k" }]
];
const HardDriveDownloadnode_modules\lucide-react\dist\esm\icons\grid-3x3.js (Line 1:1 - Line 13:2), node_modules\lucide-react\dist\esm\icons\panels-top-left.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["path", { d: "M3 15h18", key: "5xshup" }],node_modules\lucide-react\dist\esm\icons\git-pull-request-draft.js (Line 1:1 - Line 13:10), node_modules\lucide-react\dist\esm\icons\git-pull-request.js (Line 1:1 - Line 13:26)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M18 6V5"node_modules\lucide-react\dist\esm\icons\git-pull-request-closed.js (Line 1:1 - Line 13:12), node_modules\lucide-react\dist\esm\icons\git-pull-request-create.js (Line 1:1 - Line 13:26)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 9v12", key: "1sc30k" }],
["path", { d: "m21 3-6 6"node_modules\lucide-react\dist\esm\icons\git-merge.js (Line 1:1 - Line 13:24), node_modules\lucide-react\dist\esm\icons\git-pull-request.js (Line 1:1 - Line 13:26)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 21V9a9 9 0 0 0 9 9"node_modules\lucide-react\dist\esm\icons\git-compare.js (Line 1:1 - Line 14:7), node_modules\lucide-react\dist\esm\icons\git-pull-request.js (Line 1:1 - Line 14:7)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M13 6h3a2 2 0 0 1 2 2v7", key: "1yeb86" }],
["path"node_modules\lucide-react\dist\esm\icons\fullscreen.js (Line 1:1 - Line 15:7), node_modules\lucide-react\dist\esm\icons\scan.js (Line 1:1 - Line 15:7)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["rect"node_modules\lucide-react\dist\esm\icons\folder-cog.js (Line 18:3 - Line 24:26), node_modules\lucide-react\dist\esm\icons\wifi-cog.js (Line 11:3 - Line 17:27)
["path", { d: "m14.305 19.53.923-.382", key: "3m78fa" }],
["path", { d: "m15.228 16.852-.923-.383", key: "npixar" }],
["path", { d: "m16.852 15.228-.383-.923", key: "5xggr7" }],
["path", { d: "m16.852 20.772-.383.924", key: "dpfhf9" }],
["path", { d: "m19.148 15.228.383-.923", key: "1reyyz" }],
["path", { d: "m19.53 21.696-.382-.924", key: "1goivc" }],
["path", { d: "m20.772 16.852.924-.383"node_modules\lucide-react\dist\esm\icons\fold-vertical.js (Line 1:1 - Line 17:17), node_modules\lucide-react\dist\esm\icons\unfold-vertical.js (Line 1:1 - Line 17:17)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M12 22v-6", key: "6o8u61" }],
["path", { d: "M12 8V2", key: "1wkif3" }],
["path", { d: "M4 12H2", key: "rhcxmi" }],
["path", { d: "M10 12H8", key: "s88cx1" }],
["path", { d: "M16 12h-2", key: "10asgb" }],
["path", { d: "M22 12h-2", key: "14jgyd" }],
["path", { d: "m15 19-3-3-3 3"node_modules\lucide-react\dist\esm\icons\fold-horizontal.js (Line 12:2 - Line 17:16), node_modules\lucide-react\dist\esm\icons\unfold-horizontal.js (Line 12:2 - Line 17:17)
}],
["path", { d: "M12 2v2", key: "tus03m" }],
["path", { d: "M12 8v2", key: "1woqiv" }],
["path", { d: "M12 14v2", key: "8jcxud" }],
["path", { d: "M12 20v2", key: "1lh1kg" }],
["path", { d: "m19 9-3 3 3 3"node_modules\lucide-react\dist\esm\icons\focus.js (Line 12:3 - Line 17:6), node_modules\lucide-react\dist\esm\icons\scan.js (Line 11:3 - Line 16:5)
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }]
];
const Focusnode_modules\lucide-react\dist\esm\icons\flip-vertical.js (Line 12:2 - Line 17:2), node_modules\lucide-react\dist\esm\icons\unfold-vertical.js (Line 12:2 - Line 16:2)
}],
["path", { d: "M4 12H2", key: "rhcxmi" }],
["path", { d: "M10 12H8", key: "s88cx1" }],
["path", { d: "M16 12h-2", key: "10asgb" }],
["path", { d: "M22 12h-2", key: "14jgyd" }]
]node_modules\lucide-react\dist\esm\icons\flip-vertical-2.js (Line 12:2 - Line 18:14), node_modules\lucide-react\dist\esm\icons\unfold-vertical.js (Line 12:2 - Line 18:13)
}],
["path", { d: "M4 12H2", key: "rhcxmi" }],
["path", { d: "M10 12H8", key: "s88cx1" }],
["path", { d: "M16 12h-2", key: "10asgb" }],
["path", { d: "M22 12h-2", key: "14jgyd" }]
];
const FlipVertical2node_modules\lucide-react\dist\esm\icons\flip-horizontal-2.js (Line 12:2 - Line 18:16), node_modules\lucide-react\dist\esm\icons\flip-horizontal.js (Line 12:2 - Line 18:15)
}],
["path", { d: "M12 20v2", key: "1lh1kg" }],
["path", { d: "M12 14v2", key: "8jcxud" }],
["path", { d: "M12 8v2", key: "1woqiv" }],
["path", { d: "M12 2v2", key: "tus03m" }]
];
const FlipHorizontal2node_modules\lucide-react\dist\esm\icons\file-minus.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\file-plus.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M9 15h6", key: "cctwl0" }]
]node_modules\lucide-react\dist\esm\icons\file-minus-2.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\file-plus-2.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M3 15h6", key: "4e2qda" }]
]node_modules\lucide-react\dist\esm\icons\equal-not.js (Line 1:1 - Line 12:2), node_modules\lucide-react\dist\esm\icons\equal.js (Line 1:1 - Line 13:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["line", { x1: "5", x2: "19", y1: "9", y2: "9", key: "1nwqeh" }],
["line", { x1: "5", x2: "19", y1: "15", y2: "15", key: "g8yjpy" }],node_modules\lucide-react\dist\esm\icons\disc-album.js (Line 1:1 - Line 12:4), node_modules\lucide-react\dist\esm\icons\square-user.js (Line 1:1 - Line 12:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["circle", { cx: "12", cy: "12", r: "5"node_modules\lucide-react\dist\esm\icons\dice-6.js (Line 1:1 - Line 12:12), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 12:12)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M16 8h.01"node_modules\lucide-react\dist\esm\icons\dice-5.js (Line 1:1 - Line 13:11), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 13:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M16 8h.01", key: "cr5u4v" }],
["path", { d: "M8 8h.01"node_modules\lucide-react\dist\esm\icons\dice-4.js (Line 1:1 - Line 16:2), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M16 8h.01", key: "cr5u4v" }],
["path", { d: "M8 8h.01", key: "1e4136" }],
["path", { d: "M8 16h.01", key: "18s6g9" }],
["path", { d: "M16 16h.01", key: "1f9h7w" }]
]node_modules\lucide-react\dist\esm\icons\dice-3.js (Line 1:1 - Line 13:13), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 13:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M16 8h.01", key: "cr5u4v" }],
["path", { d: "M12 12h.01"node_modules\lucide-react\dist\esm\icons\dice-2.js (Line 1:1 - Line 12:12), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 12:12)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M15 9h.01"node_modules\lucide-react\dist\esm\icons\dice-1.js (Line 1:1 - Line 12:13), node_modules\lucide-react\dist\esm\icons\square-x.js (Line 1:1 - Line 12:12)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M12 12h.01"node_modules\lucide-react\dist\esm\icons\columns-3.js (Line 1:1 - Line 13:11), node_modules\lucide-react\dist\esm\icons\panels-left-bottom.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M9 3v18", key: "fh3hqa" }],
["path", { d: "M15 3v18"node_modules\lucide-react\dist\esm\icons\cloud-sun-rain.js (Line 1:1 - Line 16:44), node_modules\lucide-react\dist\esm\icons\cloud-sun.js (Line 1:1 - Line 16:45)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M12 2v2", key: "tus03m" }],
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
["path", { d: "M20 12h2", key: "1q8mjw" }],
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }],
["path", { d: "M15.947 12.65a4 4 0 0 0-5.925-4.128", key: "dpwdj0" }],
["path", { d: "M3 20a5 5 0 1 1 8.9-4H13a3 3 0 0 1 2 5.24"node_modules\lucide-react\dist\esm\icons\clipboard-x.js (Line 1:1 - Line 18:2), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],node_modules\lucide-react\dist\esm\icons\clipboard-type.js (Line 1:1 - Line 19:15), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M9 12v-1h6v1"node_modules\lucide-react\dist\esm\icons\clipboard-plus.js (Line 1:1 - Line 19:10), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M9 14h6"node_modules\lucide-react\dist\esm\icons\clipboard-minus.js (Line 1:1 - Line 20:2), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M9 14h6", key: "159ibu" }]
]node_modules\lucide-react\dist\esm\icons\clipboard-list.js (Line 1:1 - Line 19:11), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M12 11h4"node_modules\lucide-react\dist\esm\icons\clipboard-copy.js (Line 1:1 - Line 12:60), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 15:75)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"node_modules\lucide-react\dist\esm\icons\clipboard-check.js (Line 1:1 - Line 19:16), node_modules\lucide-react\dist\esm\icons\clipboard.js (Line 1:1 - Line 19:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "m9 14 2 2 4-4"node_modules\lucide-react\dist\esm\icons\circle-percent.js (Line 1:1 - Line 13:11), node_modules\lucide-react\dist\esm\icons\circle-x.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
["path", { d: "M9 9h.01"node_modules\lucide-react\dist\esm\icons\circle-fading-plus.js (Line 13:2 - Line 19:17), node_modules\lucide-react\dist\esm\icons\clock-fading.js (Line 12:2 - Line 18:12)
}],
["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3", key: "1vce0s" }],
["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4", key: "o3fkw4" }],
["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857", key: "1szpfk" }],
["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38", key: "9yhvd4" }]
];
const CircleFadingPlusnode_modules\lucide-react\dist\esm\icons\circle-fading-arrow-up.js (Line 13:2 - Line 19:20), node_modules\lucide-react\dist\esm\icons\clock-fading.js (Line 12:2 - Line 18:12)
}],
["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3", key: "1vce0s" }],
["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4", key: "o3fkw4" }],
["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857", key: "1szpfk" }],
["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38", key: "9yhvd4" }]
];
const CircleFadingArrowUpnode_modules\lucide-react\dist\esm\icons\car-front.js (Line 11:3 - Line 21:9), node_modules\lucide-react\dist\esm\icons\car-taxi-front.js (Line 12:3 - Line 22:13)
[
"path",
{ d: "m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8", key: "1imjwt" }
],
["path", { d: "M7 14h.01", key: "1qa3f1" }],
["path", { d: "M17 14h.01", key: "7oqj8z" }],
["rect", { width: "18", height: "8", x: "3", y: "10", rx: "2", key: "a7itu8" }],
["path", { d: "M5 18v2", key: "ppbyun" }],
["path", { d: "M19 18v2", key: "gy7782" }]
];
const CarFrontnode_modules\lucide-react\dist\esm\icons\calendar-x.js (Line 1:1 - Line 14:2), node_modules\lucide-react\dist\esm\icons\calendar.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],node_modules\lucide-react\dist\esm\icons\calendar-plus-2.js (Line 1:1 - Line 15:11), node_modules\lucide-react\dist\esm\icons\calendar.js (Line 1:1 - Line 15:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M10 16h4"node_modules\lucide-react\dist\esm\icons\calendar-minus-2.js (Line 1:1 - Line 16:2), node_modules\lucide-react\dist\esm\icons\calendar.js (Line 1:1 - Line 15:2)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M10 16h4", key: "17e571" }]
]node_modules\lucide-react\dist\esm\icons\calendar-days.js (Line 1:1 - Line 15:12), node_modules\lucide-react\dist\esm\icons\calendar.js (Line 1:1 - Line 15:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M8 14h.01"node_modules\lucide-react\dist\esm\icons\calendar-cog.js (Line 14:2 - Line 20:7), node_modules\lucide-react\dist\esm\icons\wifi-cog.js (Line 13:2 - Line 26:9)
}],
["path", { d: "m16.852 20.772-.383.924", key: "dpfhf9" }],
["path", { d: "m19.148 15.228.383-.923", key: "1reyyz" }],
["path", { d: "m19.53 21.696-.382-.924", key: "1goivc" }],
["path", { d: "m20.772 16.852.924-.383", key: "htqkph" }],
["path", { d: "m20.772 19.148.924.383", key: "9w9pjp" }],
["path"node_modules\lucide-react\dist\esm\icons\calendar-cog.js (Line 20:2 - Line 25:12), node_modules\lucide-react\dist\esm\icons\calendar-search.js (Line 13:2 - Line 18:15)
}],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M8 2v4", key: "1cmpym" }],
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
];
const CalendarCognode_modules\lucide-react\dist\esm\icons\calendar-check.js (Line 1:1 - Line 15:16), node_modules\lucide-react\dist\esm\icons\calendar.js (Line 1:1 - Line 15:13)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "m9 16 2 2 4-4"node_modules\lucide-react\dist\esm\icons\badge-x.js (Line 16:5 - Line 21:7), node_modules\lucide-react\dist\esm\icons\variable.js (Line 12:2 - Line 16:9)
}
],
["line", { x1: "15", x2: "9", y1: "9", y2: "15", key: "f7djnv" }],
["line", { x1: "9", x2: "15", y1: "9", y2: "15", key: "1shsy8" }]
];
const BadgeXnode_modules\lucide-react\dist\esm\icons\badge-alert.js (Line 16:5 - Line 21:11), node_modules\lucide-react\dist\esm\icons\circle-alert.js (Line 11:2 - Line 15:12)
}
],
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
];
const BadgeAlertnode_modules\lucide-react\dist\esm\icons\arrow-down-z-a.js (Line 11:2 - Line 17:12), node_modules\lucide-react\dist\esm\icons\arrow-up-z-a.js (Line 11:2 - Line 17:10)
}],
["path", { d: "M7 4v16", key: "1glfcx" }],
["path", { d: "M15 4h5l-5 6h5", key: "8asdl1" }],
["path", { d: "M15 20v-3.5a2.5 2.5 0 0 1 5 0V20", key: "r6l5cz" }],
["path", { d: "M20 18h-5", key: "18j1r2" }]
];
const ArrowDownZAnode_modules\lucide-react\dist\esm\icons\arrow-down-1-0.js (Line 12:2 - Line 17:12), node_modules\lucide-react\dist\esm\icons\arrow-up-1-0.js (Line 12:2 - Line 17:10)
}],
["path", { d: "M17 10V4h-2", key: "zcsr5x" }],
["path", { d: "M15 10h4", key: "id2lce" }],
["rect", { x: "15", y: "14", width: "4", height: "6", ry: "2", key: "33xykx" }]
];
const ArrowDown10node_modules\lucide-react\dist\esm\icons\arrow-down-0-1.js (Line 12:2 - Line 17:12), node_modules\lucide-react\dist\esm\icons\arrow-up-0-1.js (Line 12:2 - Line 17:10)
}],
["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2", key: "1bwicg" }],
["path", { d: "M17 20v-6h-2", key: "1qp1so" }],
["path", { d: "M15 20h4", key: "1j968p" }]
];
const ArrowDown01node_modules\lucide-react\dist\esm\icons\archive-x.js (Line 1:1 - Line 13:14), node_modules\lucide-react\dist\esm\icons\archive.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
["path", { d: "m9.5 17 5-5"node_modules\lucide-react\dist\esm\icons\align-vertical-justify-center.js (Line 1:1 - Line 12:4), node_modules\lucide-react\dist\esm\icons\align-vertical-justify-start.js (Line 1:1 - Line 12:4)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "14", height: "6", x: "5", y: "16", rx: "2", key: "1i8z2d" }],
["rect", { width: "10", height: "6", x: "7", y: "2"node_modules\lucide-react\dist\esm\icons\align-vertical-distribute-end.js (Line 1:1 - Line 13:11), node_modules\lucide-react\dist\esm\icons\align-vertical-distribute-start.js (Line 1:1 - Line 13:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "14", height: "6", x: "5", y: "14", rx: "2", key: "jmoj9s" }],
["rect", { width: "10", height: "6", x: "7", y: "4", rx: "2", key: "aza5on" }],
["path", { d: "M2 20h20"node_modules\lucide-react\dist\esm\icons\align-horizontal-justify-center.js (Line 1:1 - Line 12:5), node_modules\lucide-react\dist\esm\icons\align-horizontal-justify-end.js (Line 1:1 - Line 12:5)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "6", height: "14", x: "2", y: "5", rx: "2", key: "dy24zr" }],
["rect", { width: "6", height: "10", x: "16"node_modules\lucide-react\dist\esm\icons\align-horizontal-distribute-end.js (Line 1:1 - Line 13:11), node_modules\lucide-react\dist\esm\icons\align-horizontal-distribute-start.js (Line 1:1 - Line 13:10)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2", key: "1wwnby" }],
["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2", key: "1fe6j6" }],
["path", { d: "M10 2v20"node_modules\lucide-react\dist\esm\icons\align-horizontal-distribute-center.js (Line 1:1 - Line 13:12), node_modules\lucide-react\dist\esm\icons\align-horizontal-distribute-start.js (Line 1:1 - Line 13:10)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2", key: "1wwnby" }],
["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2", key: "1fe6j6" }],
["path", { d: "M17 22v-5"node_modules\lucide-react\dist\esm\icons\alarm-clock-minus.js (Line 1:1 - Line 16:10), node_modules\lucide-react\dist\esm\icons\alarm-clock-plus.js (Line 1:1 - Line 16:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "12", cy: "13", r: "8", key: "3y4lt7" }],
["path", { d: "M5 3 2 6", key: "18tl5t" }],
["path", { d: "m22 6-3-3", key: "1opdir" }],
["path", { d: "M6.38 18.7 4 21", key: "17xu3x" }],
["path", { d: "M17.64 18.67 20 21", key: "kv2oe2" }],
["path", { d: "M9 13h6"node_modules\lucide-react\dist\esm\icons\alarm-clock-check.js (Line 1:1 - Line 16:16), node_modules\lucide-react\dist\esm\icons\alarm-clock-plus.js (Line 1:1 - Line 16:11)
/**
* @license lucide-react v0.541.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const __iconNode = [
["circle", { cx: "12", cy: "13", r: "8", key: "3y4lt7" }],
["path", { d: "M5 3 2 6", key: "18tl5t" }],
["path", { d: "m22 6-3-3", key: "1opdir" }],
["path", { d: "M6.38 18.7 4 21", key: "17xu3x" }],
["path", { d: "M17.64 18.67 20 21", key: "kv2oe2" }],
["path", { d: "m9 13 2 2 4-4"node_modules\jsx-ast-utils\lib\values\expressions\UnaryExpression.js (Line 19:9 - Line 39:2), node_modules\jsx-ast-utils\src\values\expressions\UnaryExpression.js (Line 12:6 - Line 31:2)
;
switch (operator) {
case '-':
return -getValue(argument);
case '+':
return +getValue(argument); // eslint-disable-line no-implicit-coercion
case '!':
return !getValue(argument);
case '~':
return ~getValue(argument); // eslint-disable-line no-bitwise
case 'delete':
// I believe delete statements evaluate to true.
return true;
case 'typeof':
case 'void':
default:
return undefined;
}
}node_modules\jsx-ast-utils\lib\values\expressions\TSNonNullExpression.js (Line 33:5 - Line 56:4), node_modules\jsx-ast-utils\src\values\expressions\TSNonNullExpression.js (Line 27:6 - Line 49:6)
;
return name;
}
if (value.type === 'Literal') {
return value.value;
}
if (value.type === 'TSAsExpression') {
return extractValueFromTSNonNullExpression(value.expression);
}
if (value.type === 'CallExpression') {
return extractValueFromCallExpression(value);
}
if (value.type === 'ThisExpression') {
return extractValueFromThisExpression();
}
// does not contains properties & is not parenthesized
if (value.type === 'TSNonNullExpression' && (!value.extra || value.extra.parenthesized === false)) {
varnode_modules\jsx-ast-utils\lib\values\expressions\index.js (Line 224:2 - Line 237:9), node_modules\jsx-ast-utils\src\values\expressions\index.js (Line 123:2 - Line 136:2)
isUndefined = TYPES.Identifier.call(undefined, value) === undefined;
return isUndefined ? undefined : null;
},
JSXElement: noop,
JSXFragment: noop,
JSXText: noop,
ArrowFunctionExpression: noop,
FunctionExpression: noop,
LogicalExpression: noop,
MemberExpression: noop,
OptionalCallExpression: noop,
OptionalMemberExpression: noop,
CallExpression: noop,
UnaryExpression: functionnode_modules\jsx-ast-utils\lib\values\expressions\BinaryExpression.js (Line 15:33 - Line 25:7), node_modules\jsx-ast-utils\lib\values\expressions\LogicalExpression.js (Line 15:34 - Line 25:3)
(value) {
// eslint-disable-next-line global-require
var getValue = require('.').default;
var operator = value.operator,
left = value.left,
right = value.right;
var leftVal = getValue(left);
var rightVal = getValue(right);
switchnode_modules\jsx-ast-utils\lib\values\expressions\BinaryExpression.js (Line 23:2 - Line 78:2), node_modules\jsx-ast-utils\src\values\expressions\BinaryExpression.js (Line 14:2 - Line 69:2)
rightVal = getValue(right);
switch (operator) {
case '==':
return leftVal == rightVal; // eslint-disable-line
case '!=':
return leftVal != rightVal; // eslint-disable-line
case '===':
return leftVal === rightVal;
case '!==':
return leftVal !== rightVal;
case '<':
return leftVal < rightVal;
case '<=':
return leftVal <= rightVal;
case '>':
return leftVal > rightVal;
case '>=':
return leftVal >= rightVal;
case '<<':
return leftVal << rightVal; // eslint-disable-line no-bitwise
case '>>':
return leftVal >> rightVal; // eslint-disable-line no-bitwise
case '>>>':
return leftVal >>> rightVal; // eslint-disable-line no-bitwise
case '+':
return leftVal + rightVal;
case '-':
return leftVal - rightVal;
case '*':
return leftVal * rightVal;
case '/':
return leftVal / rightVal;
case '%':
return leftVal % rightVal;
case '|':
return leftVal | rightVal; // eslint-disable-line no-bitwise
case '^':
return leftVal ^ rightVal; // eslint-disable-line no-bitwise
case '&':
return leftVal & rightVal; // eslint-disable-line no-bitwise
case 'in':
try {
return leftVal in rightVal;
} catch (err) {
return false;
}
case 'instanceof':
if (typeof rightVal !== 'function') {
return false;
}
return leftVal instanceof rightVal;
default:
return undefined;
}
}node_modules\goober\src\core\__tests__\hash.test.js (Line 21:2 - Line 31:9), node_modules\goober\src\core\__tests__\hash.test.js (Line 5:12 - Line 15:5)
;
jest.mock('../astish', () => ({
astish: jest.fn().mockReturnValue('astish()')
}));
jest.mock('../parse', () => ({
parse: jest.fn().mockReturnValue('parse()')
}));
describenode_modules\goober\src\core\__tests__\hash.test.js (Line 64:9 - Line 72:35), node_modules\goober\src\core\__tests__\hash.test.js (Line 53:2 - Line 61:21)
);
expect(astish).not.toBeCalled();
expect(parse).not.toBeCalled();
expect(update).toBeCalledWith('parse()', 'target', undefined, null);
expect(res).toEqual('toHash()');
});
it('regression: global-style-replace'node_modules\goober\src\core\__tests__\hash.test.js (Line 86:12 - Line 94:21), node_modules\goober\src\core\__tests__\hash.test.js (Line 53:2 - Line 61:21)
);
expect(astish).not.toBeCalled();
expect(parse).not.toBeCalled();
expect(update).toBeCalledWith('parse()', 'target', undefined, null);
expect(res).toEqual('toHash()');
});
it('regression: object'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 580:23 - Line 599:32), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 566:18 - Line 585:42)
);
}
t.end();
});
test('non-string "main" field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
try {
var result = resolve.sync('./invalid_main', { basedir: dir });
t.equal(result, undefined, 'result should not exist');
t.fail('should not get here');
} catch (err) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
}
t.end();
});
test('browser field in package.json'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 22:11 - Line 28:8), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 16:8 - Line 22:11)
, { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
t.equal(pkg && pkg.name, 'resolve');
});
resolve('./foo'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 64:2 - Line 72:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 58:11 - Line 66:2)
);
resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
t.equal(pkg, undefined);
});
resolve('foo', { basedir: dir + '/bar',node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 89:2 - Line 94:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 83:2 - Line 89:8)
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'baz/quux.js'));
t.equal(pkg.main, 'quux.js');
});
}node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 118:2 - Line 124:6), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 112:2 - Line 118:11)
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
resolve('tiv'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 136:2 - Line 142:10), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 124:2 - Line 130:8)
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'tiv/index.js'));
t.equal(pkg, undefined);
});
resolve('tiv', { basedir: dir + '/garply'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 148:2 - Line 154:7), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 100:2 - Line 106:9)
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'grux/index.js'));
t.equal(pkg, undefined);
});
resolve('grux'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 160:2 - Line 166:9), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 112:2 - Line 118:11)
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
resolve('garply'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 166:2 - Line 171:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 118:2 - Line 118:8)
} }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
}node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 300:19 - Line 306:16), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 288:15 - Line 294:17)
, { basedir: resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'index.js'));
});
});
test('missing index'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 322:17 - Line 328:12), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 288:15 - Line 294:17)
, { basedir: resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'index.js'));
});
});
test('null main'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 334:14 - Line 340:14), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 288:15 - Line 294:17)
, { basedir: resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'index.js'));
});
});
test('main: false'node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 482:19 - Line 499:32), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 469:18 - Line 486:42)
);
});
});
test('non-string "main" field in package.json', function (t) {
t.plan(5);
var dir = path.join(__dirname, 'resolver');
resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
t.equal(res, undefined, 'res is undefined');
t.equal(pkg, undefined, 'pkg is undefined');
});
});
test('browser field in package.json'node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 34:6 - Line 43:28), node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 22:6 - Line 31:28)
, {
paths: [
path.join(__dirname, '/node_path/x'),
path.join(__dirname, '/node_path/y')
],
basedir: __dirname,
isDirectory: isDir
}, function (err, res) {
t.error(err);
t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 46:6 - Line 55:28), node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 22:6 - Line 31:28)
, {
paths: [
path.join(__dirname, '/node_path/x'),
path.join(__dirname, '/node_path/y')
],
basedir: __dirname,
isDirectory: isDir
}, function (err, res) {
t.error(err);
t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'node_modules\eslint-plugin-react\node_modules\resolve\test\node-modules-paths.js (Line 136:36 - Line 143:2), node_modules\eslint-plugin-react\node_modules\resolve\test\node-modules-paths.js (Line 125:6 - Line 133:2)
];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
}node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 62:7 - Line 84:6), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 12:11 - Line 34:8)
)] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.equal(
resolve.sync('bar'node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 103:13 - Line 114:4), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 17:13 - Line 28:7)
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
varnode_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 157:15 - Line 166:15), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 15:8 - Line 24:9)
) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: useReadPackagenode_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 38:11 - Line 44:6), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 32:8 - Line 38:11)
, opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg, undefined);
});
resolve('baz'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 55:20 - Line 68:5), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 5:7 - Line 18:5)
, function (t) {
t.plan(8);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, filenode_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 75:5 - Line 86:3), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 24:2 - Line 35:2)
]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg &&node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 86:6 - Line 92:3), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 35:10 - Line 41:2)
);
});
resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg &&node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 89:11 - Line 95:6), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 83:8 - Line 89:11)
, opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg && pkg.main, 'bar');
});
resolve('baz'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 92:6 - Line 106:15), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 41:10 - Line 55:20)
);
});
resolve('baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
resolve('../baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
});
test('mock package'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 107:2 - Line 122:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 53:2 - Line 68:2)
);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file,node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 117:20 - Line 137:6), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 12:11 - Line 32:8)
)] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('bar'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 144:28 - Line 166:10), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 106:15 - Line 23:9)
, function (t) {
t.plan(2);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 161:2 - Line 168:5), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 68:5 - Line 75:5)
));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package': { main: 'bar' },
readFile: function (file, cb) {
cb(null, files[pathnode_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 166:2 - Line 183:12), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 22:13 - Line 144:28)
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('bar', opts('/foo'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
t.equal(pkg && pkg.main, './baz.js');
});
});
test('symlinked'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 184:2 - Line 198:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 90:2 - Line 104:2)
);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
dirs[path.resolve('/foo/bar/symlinked')] = true;
function opts(basedir) {
return {
preserveSymlinks: false,
basedir: path.resolve(basedir),
isFile: function (file,node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 197:13 - Line 208:4), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 16:13 - Line 27:3)
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
varnode_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 230:28 - Line 236:28), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 34:18 - Line 40:18)
));
t.equal(pkg, undefined);
});
resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 234:11 - Line 239:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 228:8 - Line 234:8)
, opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
t.equal(pkg, undefined);
});
}node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 241:14 - Line 255:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 143:18 - Line 157:2)
, function (t) {
t.plan(3);
var files = {};
files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop';
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir)node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 249:7 - Line 274:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 59:2 - Line 176:8)
;
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package': { main: 'bar' },
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
tnode_modules\eslint-plugin-react\node_modules\resolve\test\home_paths.js (Line 1:1 - Line 19:11), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 1:1 - Line 19:10)
'use strict';
var fs = require('fs');
var homedir = require('../lib/homedir');
var path = require('path');
var test = require('tape');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var mv = require('mv');
var copyDir = require('copy-dir');
var tmp = require('tmp');
var HOME = homedir();
var hnm = path.join(HOME, '.node_modules');
var hnl = path.join(HOME, '.node_libraries');
var resolve = require('../async'node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths.js (Line 19:11 - Line 68:7), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 19:10 - Line 68:11)
);
function makeDir(t, dir, cb) {
mkdirp(dir, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function cleanup() {
rimraf.sync(dir);
});
cb();
}
});
}
function makeTempDir(t, dir, cb) {
if (fs.existsSync(dir)) {
var tmpResult = tmp.dirSync();
t.teardown(tmpResult.removeCallback);
var backup = path.join(tmpResult.name, path.basename(dir));
mv(dir, backup, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function () {
mv(backup, dir, cb);
});
makeDir(t, dir, cb);
}
});
} else {
makeDir(t, dir, cb);
}
}
test('homedir module paths', function (t) {
t.plan(7);
makeTempDir(t, hnm, function (err) {
t.error(err, 'no error with HNM temp dir');
if (err) {
return t.end();
}
var bazHNMDir = path.join(hnm, 'baz');
var dotMainDir = path.join(hnm, 'dot_main');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir);
copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir);
var bazPkgnode_modules\eslint-plugin-react\node_modules\resolve\test\home_paths.js (Line 69:2 - Line 86:4), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 66:2 - Line 83:8)
;
var bazHNMmain = path.join(bazHNMDir, 'quux.js');
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
var dotMainMain = path.join(dotMainDir, 'index.js');
t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`');
makeTempDir(t, hnl, function (err) {
t.error(err, 'no error with HNL temp dir');
if (err) {
return t.end();
}
var bazHNLDir = path.join(hnl, 'baz');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir);
var dotSlashMainDir = path.join(hnl, 'dot_slash_main');
var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js');
varnode_modules\eslint-plugin-react\node_modules\resolve\test\home_paths.js (Line 86:2 - Line 96:2), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 82:2 - Line 92:2)
;
copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir);
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`');
t.test('with temp dirs', function (st) {
st.plan(3);
st.test('just in `$HOME/.node_modules`', function (s2t) {
s2t.plan(3node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 30:5 - Line 39:4), node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 13:9 - Line 22:8)
fs.stat(dir, function (err, stat) {
if (!err) {
return cb(null, stat.isDirectory());
}
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
return cb(err);
});
};
varnode_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 65:2 - Line 76:8), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 58:2 - Line 69:12)
);
};
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
var dirs = nodeModulesPaths(start, opts, x);
for (var i = 0; i < dirs.length; i++) {
dirs[i] = path.join(dirs[i], x);
}
return dirs;
};
module.exports = function resolvenode_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 101:2 - Line 113:5), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 81:63 - Line 93:18)
);
}
var packageIterator = opts.packageIterator;
var extensions = opts.extensions || ['.js'];
var includeCoreModules = opts.includeCoreModules !== false;
var basedir = opts.basedir || path.dirname(caller());
var parent = opts.filename || basedir;
opts.paths = opts.paths || defaultPaths();
// ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
var absoluteStart = pathnode_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayHaveAccessibleLabel-test.js (Line 168:3 - Line 177:15), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayHaveAccessibleLabel-test.js (Line 12:2 - Line 20:2)
.equal(
mayHaveAccessibleLabel(
JSXElementMock('div', [], [
JSXElementMock('div', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], [
JSXElementMocknode_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayContainChildComponent-test.js (Line 10:25 - Line 26:17), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayHaveAccessibleLabel-test.js (Line 13:23 - Line 29:2)
(
JSXElementMock('div', [], [
JSXElementMock('div', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], []),
]),
]),
]),
JSXElementMock('span', [], []),
JSXElementMock('img', [
JSXAttributeMock('src', 'some/path'),
]),
]),
'FancyComponent'node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayContainChildComponent-test.js (Line 83:3 - Line 93:15), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\mayContainChildComponent-test.js (Line 9:2 - Line 178:12)
.equal(
mayContainChildComponent(
JSXElementMock('div', [], [
JSXElementMock('div', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], []),
JSXElementMock('span', [], [
JSXElementMock('span', [], [
JSXElementMock('span', [], [
JSXElementMocknode_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 52:23 - Line 66:28), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 37:30 - Line 51:23)
().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('interactive role elements'node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 67:27 - Line 81:25), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 37:30 - Line 51:23)
().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('indeterminate elements'node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 82:36 - Line 96:4), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isNonInteractiveElement-test.js (Line 37:30 - Line 51:5)
().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.endnode_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 53:26 - Line 67:32), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 38:27 - Line 52:27)
().forEach(({ openingElement }) => {
st.equal(
isInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as an interactive element`,
);
});
st.end();
});
t.test('non-interactive role elements'node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 68:30 - Line 82:25), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 38:27 - Line 52:27)
().forEach(({ openingElement }) => {
st.equal(
isInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as an interactive element`,
);
});
st.end();
});
t.test('indeterminate elements'node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 83:36 - Line 97:6), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isInteractiveElement-test.js (Line 38:27 - Line 52:5)
().forEach(({ openingElement }) => {
st.equal(
isInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as an interactive element`,
);
});
st.end();
});
t.equalnode_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isFocusable-test.js (Line 67:22 - Line 97:3), node_modules\eslint-plugin-jsx-a11y\__tests__\src\util\isFocusable-test.js (Line 25:15 - Line 54:2)
${genElementSymbol(openingElement)}\` as a focusable element`,
);
st.equal(
isFocusable(
elementType(openingElement),
mergeTabIndex(-1, openingElement.attributes),
),
false,
`does NOT identify \`${genElementSymbol(openingElement)}\` with tabIndex of -1 as a focusable element`,
);
st.equal(
isFocusable(
elementType(openingElement),
mergeTabIndex(0, openingElement.attributes),
),
true,
`identifies \`${genElementSymbol(openingElement)}\` with tabIndex of 0 as a focusable element`,
);
st.equal(
isFocusable(
elementType(openingElement),
mergeTabIndex(1, openingElement.attributes),
),
true,
`identifies \`${genElementSymbol(openingElement)}\` with tabIndex of 1 as a focusable element`,
);
stnode_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 392:2 - Line 429:47), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 249:2 - Line 286:2)
},
{ code: '<div onSelect={() => {}} />;' },
{ code: '<div onTouchCancel={() => {}} />;' },
{ code: '<div onTouchEnd={() => {}} />;' },
{ code: '<div onTouchMove={() => {}} />;' },
{ code: '<div onTouchStart={() => {}} />;' },
{ code: '<div onScroll={() => {}} />;' },
{ code: '<div onWheel={() => {}} />;' },
{ code: '<div onAbort={() => {}} />;' },
{ code: '<div onCanPlay={() => {}} />;' },
{ code: '<div onCanPlayThrough={() => {}} />;' },
{ code: '<div onDurationChange={() => {}} />;' },
{ code: '<div onEmptied={() => {}} />;' },
{ code: '<div onEncrypted={() => {}} />;' },
{ code: '<div onEnded={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onLoadedData={() => {}} />;' },
{ code: '<div onLoadedMetadata={() => {}} />;' },
{ code: '<div onLoadStart={() => {}} />;' },
{ code: '<div onPause={() => {}} />;' },
{ code: '<div onPlay={() => {}} />;' },
{ code: '<div onPlaying={() => {}} />;' },
{ code: '<div onProgress={() => {}} />;' },
{ code: '<div onRateChange={() => {}} />;' },
{ code: '<div onSeeked={() => {}} />;' },
{ code: '<div onSeeking={() => {}} />;' },
{ code: '<div onStalled={() => {}} />;' },
{ code: '<div onSuspend={() => {}} />;' },
{ code: '<div onTimeUpdate={() => {}} />;' },
{ code: '<div onVolumeChange={() => {}} />;' },
{ code: '<div onWaiting={() => {}} />;' },
{ code: '<div onLoad={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onAnimationStart={() => {}} />;' },
{ code: '<div onAnimationEnd={() => {}} />;' },
{ code: '<div onAnimationIteration={() => {}} />;' },
{ code: '<div onTransitionEnd={() => {}} />;' },
// Expressions should pass in recommended modenode_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 466:2 - Line 483:22), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-tabindex-test.js (Line 90:5 - Line 107:39)
},
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
ruleTester.run(`${ruleName}:strict`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
)).map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
{ code: '<ul role="menu" />;'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 39:3 - Line 50:48), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 50:2 - Line 61:49)
},
/* All flavors of input */
{ code: '<input onClick={() => void 0} />' },
{ code: '<input type="button" onClick={() => void 0} />' },
{ code: '<input type="checkbox" onClick={() => void 0} />' },
{ code: '<input type="color" onClick={() => void 0} />' },
{ code: '<input type="date" onClick={() => void 0} />' },
{ code: '<input type="datetime" onClick={() => void 0} />' },
{ code: '<input type="datetime-local" onClick={() => void 0} />' },
{ code: '<input type="email" onClick={() => void 0} />' },
{ code: '<input type="file" onClick={() => void 0} />' },
{ code: '<input type="image" onClick={() => void 0} />'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 49:2 - Line 64:2), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 61:2 - Line 76:31)
},
{ code: '<input type="image" onClick={() => void 0} />' },
{ code: '<input type="month" onClick={() => void 0} />' },
{ code: '<input type="number" onClick={() => void 0} />' },
{ code: '<input type="password" onClick={() => void 0} />' },
{ code: '<input type="radio" onClick={() => void 0} />' },
{ code: '<input type="range" onClick={() => void 0} />' },
{ code: '<input type="reset" onClick={() => void 0} />' },
{ code: '<input type="search" onClick={() => void 0} />' },
{ code: '<input type="submit" onClick={() => void 0} />' },
{ code: '<input type="tel" onClick={() => void 0} />' },
{ code: '<input type="text" onClick={() => void 0} />' },
{ code: '<input type="time" onClick={() => void 0} />' },
{ code: '<input type="url" onClick={() => void 0} />' },
{ code: '<input type="week" onClick={() => void 0} />' },
{node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 209:2 - Line 219:53), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 102:2 - Line 112:2)
},
{ code: '<div role="searchbox" onClick={() => {}} />;' },
{ code: '<div role="slider" onClick={() => {}} />;' },
{ code: '<div role="spinbutton" onClick={() => {}} />;' },
{ code: '<div role="switch" onClick={() => {}} />;' },
{ code: '<div role="tab" onClick={() => {}} />;' },
{ code: '<div role="textbox" onClick={() => {}} />;' },
{ code: '<div role="treeitem" onClick={() => {}} />;' },
/* Presentation is a special case role that indicates intentional static semantics */
{ code: '<div role="presentation" onClick={() => {}} />;' },
/* HTML elements attributed with an abstract role */node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 218:2 - Line 229:45), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 177:2 - Line 188:44)
},
/* HTML elements attributed with an abstract role */
{ code: '<div role="command" onClick={() => {}} />;' },
{ code: '<div role="composite" onClick={() => {}} />;' },
{ code: '<div role="input" onClick={() => {}} />;' },
{ code: '<div role="landmark" onClick={() => {}} />;' },
{ code: '<div role="range" onClick={() => {}} />;' },
{ code: '<div role="roletype" onClick={() => {}} />;' },
{ code: '<div role="sectionhead" onClick={() => {}} />;' },
{ code: '<div role="select" onClick={() => {}} />;' },
{ code: '<div role="structure" onClick={() => {}} />;' },
{ code: '<div role="tablist" onClick={() => {}} />;'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 393:3 - Line 399:4), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-static-element-interactions-test.js (Line 358:2 - Line 364:12)
},
];
const recommendedOptions = configs.recommended.rules[`jsx-a11y/${ruleName}`][1] || {};
ruleTester.run(`${ruleName}:recommended`, rule, {
valid: parsers.all([].concat(
...node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 427:2 - Line 461:2), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 244:2 - Line 278:2)
},
{ code: '<div role="article" onSelect={() => {}} />;' },
{ code: '<div role="article" onTouchCancel={() => {}} />;' },
{ code: '<div role="article" onTouchEnd={() => {}} />;' },
{ code: '<div role="article" onTouchMove={() => {}} />;' },
{ code: '<div role="article" onTouchStart={() => {}} />;' },
{ code: '<div role="article" onScroll={() => {}} />;' },
{ code: '<div role="article" onWheel={() => {}} />;' },
{ code: '<div role="article" onAbort={() => {}} />;' },
{ code: '<div role="article" onCanPlay={() => {}} />;' },
{ code: '<div role="article" onCanPlayThrough={() => {}} />;' },
{ code: '<div role="article" onDurationChange={() => {}} />;' },
{ code: '<div role="article" onEmptied={() => {}} />;' },
{ code: '<div role="article" onEncrypted={() => {}} />;' },
{ code: '<div role="article" onEnded={() => {}} />;' },
{ code: '<div role="article" onLoadedData={() => {}} />;' },
{ code: '<div role="article" onLoadedMetadata={() => {}} />;' },
{ code: '<div role="article" onLoadStart={() => {}} />;' },
{ code: '<div role="article" onPause={() => {}} />;' },
{ code: '<div role="article" onPlay={() => {}} />;' },
{ code: '<div role="article" onPlaying={() => {}} />;' },
{ code: '<div role="article" onProgress={() => {}} />;' },
{ code: '<div role="article" onRateChange={() => {}} />;' },
{ code: '<div role="article" onSeeked={() => {}} />;' },
{ code: '<div role="article" onSeeking={() => {}} />;' },
{ code: '<div role="article" onStalled={() => {}} />;' },
{ code: '<div role="article" onSuspend={() => {}} />;' },
{ code: '<div role="article" onTimeUpdate={() => {}} />;' },
{ code: '<div role="article" onVolumeChange={() => {}} />;' },
{ code: '<div role="article" onWaiting={() => {}} />;' },
{ code: '<div role="article" onAnimationStart={() => {}} />;' },
{ code: '<div role="article" onAnimationEnd={() => {}} />;' },
{ code: '<div role="article" onAnimationIteration={() => {}} />;' },
{ code: '<div role="article" onTransitionEnd={() => {}} />;' },
)node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 460:2 - Line 471:6), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-tabindex-test.js (Line 90:5 - Line 101:11)
},
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
constnode_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 47:2 - Line 58:39), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 57:2 - Line 68:40)
},
/* All flavors of input */
{ code: '<input role="button" />' },
{ code: '<input type="button" role="button" />' },
{ code: '<input type="checkbox" role="button" />' },
{ code: '<input type="color" role="button" />' },
{ code: '<input type="date" role="button" />' },
{ code: '<input type="datetime" role="button" />' },
{ code: '<input type="datetime-local" role="button" />' },
{ code: '<input type="email" role="button" />' },
{ code: '<input type="file" role="button" />' },
{ code: '<input type="image" role="button" />'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 57:2 - Line 72:40), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 68:2 - Line 83:37)
},
{ code: '<input type="image" role="button" />' },
{ code: '<input type="month" role="button" />' },
{ code: '<input type="number" role="button" />' },
{ code: '<input type="password" role="button" />' },
{ code: '<input type="radio" role="button" />' },
{ code: '<input type="range" role="button" />' },
{ code: '<input type="reset" role="button" />' },
{ code: '<input type="search" role="button" />' },
{ code: '<input type="submit" role="button" />' },
{ code: '<input type="tel" role="button" />' },
{ code: '<input type="text" role="button" />' },
{ code: '<input type="time" role="button" />' },
{ code: '<input type="url" role="button" />' },
{ code: '<input type="week" role="button" />' },
{ code: '<input type="hidden" role="button" />'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 110:2 - Line 120:24), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 177:2 - Line 187:27)
},
{ code: '<div role="button" />;' },
{ code: '<div className="foo" role="button" />;' },
{ code: '<div className="foo" {...props} role="button" />;' },
{ code: '<div aria-hidden role="button" />;' },
{ code: '<div aria-hidden={true} role="button" />;' },
{ code: '<div role="button" />;' },
{ code: '<div role={undefined} role="button" />;' },
{ code: '<div {...props} role="button" />;' },
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} role="button" />;' },
{ code: '<dl role="button" />;'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 175:2 - Line 231:26), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 218:2 - Line 274:26)
},
{ code: '<title role="button" />;' },
{ code: '<track role="button" />;' },
{ code: '<tt role="button" />;' },
{ code: '<u role="button" />;' },
{ code: '<var role="button" />;' },
{ code: '<video role="button" />;' },
{ code: '<wbr role="button" />;' },
{ code: '<xmp role="button" />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" />;' },
{ code: '<div role="checkbox" />;' },
{ code: '<div role="columnheader" />;' },
{ code: '<div role="combobox" />;' },
{ code: '<div role="grid" />;' },
{ code: '<div role="gridcell" />;' },
{ code: '<div role="link" />;' },
{ code: '<div role="listbox" />;' },
{ code: '<div role="menu" />;' },
{ code: '<div role="menubar" />;' },
{ code: '<div role="menuitem" />;' },
{ code: '<div role="menuitemcheckbox" />;' },
{ code: '<div role="menuitemradio" />;' },
{ code: '<div role="option" />;' },
{ code: '<div role="progressbar" />;' },
{ code: '<div role="radio" />;' },
{ code: '<div role="radiogroup" />;' },
{ code: '<div role="row" />;' },
{ code: '<div role="rowheader" />;' },
{ code: '<div role="searchbox" />;' },
{ code: '<div role="slider" />;' },
{ code: '<div role="spinbutton" />;' },
{ code: '<div role="switch" />;' },
{ code: '<div role="tab" />;' },
{ code: '<div role="textbox" />;' },
{ code: '<div role="treeitem" />;' },
/* Presentation is a special case role that indicates intentional static semantics */
{ code: '<div role="presentation" />;' },
/* HTML elements attributed with an abstract role */
{ code: '<div role="command" />;' },
{ code: '<div role="composite" />;' },
{ code: '<div role="input" />;' },
{ code: '<div role="landmark" />;' },
{ code: '<div role="range" />;' },
{ code: '<div role="roletype" />;' },
{ code: '<div role="section" />;' },
{ code: '<div role="sectionhead" />;' },
{ code: '<div role="select" />;' },
{ code: '<div role="structure" />;' },
{ code: '<div role="tablist" />;' },
{ code: '<div role="toolbar" />;' },
{ code: '<div role="tree" />;' },
{ code: '<div role="treegrid" />;' },
{ code: '<div role="widget" />;' },
{ code: '<div role="window" />;' },
/* HTML elements with an inherent, non-interactive role, assigned an
* interactive role. */node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 260:2 - Line 299:39), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 309:2 - Line 348:2)
},
/* HTML elements attributed with a non-interactive role */
{ code: '<div role="alert" />;' },
{ code: '<div role="alertdialog" />;' },
{ code: '<div role="application" />;' },
{ code: '<div role="article" />;' },
{ code: '<div role="banner" />;' },
{ code: '<div role="cell" />;' },
{ code: '<div role="complementary" />;' },
{ code: '<div role="contentinfo" />;' },
{ code: '<div role="definition" />;' },
{ code: '<div role="dialog" />;' },
{ code: '<div role="directory" />;' },
{ code: '<div role="document" />;' },
{ code: '<div role="feed" />;' },
{ code: '<div role="figure" />;' },
{ code: '<div role="form" />;' },
{ code: '<div role="group" />;' },
{ code: '<div role="heading" />;' },
{ code: '<div role="img" />;' },
{ code: '<div role="list" />;' },
{ code: '<div role="listitem" />;' },
{ code: '<div role="log" />;' },
{ code: '<div role="main" />;' },
{ code: '<div role="marquee" />;' },
{ code: '<div role="math" />;' },
{ code: '<div role="navigation" />;' },
{ code: '<div role="note" />;' },
{ code: '<div role="region" />;' },
{ code: '<div role="rowgroup" />;' },
{ code: '<div role="search" />;' },
{ code: '<div role="separator" />;' },
{ code: '<div role="scrollbar" />;' },
{ code: '<div role="status" />;' },
{ code: '<div role="table" />;' },
{ code: '<div role="tabpanel" />;' },
{ code: '<div role="term" />;' },
{ code: '<div role="timer" />;' },
{ code: '<div role="tooltip" />;' },
/* Namespaced roles are not checked */node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 376:42 - Line 383:30), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 439:28 - Line 446:22)
, errors: [expectedError], settings: componentsSettings },
];
const recommendedOptions = (configs.recommended.rules[ruleName][1] || {});
ruleTester.run(`${ruleName}:recommended`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
{ code: '<tr role="presentation" />;'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-interactive-element-to-noninteractive-role-test.js (Line 385:2 - Line 402:30), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-tabindex-test.js (Line 90:5 - Line 107:39)
},
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
ruleTester.run(`${ruleName}:strict`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
)).map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
{ code: '<tr role="presentation" />;'node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\interactive-supports-focus-test.js (Line 240:9 - Line 249:12), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\interactive-supports-focus-test.js (Line 211:14 - Line 220:17)
, rule, {
valid: parsers.all([].concat(
...alwaysValid,
...passReducer(
interactiveRoles,
eventHandlers.filter((handler) => !includes(triggeringHandlers, handler)),
codeTemplate,
),
...passReducer(
interactiveRoles.filter((role) => !includes(strictRolesnode_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\control-has-associated-label-test.js (Line 286:2 - Line 293:2), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-to-interactive-role-test.js (Line 439:2 - Line 446:2)
},
];
const recommendedOptions = (configs.recommended.rules[ruleName][1] || {});
ruleTester.run(`${ruleName}:recommended`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
)node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\control-has-associated-label-test.js (Line 292:12 - Line 303:2), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-tabindex-test.js (Line 90:2 - Line 471:8)
,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
const strictOptions = (node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\control-has-associated-label-test.js (Line 303:2 - Line 312:2), node_modules\eslint-plugin-jsx-a11y\__tests__\src\rules\no-noninteractive-element-interactions-test.js (Line 471:2 - Line 480:29)
;
ruleTester.run(`${ruleName}:strict`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
))
.map(ruleOptionsMapperFactory(strictOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
)node_modules\eslint-plugin-jsx-a11y\lib\util\implicitRoles\input.js (Line 11:24 - Line 16:9), node_modules\eslint-plugin-jsx-a11y\lib\util\implicitRoles\menuitem.js (Line 11:27 - Line 16:10)
(attributes) {
var type = (0, _jsxAstUtils.getProp)(attributes, 'type');
if (type) {
var value = (0, _jsxAstUtils.getLiteralPropValue)(type) || '';
switch (typeof value === 'string' && value.toUpperCase()) {
case 'BUTTON'node_modules\eslint-plugin-import\node_modules\debug\src\node.js (Line 1:1 - Line 176:2), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 1:1 - Line 176:2)
"use strict";
/**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
// Camel-case
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
return k.toUpperCase();
}); // Coerce string value into JS value
var val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
var name = this.namespace,
useColors = this.useColors;
if (useColors) {
var c = this.color;
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};node_modules\eslint-plugin-import\node_modules\debug\src\common.js (Line 1:1 - Line 248:2), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 1:1 - Line 248:2)
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;node_modules\eslint-plugin-import\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2)
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
/**
* Colors.
*/
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
} // Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
} // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
var c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, function (match) {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/
function log() {
var _console;
// This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
var r;
try {
r = exports.storage.getItem('debug');
} catch (error) {} // Swallow
// XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};node_modules\eslint-module-utils\node_modules\debug\src\node.js (Line 1:1 - Line 176:2), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 1:1 - Line 176:2)
"use strict";
/**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
// Camel-case
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
return k.toUpperCase();
}); // Coerce string value into JS value
var val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
var name = this.namespace,
useColors = this.useColors;
if (useColors) {
var c = this.color;
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};node_modules\eslint-module-utils\node_modules\debug\src\common.js (Line 1:1 - Line 248:2), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 1:1 - Line 248:2)
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;node_modules\eslint-module-utils\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2)
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
/**
* Colors.
*/
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
} // Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
} // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
var c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, function (match) {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/
function log() {
var _console;
// This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
var r;
try {
r = exports.storage.getItem('debug');
} catch (error) {} // Swallow
// XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};node_modules\eslint-import-resolver-node\node_modules\debug\src\node.js (Line 1:1 - Line 176:2), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 1:1 - Line 176:2)
"use strict";
/**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
// Camel-case
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
return k.toUpperCase();
}); // Coerce string value into JS value
var val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
var name = this.namespace,
useColors = this.useColors;
if (useColors) {
var c = this.color;
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};node_modules\eslint-import-resolver-node\node_modules\debug\src\common.js (Line 1:1 - Line 248:2), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 1:1 - Line 248:2)
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;node_modules\eslint-import-resolver-node\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 1:1 - Line 179:2)
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
/**
* Colors.
*/
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
} // Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
} // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
var c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, function (match) {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/
function log() {
var _console;
// This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
var r;
try {
r = exports.storage.getItem('debug');
} catch (error) {} // Swallow
// XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};node_modules\@typescript-eslint\utils\dist\ts-utils\index.js (Line 1:1 - Line 17:12), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./isArray"node_modules\@typescript-eslint\utils\dist\ts-eslint\Scope.js (Line 3:1 - Line 37:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 2:1 - Line 36:18)
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scopenode_modules\@typescript-eslint\utils\dist\ts-eslint\index.js (Line 1:1 - Line 17:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./AST"node_modules\@typescript-eslint\utils\dist\eslint-utils\index.js (Line 1:1 - Line 17:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./applyDefault"node_modules\@typescript-eslint\utils\dist\ast-utils\index.js (Line 1:1 - Line 17:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./eslint-utils"node_modules\@typescript-eslint\typescript-estree\dist\ts-estree\index.js (Line 1:1 - Line 17:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:13)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exportsnode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\warnAboutTSVersion.js (Line 1:1 - Line 35:4), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 35:7)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
varnode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\warnAboutTSVersion.js (Line 34:2 - Line 39:8), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:13 - Line 12:6)
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exportsnode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\resolveProjectList.js (Line 1:1 - Line 6:15), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearGlobCachenode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\inferSingleRun.js (Line 1:1 - Line 6:15), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.inferSingleRunnode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\getProjectConfigFiles.js (Line 1:1 - Line 39:22), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectConfigFilesnode_modules\@typescript-eslint\typescript-estree\dist\parseSettings\createParseSettings.js (Line 1:1 - Line 39:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createParseSettingsnode_modules\@typescript-eslint\typescript-estree\dist\create-program\useProvidedPrograms.js (Line 1:1 - Line 39:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useProvidedProgramsnode_modules\@typescript-eslint\typescript-estree\dist\create-program\shared.js (Line 1:1 - Line 39:30), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_EXTRA_FILE_EXTENSIONSnode_modules\@typescript-eslint\typescript-estree\dist\create-program\getWatchProgramsForProjects.js (Line 1:1 - Line 39:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearWatchCachesnode_modules\@typescript-eslint\typescript-estree\dist\create-program\getScriptKind.js (Line 1:1 - Line 39:14), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getScriptKindnode_modules\@typescript-eslint\typescript-estree\dist\create-program\describeFilePath.js (Line 1:1 - Line 6:17), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.describeFilePathnode_modules\@typescript-eslint\typescript-estree\dist\create-program\createSourceFile.js (Line 1:1 - Line 39:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSourceFilenode_modules\@typescript-eslint\typescript-estree\dist\create-program\createProjectProgramError.js (Line 1:1 - Line 6:26), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProjectProgramErrornode_modules\@typescript-eslint\typescript-estree\dist\create-program\createProjectProgram.js (Line 1:1 - Line 6:21), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProjectProgramnode_modules\@typescript-eslint\typescript-estree\dist\create-program\createIsolatedProgram.js (Line 1:1 - Line 39:22), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createIsolatedProgramnode_modules\@typescript-eslint\type-utils\dist\typeOrValueSpecifiers\typeDeclaredInPackageDeclarationFile.js (Line 1:1 - Line 36:37), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeDeclaredInPackageDeclarationFilenode_modules\@typescript-eslint\type-utils\dist\typeOrValueSpecifiers\typeDeclaredInFile.js (Line 1:1 - Line 6:19), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeDeclaredInFilenode_modules\@typescript-eslint\scope-manager\dist\scope\index.js (Line 1:1 - Line 17:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./BlockScope"node_modules\@typescript-eslint\scope-manager\dist\referencer\TypeVisitor.js (Line 168:23 - Line 177:5), node_modules\@typescript-eslint\scope-manager\dist\referencer\TypeVisitor.js (Line 126:23 - Line 135:5)
(node) {
this.#referencer
.currentScope()
.defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node));
if (node.typeParameters) {
// type parameters cannot be referenced from outside their current scope
this.#referencer.scopeManager.nestTypeScope(node);
this.visit(node.typeParameters);
}
thisnode_modules\@typescript-eslint\scope-manager\dist\referencer\Referencer.js (Line 233:2 - Line 244:5), node_modules\@typescript-eslint\scope-manager\dist\referencer\Referencer.js (Line 121:2 - Line 132:5)
left, (pattern, info) => {
const maybeImplicitGlobal = !this.currentScope().isStrict
? {
node,
pattern,
}
: null;
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false);
}, { processRightHandNodes: true });
}
elsenode_modules\@typescript-eslint\scope-manager\dist\referencer\ClassVisitor.js (Line 54:12 - Line 66:2), node_modules\@typescript-eslint\scope-manager\dist\referencer\Referencer.js (Line 177:5 - Line 189:6)
.close(node);
}
visitFunctionParameterTypeAnnotation(node) {
switch (node.type) {
case types_1.AST_NODE_TYPES.AssignmentPattern:
this.visitType(node.left.typeAnnotation);
break;
case types_1.AST_NODE_TYPES.TSParameterProperty:
this.visitFunctionParameterTypeAnnotation(node.parameter);
break;
default:
this.visitType(node.typeAnnotation);
}node_modules\@typescript-eslint\scope-manager\dist\lib\es6.js (Line 8:8 - Line 18:8), node_modules\@typescript-eslint\scope-manager\dist\lib\index.js (Line 16:11 - Line 26:6)
);
const es2015_collection_1 = require("./es2015.collection");
const es2015_core_1 = require("./es2015.core");
const es2015_generator_1 = require("./es2015.generator");
const es2015_iterable_1 = require("./es2015.iterable");
const es2015_promise_1 = require("./es2015.promise");
const es2015_proxy_1 = require("./es2015.proxy");
const es2015_reflect_1 = require("./es2015.reflect");
const es2015_symbol_1 = require("./es2015.symbol");
const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown");
exportsnode_modules\@typescript-eslint\scope-manager\dist\lib\es2022.array.js (Line 9:2 - Line 26:2), node_modules\@typescript-eslint\scope-manager\dist\lib\es2023.array.js (Line 9:2 - Line 26:2)
= {
libs: [],
variables: [
['Array', base_config_1.TYPE],
['ReadonlyArray', base_config_1.TYPE],
['Int8Array', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE],
['BigInt64Array', base_config_1.TYPE],
['BigUint64Array', base_config_1.TYPE],
],
};node_modules\@typescript-eslint\scope-manager\dist\lib\es2020.js (Line 10:16 - Line 17:8), node_modules\@typescript-eslint\scope-manager\dist\lib\index.js (Line 56:16 - Line 63:6)
);
const es2020_intl_1 = require("./es2020.intl");
const es2020_number_1 = require("./es2020.number");
const es2020_promise_1 = require("./es2020.promise");
const es2020_sharedmemory_1 = require("./es2020.sharedmemory");
const es2020_string_1 = require("./es2020.string");
const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown");
exportsnode_modules\@typescript-eslint\scope-manager\dist\lib\es2020.bigint.js (Line 10:2 - Line 23:2), node_modules\@typescript-eslint\scope-manager\dist\lib\esnext.bigint.js (Line 10:2 - Line 23:2)
= {
libs: [es2020_intl_1.es2020_intl],
variables: [
['BigIntToLocaleStringOptions', base_config_1.TYPE],
['BigInt', base_config_1.TYPE_VALUE],
['BigIntConstructor', base_config_1.TYPE],
['BigInt64Array', base_config_1.TYPE_VALUE],
['BigInt64ArrayConstructor', base_config_1.TYPE],
['BigUint64Array', base_config_1.TYPE_VALUE],
['BigUint64ArrayConstructor', base_config_1.TYPE],
['DataView', base_config_1.TYPE],
['Intl', base_config_1.TYPE_VALUE],
],
};node_modules\@typescript-eslint\scope-manager\dist\lib\es2018.asynciterable.js (Line 11:2 - Line 20:2), node_modules\@typescript-eslint\scope-manager\dist\lib\esnext.asynciterable.js (Line 11:2 - Line 20:2)
= {
libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable],
variables: [
['SymbolConstructor', base_config_1.TYPE],
['AsyncIterator', base_config_1.TYPE],
['AsyncIterable', base_config_1.TYPE],
['AsyncIterableIterator', base_config_1.TYPE],
['AsyncIteratorObject', base_config_1.TYPE],
],
};node_modules\@typescript-eslint\scope-manager\dist\lib\es2016.array.include.js (Line 9:2 - Line 23:2), node_modules\@typescript-eslint\scope-manager\dist\lib\es2023.array.js (Line 9:2 - Line 23:2)
= {
libs: [],
variables: [
['Array', base_config_1.TYPE],
['ReadonlyArray', base_config_1.TYPE],
['Int8Array', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE],
]node_modules\@typescript-eslint\scope-manager\dist\lib\es2015.symbol.wellknown.js (Line 32:11 - Line 42:19), node_modules\@typescript-eslint\scope-manager\dist\lib\es2023.array.js (Line 13:16 - Line 23:16)
, base_config_1.TYPE],
['Int8Array', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE],
['ArrayConstructor'node_modules\@typescript-eslint\scope-manager\dist\lib\es2015.js (Line 7:2 - Line 18:7), node_modules\@typescript-eslint\scope-manager\dist\lib\es6.js (Line 7:2 - Line 18:4)
= void 0;
const es5_1 = require("./es5");
const es2015_collection_1 = require("./es2015.collection");
const es2015_core_1 = require("./es2015.core");
const es2015_generator_1 = require("./es2015.generator");
const es2015_iterable_1 = require("./es2015.iterable");
const es2015_promise_1 = require("./es2015.promise");
const es2015_proxy_1 = require("./es2015.proxy");
const es2015_reflect_1 = require("./es2015.reflect");
const es2015_symbol_1 = require("./es2015.symbol");
const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown");
exports.es2015node_modules\@typescript-eslint\scope-manager\dist\lib\es2015.js (Line 18:2 - Line 32:2), node_modules\@typescript-eslint\scope-manager\dist\lib\es6.js (Line 18:2 - Line 32:2)
= {
libs: [
es5_1.es5,
es2015_core_1.es2015_core,
es2015_collection_1.es2015_collection,
es2015_iterable_1.es2015_iterable,
es2015_generator_1.es2015_generator,
es2015_promise_1.es2015_promise,
es2015_proxy_1.es2015_proxy,
es2015_reflect_1.es2015_reflect,
es2015_symbol_1.es2015_symbol,
es2015_symbol_wellknown_1.es2015_symbol_wellknown,
],
variables: [],
};node_modules\@typescript-eslint\scope-manager\dist\lib\es2015.core.js (Line 23:20 - Line 34:2), node_modules\@typescript-eslint\scope-manager\dist\lib\es2023.array.js (Line 13:16 - Line 24:2)
, base_config_1.TYPE],
['Int8Array', base_config_1.TYPE],
['Uint8Array', base_config_1.TYPE],
['Uint8ClampedArray', base_config_1.TYPE],
['Int16Array', base_config_1.TYPE],
['Uint16Array', base_config_1.TYPE],
['Int32Array', base_config_1.TYPE],
['Uint32Array', base_config_1.TYPE],
['Float32Array', base_config_1.TYPE],
['Float64Array', base_config_1.TYPE],
],
};node_modules\@typescript-eslint\scope-manager\dist\lib\dom.iterable.js (Line 18:22 - Line 25:17), node_modules\@typescript-eslint\scope-manager\dist\lib\webworker.iterable.js (Line 12:18 - Line 19:16)
, base_config_1.TYPE],
['CSSTransformValue', base_config_1.TYPE],
['CSSUnparsedValue', base_config_1.TYPE],
['Cache', base_config_1.TYPE],
['CanvasPath', base_config_1.TYPE],
['CanvasPathDrawingStyles', base_config_1.TYPE],
['CookieStoreManager', base_config_1.TYPE],
['CustomStateSet'node_modules\@typescript-eslint\scope-manager\dist\lib\dom.iterable.js (Line 80:24 - Line 88:2), node_modules\@typescript-eslint\scope-manager\dist\lib\webworker.iterable.js (Line 34:18 - Line 42:2)
, base_config_1.TYPE],
['WEBGL_draw_buffers', base_config_1.TYPE],
['WEBGL_multi_draw', base_config_1.TYPE],
['WebGL2RenderingContextBase', base_config_1.TYPE],
['WebGL2RenderingContextOverloads', base_config_1.TYPE],
['WebGLRenderingContextBase', base_config_1.TYPE],
['WebGLRenderingContextOverloads', base_config_1.TYPE],
],
};node_modules\@typescript-eslint\scope-manager\dist\definition\index.js (Line 1:1 - Line 17:26), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./CatchClauseDefinition"node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 168:3 - Line 196:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 159:2 - Line 184:2)
],
// starting
[
// there will be no leading '/'
// (which has been replaced by section "leading slash")
// If starts with '**', adding a '^' to the regular expression also works
/^(?=[^^])/,
function startingReplacer () {
// If has a slash `/` at the beginning or middle
return !/\/(?!$)/.test(this)
// > Prior to 2.22.1
// > If the pattern does not contain a slash /,
// > Git treats it as a shell glob pattern
// Actually, if there is only a trailing slash,
// git also treats it as a shell glob pattern
// After 2.22.1 (compatible but clearer)
// > If there is a separator at the beginning or middle (or both)
// > of the pattern, then the pattern is relative to the directory
// > level of the particular .gitignore file itself.
// > Otherwise the pattern may also match at any level below
// > the .gitignore level.
? '(?:^|\\/)'
// > Otherwise, Git treats the pattern as a shell glob suitable for
// > consumption by fnmatch(3)
: '^'
}node_modules\@typescript-eslint\eslint-plugin\dist\util\truthinessUtils.js (Line 1:1 - Line 36:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPossiblyTruthynode_modules\@typescript-eslint\eslint-plugin\dist\util\promiseUtils.js (Line 80:10 - Line 89:10), node_modules\@typescript-eslint\eslint-plugin\dist\util\promiseUtils.js (Line 54:8 - Line 63:11)
) {
if (node.arguments.length >= 1) {
if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) {
return {
object: node.callee.object,
};
}
return {
object: node.callee.object,
onFinallynode_modules\@typescript-eslint\eslint-plugin\dist\util\needsToBeAwaited.js (Line 1:1 - Line 36:10), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Awaitablenode_modules\@typescript-eslint\eslint-plugin\dist\util\misc.js (Line 1:1 - Line 36:28), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isStaticMemberAccessOfValuenode_modules\@typescript-eslint\eslint-plugin\dist\util\isHigherPrecedenceThanAwait.js (Line 1:1 - Line 36:28), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isHigherPrecedenceThanAwaitnode_modules\@typescript-eslint\eslint-plugin\dist\util\isArrayMethodCallWithPredicate.js (Line 1:1 - Line 36:31), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isArrayMethodCallWithPredicatenode_modules\@typescript-eslint\eslint-plugin\dist\util\index.js (Line 1:1 - Line 17:18), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullThrowsReasonsnode_modules\@typescript-eslint\eslint-plugin\dist\util\getStringLength.js (Line 1:1 - Line 6:16), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStringLengthnode_modules\@typescript-eslint\eslint-plugin\dist\util\getMemberHeadLoc.js (Line 67:2 - Line 72:16), node_modules\@typescript-eslint\eslint-plugin\dist\util\getMemberHeadLoc.js (Line 31:6 - Line 36:10)
;
}
else {
const lastDecorator = node.decorators[node.decorators.length - 1];
const nextToken = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(lastDecorator), eslint_utils_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
start = structuredClonenode_modules\@typescript-eslint\eslint-plugin\dist\util\getConstraintInfo.js (Line 1:1 - Line 36:18), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConstraintInfonode_modules\@typescript-eslint\eslint-plugin\dist\util\astUtils.js (Line 1:1 - Line 35:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 35:16)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __exportStarnode_modules\@typescript-eslint\eslint-plugin\dist\util\astUtils.js (Line 34:2 - Line 39:40), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\index.js (Line 12:2 - Line 17:9)
);
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNameLocationInGlobalDirectiveCommentnode_modules\@typescript-eslint\eslint-plugin\dist\util\assertionFunctionUtils.js (Line 1:1 - Line 36:31), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.findTruthinessAssertedArgumentnode_modules\@typescript-eslint\eslint-plugin\dist\util\assertionFunctionUtils.js (Line 79:30 - Line 96:14), node_modules\@typescript-eslint\eslint-plugin\dist\util\assertionFunctionUtils.js (Line 44:31 - Line 61:10)
(services, node) {
// If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can
// only care if `expr1` or `expr2` is asserted, since anything that happens
// within or after a spread argument is out of scope to reason about.
const checkableArguments = [];
for (const argument of node.arguments) {
if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) {
break;
}
checkableArguments.push(argument);
}
// nothing to do
if (checkableArguments.length === 0) {
return undefined;
}
const checker = services.program.getTypeChecker();
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
const callSignaturenode_modules\@typescript-eslint\eslint-plugin\dist\rules\use-unknown-in-catch-callback-variable.js (Line 1:1 - Line 36:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
constnode_modules\@typescript-eslint\eslint-plugin\dist\rules\unbound-method.js (Line 1:1 - Line 38:3), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 38:7)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const tsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\switch-exhaustiveness-check.js (Line 1:1 - Line 36:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutilsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 1:1 - Line 40:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 50:4)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
constnode_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 508:10 - Line 522:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 479:10 - Line 493:2)
,
}),
},
{
messageId: 'conditionFixDefaultZero',
fix: (0, util_1.getWrappingFixer)({
node,
sourceCode: context.sourceCode,
wrap: code => `${code} ?? 0`,
}),
},
{
messageId: 'conditionFixCastBoolean',
fix: (0, util_1.getWrappingFixer)({
node,node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 531:25 - Line 543:23), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 447:25 - Line 459:7)
return [
{
messageId: 'conditionFixCompareNullish',
fix: (0, util_1.getWrappingFixer)({
node: node.parent,
innerNode: node,
sourceCode: context.sourceCode,
wrap: code => `${code} == null`,
}),
},
];
}
// if (nullableObject)node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 557:25 - Line 568:33), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 472:25 - Line 483:26)
return [
{
messageId: 'conditionFixCompareNullish',
fix: (0, util_1.getWrappingFixer)({
node: node.parent,
innerNode: node,
sourceCode: context.sourceCode,
wrap: code => `${code} == null`,
}),
},
{
messageId: 'conditionFixDefaultEmptyString'node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 572:8 - Line 586:23), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 487:7 - Line 501:23)
,
}),
},
{
messageId: 'conditionFixCastBoolean',
fix: (0, util_1.getWrappingFixer)({
node: node.parent,
innerNode: node,
sourceCode: context.sourceCode,
wrap: code => `!Boolean(${code})`,
}),
},
];
}
// if (nullableString)node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 593:10 - Line 607:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 564:10 - Line 578:2)
,
}),
},
{
messageId: 'conditionFixDefaultEmptyString',
fix: (0, util_1.getWrappingFixer)({
node,
sourceCode: context.sourceCode,
wrap: code => `${code} ?? ""`,
}),
},
{
messageId: 'conditionFixCastBoolean',
fix: (0, util_1.getWrappingFixer)({
node,node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 661:3 - Line 675:15), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 487:7 - Line 501:23)
,
}),
},
{
messageId: 'conditionFixCastBoolean',
fix: (0, util_1.getWrappingFixer)({
node: node.parent,
innerNode: node,
sourceCode: context.sourceCode,
wrap: code => `!Boolean(${code})`,
}),
},
];
}
// if (number)node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 721:9 - Line 735:15), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 487:7 - Line 501:23)
,
}),
},
{
messageId: 'conditionFixCastBoolean',
fix: (0, util_1.getWrappingFixer)({
node: node.parent,
innerNode: node,
sourceCode: context.sourceCode,
wrap: code => `!Boolean(${code})`,
}),
},
];
}
// if (string)node_modules\@typescript-eslint\eslint-plugin\dist\rules\return-await.js (Line 1:1 - Line 37:3), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 37:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\restrict-plus-operands.js (Line 1:1 - Line 39:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:6)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exportsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\require-await.js (Line 1:1 - Line 39:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:6)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
exportsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\promise-function-async.js (Line 1:1 - Line 40:25), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:15)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'promise-function-async'node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-return-this-type.js (Line 1:1 - Line 40:26), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:15)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-return-this-type'node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-regexp-exec.js (Line 1:1 - Line 39:4), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:6)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
varnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-regexp-exec.js (Line 163:7 - Line 171:9), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-regexp-exec.js (Line 152:7 - Line 160:2)
:
return context.report({
node: memberNode.property,
messageId: 'regExpExecOverStringMatch',
fix: (0, util_1.getWrappingFixer)({
node: callNode,
innerNode: [objectNode, argumentNode],
sourceCode: context.sourceCode,
wrap: (objectCode, argumentCode) => `RegExp(node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-reduce-type-parameter.js (Line 1:1 - Line 37:7), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 37:3)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const util_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-readonly.js (Line 1:1 - Line 40:19), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getMemberHeadLoc_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-nullish-coalescing.js (Line 1:1 - Line 40:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getWrappedCode_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-includes.js (Line 1:1 - Line 36:10), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const regexpp_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-includes.js (Line 52:56 - Line 61:9), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-regexp-exec.js (Line 57:42 - Line 69:12)
,
},
schema: [],
},
defaultOptions: [],
create(context) {
const globalScope = context.sourceCode.getScope(context.sourceCode.ast);
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
functionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-includes.js (Line 222:23 - Line 231:6), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-string-starts-ends-with.js (Line 493:10 - Line 502:3)
,
*fix(fixer) {
const argNode = callNode.arguments[0];
const needsParen = argNode.type !== utils_1.AST_NODE_TYPES.Literal &&
argNode.type !== utils_1.AST_NODE_TYPES.TemplateLiteral &&
argNode.type !== utils_1.AST_NODE_TYPES.Identifier &&
argNode.type !== utils_1.AST_NODE_TYPES.MemberExpression &&
argNode.type !== utils_1.AST_NODE_TYPES.CallExpression;
yield fixer.removeRange([callNode.range[0], argNode.range[0]]);
yieldnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-includes.js (Line 231:2 - Line 236:11), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-string-starts-ends-with.js (Line 501:2 - Line 506:3)
]]);
if (needsParen) {
yield fixer.insertTextBefore(argNode, '(');
yield fixer.insertTextAfter(argNode, ')');
}
yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}includes('node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-find.js (Line 1:1 - Line 40:14), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:16)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-find'node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-find.js (Line 51:45 - Line 60:28), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-regexp-exec.js (Line 57:42 - Line 61:9)
,
},
schema: [],
},
defaultOptions: [],
create(context) {
const globalScope = context.sourceCode.getScope(context.sourceCode.ast);
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
function parseArrayFilterExpressionsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-find.js (Line 224:21 - Line 235:23), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-find.js (Line 196:21 - Line 207:39)
const filterExpressions = parseArrayFilterExpressions(object);
if (filterExpressions.length !== 0) {
context.report({
node,
messageId: 'preferFind',
suggest: [
{
messageId: 'preferFindSuggestion',
fix: (fixer) => {
return [
...filterExpressions.map(filterExpression => generateFixToReplaceFilterWithFind(fixer, filterExpression)),
// Get rid of the [0].node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-destructuring.js (Line 1:1 - Line 39:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:22)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
const getESLintCoreRule_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\only-throw-error.js (Line 1:1 - Line 37:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 37:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts_api_utils_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\only-throw-error.js (Line 140:13 - Line 146:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-promise-reject-errors.js (Line 52:17 - Line 58:3)
if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) {
return;
}
if (options.allowThrowingUnknown && (0, util_1.isTypeUnknownType)(type)) {
return;
}
if ((0, util_1.isErrorLike)(services.program, type))node_modules\@typescript-eslint\eslint-plugin\dist\rules\non-nullable-type-assertion-style.js (Line 1:1 - Line 40:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 50:4)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exportsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unused-vars.js (Line 209:23 - Line 219:19), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unused-vars.js (Line 188:22 - Line 198:10)
(unusedVar) {
const def = unusedVar.defs.at(0);
let additionalMessageData = '';
if (def) {
const { pattern, variableDescription } = getVariableDescription(defToVariableType(def));
if (pattern && variableDescription) {
additionalMessageData = `. Allowed unused ${variableDescription} must match ${pattern}`;
}
}
return {
action: 'assigned a value'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unused-expressions.js (Line 1:1 - Line 6:24), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-unused-expressions'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-unary-minus.js (Line 1:1 - Line 38:5), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 38:7)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const utilnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-type-assertion.js (Line 1:1 - Line 40:27), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-type-assertion'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-return.js (Line 1:1 - Line 39:24), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:24)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getParentFunctionNode_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-member-access.js (Line 1:1 - Line 39:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:13)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
var Statenode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-enum-comparison.js (Line 1:1 - Line 39:9), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:24)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const shared_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-call.js (Line 1:1 - Line 39:17), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:31)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-call'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-call.js (Line 54:50 - Line 63:9), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-member-access.js (Line 63:2 - Line 72:6)
,
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const compilerOptions = services.program.getCompilerOptions();
const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis');
functionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-assignment.js (Line 1:1 - Line 39:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:13)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
var ComparisonTypenode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-assignment.js (Line 67:70 - Line 77:43), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-return.js (Line 55:2 - Line 65:9)
,
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const compilerOptions = services.program.getCompilerOptions();
const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis');
// returns true if the assignment reportednode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-argument.js (Line 1:1 - Line 40:4), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 50:4)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
varnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-parameters.js (Line 1:1 - Line 41:33), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-parameters'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 1:1 - Line 41:33), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-conversion'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 142:35 - Line 152:4), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 102:40 - Line 112:5)
(node) {
if (node.right.type === utils_1.AST_NODE_TYPES.Literal &&
node.right.value === '' &&
doesUnderlyingTypeMatchFlag(services.getTypeAtLocation(node.left), ts.TypeFlags.StringLike)) {
const wrappingFixerParams = {
node,
innerNode: [node.left],
sourceCode: context.sourceCode,
};
context.report({
locnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 164:4 - Line 177:5), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 128:37 - Line 141:2)
: (0, util_1.getWrappingFixer)(wrappingFixerParams),
},
{
messageId: 'suggestSatisfies',
data: { type: 'string' },
fix: (0, util_1.getWrappingFixer)({
...wrappingFixerParams,
wrap: expr => `${expr} satisfies string`,
}),
},
],
});
}
elsenode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 193:33 - Line 212:15), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 159:33 - Line 142:35)
,
},
suggest: [
{
messageId: 'suggestRemove',
fix: (0, util_1.getWrappingFixer)(wrappingFixerParams),
},
{
messageId: 'suggestSatisfies',
data: { type: 'string' },
fix: (0, util_1.getWrappingFixer)({
...wrappingFixerParams,
wrap: expr => `${expr} satisfies string`,
}),
},
],
});
}
},
CallExpressionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 243:21 - Line 259:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 83:2 - Line 100:2)
},
suggest: [
{
messageId: 'suggestRemove',
fix: (0, util_1.getWrappingFixer)(wrappingFixerParams),
},
{
messageId: 'suggestSatisfies',
data: { type: typeString },
fix: (0, util_1.getWrappingFixer)({
...wrappingFixerParams,
wrap: expr => `${expr} satisfies ${typeString}`,
}),
},
],
});
},node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 277:40 - Line 296:68), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-conversion.js (Line 159:33 - Line 142:35)
,
},
suggest: [
{
messageId: 'suggestRemove',
fix: (0, util_1.getWrappingFixer)(wrappingFixerParams),
},
{
messageId: 'suggestSatisfies',
data: { type: 'string' },
fix: (0, util_1.getWrappingFixer)({
...wrappingFixerParams,
wrap: expr => `${expr} satisfies string`,
}),
},
],
});
}
},
'UnaryExpression[operator = "!"] > UnaryExpression[operator = "!"]'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-constraint.js (Line 1:1 - Line 37:12), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 37:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const node_path_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-assertion.js (Line 1:1 - Line 41:32), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-assertion'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-type-arguments.js (Line 1:1 - Line 41:32), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-arguments'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-template-expression.js (Line 1:1 - Line 40:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const rangeToLoc_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-qualifier.js (Line 1:1 - Line 41:27), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-qualifier'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-condition.js (Line 1:1 - Line 41:11), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const assertionFunctionUtils_1 = require("../util/assertionFunctionUtils");
// #regionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-condition.js (Line 178:2 - Line 183:6), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 148:8 - Line 153:3)
]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const compilerOptions = services.program.getCompilerOptions();
const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks');
constnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-condition.js (Line 187:28 - Line 198:9), node_modules\@typescript-eslint\eslint-plugin\dist\rules\prefer-nullish-coalescing.js (Line 151:19 - Line 165:12)
);
if (!isStrictNullChecks &&
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) {
context.report({
loc: {
start: { column: 0, line: 0 },
end: { column: 0, line: 0 },
},
messageId: 'noStrictNullCheck',
});
}
functionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-boolean-literal-compare.js (Line 1:1 - Line 41:41), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-boolean-literal-compare'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unnecessary-boolean-literal-compare.js (Line 83:6 - Line 101:9), node_modules\@typescript-eslint\eslint-plugin\dist\rules\strict-boolean-expressions.js (Line 145:5 - Line 163:6)
,
},
],
create(context, [options]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const compilerOptions = services.program.getCompilerOptions();
const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks');
if (!isStrictNullChecks &&
options.allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) {
context.report({
loc: {
start: { column: 0, line: 0 },
end: { column: 0, line: 0 },
},
messageId: 'noStrictNullCheck',
});
}
functionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-shadow.js (Line 153:17 - Line 172:10), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-shadow.js (Line 123:24 - Line 142:13)
(variable) {
if (!('isTypeVariable' in variable)) {
// this shouldn't happen...
return false;
}
if (!variable.isTypeVariable) {
return false;
}
if (variable.identifiers.length === 0) {
return false;
}
const typeParameter = variable.identifiers[0].parent;
if (typeParameter.type !== utils_1.AST_NODE_TYPES.TSTypeParameter) {
return false;
}
const typeParameterDecl = typeParameter.parent;
if (typeParameterDecl.type !== utils_1.AST_NODE_TYPES.TSTypeParameterDeclaration) {
return false;
}
const classDeclnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-shadow.js (Line 290:15 - Line 308:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-use-before-define.js (Line 127:11 - Line 145:14)
.range[1];
while (node) {
if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) {
if (isInRange(node.init, location)) {
return true;
}
if ((node.parent.parent.type === utils_1.AST_NODE_TYPES.ForInStatement ||
node.parent.parent.type === utils_1.AST_NODE_TYPES.ForOfStatement) &&
isInRange(node.parent.parent.right, location)) {
return true;
}
break;
}
else if (node.type === utils_1.AST_NODE_TYPES.AssignmentPattern) {
if (isInRange(node.right, location)) {
return true;
}
}
else if ([node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-restricted-imports.js (Line 1:1 - Line 6:8), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 12:7)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-require-imports.js (Line 1:1 - Line 37:5), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 37:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const utilnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-require-imports.js (Line 72:2 - Line 82:5), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-var-requires.js (Line 46:14 - Line 56:2)
.some(pattern => importPath.match(pattern));
}
function isStringOrTemplateLiteral(node) {
return ((node.type === utils_1.AST_NODE_TYPES.Literal &&
typeof node.value === 'string') ||
node.type === utils_1.AST_NODE_TYPES.TemplateLiteral);
}
return {
'CallExpression[callee.name="require"]'(node) {
if (node.arguments[0] && isStringOrTemplateLiteral(node.arguments[0])) {
const argValue = utilnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-redundant-type-constituents.js (Line 1:1 - Line 40:28), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const literalToPrimitiveTypeFlagsnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-mixed-enums.js (Line 1:1 - Line 36:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const scope_manager_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-misused-spread.js (Line 1:1 - Line 41:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-misused-spread'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-misused-promises.js (Line 1:1 - Line 40:9), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 50:4)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
functionnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-misused-promises.js (Line 233:16 - Line 241:16), node_modules\@typescript-eslint\eslint-plugin\dist\rules\sort-type-constituents.js (Line 71:19 - Line 79:16)
:
case utils_1.AST_NODE_TYPES.TSOptionalType:
case utils_1.AST_NODE_TYPES.TSPrivateKeyword:
case utils_1.AST_NODE_TYPES.TSProtectedKeyword:
case utils_1.AST_NODE_TYPES.TSPublicKeyword:
case utils_1.AST_NODE_TYPES.TSReadonlyKeyword:
case utils_1.AST_NODE_TYPES.TSRestType:
case utils_1.AST_NODE_TYPES.TSStaticKeyword:
case utils_1.AST_NODE_TYPES.TSStringKeywordnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-misused-promises.js (Line 425:15 - Line 440:7), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-misused-promises.js (Line 365:6 - Line 380:5)
)) {
const functionNode = node.value;
if (functionNode.returnType) {
context.report({
node: functionNode.returnType.typeAnnotation,
messageId: 'voidReturnProperty',
});
}
else {
context.report({
loc: (0, util_1.getFunctionHeadLoc)(functionNode, context.sourceCode),
messageId: 'voidReturnProperty',
});
}
}
returnnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-meaningless-void-operator.js (Line 1:1 - Line 41:31), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-meaningless-void-operator'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-magic-numbers.js (Line 1:1 - Line 6:19), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-magic-numbers'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-loop-func.js (Line 1:1 - Line 6:15), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-loop-func'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-invalid-this.js (Line 1:1 - Line 6:18), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-invalid-this'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-implied-eval.js (Line 1:1 - Line 40:21), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const FUNCTION_CONSTRUCTORnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-for-in-array.js (Line 1:1 - Line 39:25), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:24)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getForStatementHeadLoc_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-floating-promises.js (Line 1:1 - Line 40:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const promiseUtils_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-empty-interface.js (Line 1:1 - Line 7:21), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-redeclare.js (Line 1:1 - Line 7:15)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-empty-interface'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-empty-function.js (Line 1:1 - Line 6:20), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-empty-function'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-duplicate-type-constituents.js (Line 1:1 - Line 40:14), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const astIgnoreKeysnode_modules\@typescript-eslint\eslint-plugin\dist\rules\no-dupe-class-members.js (Line 1:1 - Line 6:24), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-dupe-class-members'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-deprecated.js (Line 1:1 - Line 41:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-deprecated'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-confusing-void-expression.js (Line 1:1 - Line 40:24), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getParentFunctionNode_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-confusing-void-expression.js (Line 36:27 - Line 42:31), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unsafe-return.js (Line 35:2 - Line 41:19)
);
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getParentFunctionNode_1 = require("../util/getParentFunctionNode");
exports.default = (0, util_1.createRule)({
name: 'no-confusing-void-expression'node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-base-to-string.js (Line 1:1 - Line 40:11), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:13)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
var Usefulnessnode_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 385:21 - Line 391:10), node_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 149:21 - Line 155:3)
if (isExported(node, node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.exported);
}
if (isUnused(node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.unused);
}
validatornode_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 413:2 - Line 422:10), node_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 384:6 - Line 393:5)
;
if (isExported(node, node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.exported);
}
if (isUnused(node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.unused);
}
validator(node.id, modifiers);
},
validator: validators.interfacenode_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 426:23 - Line 438:10), node_modules\@typescript-eslint\eslint-plugin\dist\rules\naming-convention.js (Line 410:23 - Line 393:5)
: {
handler: (node, validator) => {
const modifiers = new Set();
const scope = context.sourceCode.getScope(node);
if (isExported(node, node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.exported);
}
if (isUnused(node.id.name, scope)) {
modifiers.add(naming_convention_utils_1.Modifiers.unused);
}
validator(node.id, modifiers);
},
validator: validators.typeAliasnode_modules\@typescript-eslint\eslint-plugin\dist\rules\member-ordering.js (Line 319:5 - Line 327:5), node_modules\@typescript-eslint\eslint-plugin\dist\rules\member-ordering.js (Line 286:11 - Line 294:7)
) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.TSPropertySignature:
case utils_1.AST_NODE_TYPES.TSMethodSignature:
case utils_1.AST_NODE_TYPES.TSAbstractAccessorProperty:
case utils_1.AST_NODE_TYPES.TSAbstractPropertyDefinition:
case utils_1.AST_NODE_TYPES.AccessorProperty:
case utils_1.AST_NODE_TYPES.PropertyDefinition:
casenode_modules\@typescript-eslint\eslint-plugin\dist\rules\max-params.js (Line 1:1 - Line 6:13), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('max-params'node_modules\@typescript-eslint\eslint-plugin\dist\rules\init-declarations.js (Line 1:1 - Line 6:20), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-useless-constructor.js (Line 1:1 - Line 6:25)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('init-declarations'node_modules\@typescript-eslint\eslint-plugin\dist\rules\dot-notation.js (Line 1:1 - Line 40:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 40:25)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getESLintCoreRule_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-type-exports.js (Line 1:1 - Line 41:26), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 41:36)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'consistent-type-exports'node_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-type-exports.js (Line 242:26 - Line 254:2), node_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-type-exports.js (Line 226:21 - Line 238:5)
,
data: { exportNames },
*fix(fixer) {
if (fixMixedExportsWithInlineTypeSpecifier) {
yield* fixAddTypeSpecifierToNamedExports(fixer, report);
}
else {
yield* fixSeparateNamedExports(fixer, context.sourceCode, report);
}
},
});
}
}node_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-type-assertions.js (Line 1:1 - Line 39:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
constnode_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-return.js (Line 1:1 - Line 39:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:24)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getESLintCoreRule_1node_modules\@typescript-eslint\eslint-plugin\dist\rules\consistent-return.js (Line 35:2 - Line 40:20), node_modules\@typescript-eslint\eslint-plugin\dist\rules\dot-notation.js (Line 36:27 - Line 41:15)
);
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('consistent-return'node_modules\@typescript-eslint\eslint-plugin\dist\rules\await-thenable.js (Line 1:1 - Line 38:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 38:8)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
constnode_modules\@nodelib\fs.walk\out\readers\async.js (Line 82:9 - Line 87:11), node_modules\@nodelib\fs.walk\out\readers\sync.js (Line 44:9 - Line 49:15)
const fullpath = entry.path;
if (base !== undefined) {
entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
}
if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
this._emitEntrynode_modules\@nodelib\fs.scandir\out\adapters\fs.js (Line 1:1 - Line 9:2), node_modules\@nodelib\fs.stat\out\adapters\fs.js (Line 1:1 - Line 10:2)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
const fs = require("fs");
exports.FILE_SYSTEM_ADAPTER = {
lstat: fs.lstat,
stat: fs.stat,
lstatSync: fs.lstatSync,
statSync: fs.statSync,node_modules\@eslint\plugin-kit\dist\cjs\index.cjs (Line 3:2 - Line 616:8), node_modules\@eslint\plugin-kit\dist\esm\index.js (Line 2:7 - Line 615:7)
;
/**
* @fileoverview Config Comment Parser
* @author Nicholas C. Zakas
*/
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/** @typedef {import("@eslint/core").RuleConfig} RuleConfig */
/** @typedef {import("@eslint/core").RulesConfig} RulesConfig */
/** @typedef {import("./types.ts").StringConfig} StringConfig */
/** @typedef {import("./types.ts").BooleanConfig} BooleanConfig */
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const directivesPattern = /^([a-z]+(?:-[a-z]+)*)(?:\s|$)/u;
const validSeverities = new Set([0, 1, 2, "off", "warn", "error"]);
/**
* Determines if the severity in the rule configuration is valid.
* @param {RuleConfig} ruleConfig A rule's configuration.
* @returns {boolean} `true` if the severity is valid, otherwise `false`.
*/
function isSeverityValid(ruleConfig) {
const severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
return validSeverities.has(severity);
}
/**
* Determines if all severities in the rules configuration are valid.
* @param {RulesConfig} rulesConfig The rules configuration to check.
* @returns {boolean} `true` if all severities are valid, otherwise `false`.
*/
function isEverySeverityValid(rulesConfig) {
return Object.values(rulesConfig).every(isSeverityValid);
}
/**
* Represents a directive comment.
*/
class DirectiveComment {
/**
* The label of the directive, such as "eslint", "eslint-disable", etc.
* @type {string}
*/
label = "";
/**
* The value of the directive (the string after the label).
* @type {string}
*/
value = "";
/**
* The justification of the directive (the string after the --).
* @type {string}
*/
justification = "";
/**
* Creates a new directive comment.
* @param {string} label The label of the directive.
* @param {string} value The value of the directive.
* @param {string} justification The justification of the directive.
*/
constructor(label, value, justification) {
this.label = label;
this.value = value;
this.justification = justification;
}
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/**
* Object to parse ESLint configuration comments.
*/
class ConfigCommentParser {
/**
* Parses a list of "name:string_value" or/and "name" options divided by comma or
* whitespace. Used for "global" comments.
* @param {string} string The string to parse.
* @returns {StringConfig} Result map object of names and string values, or null values if no value was provided.
*/
parseStringConfig(string) {
const items = /** @type {StringConfig} */ ({});
// Collapse whitespace around `:` and `,` to make parsing easier
const trimmedString = string
.trim()
.replace(/(?<!\s)\s*([:,])\s*/gu, "$1");
trimmedString.split(/\s|,+/u).forEach(name => {
if (!name) {
return;
}
// value defaults to null (if not provided), e.g: "foo" => ["foo", null]
const [key, value = null] = name.split(":");
items[key] = value;
});
return items;
}
/**
* Parses a JSON-like config.
* @param {string} string The string to parse.
* @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object
*/
parseJSONLikeConfig(string) {
// Parses a JSON-like comment by the same way as parsing CLI option.
try {
const items =
/** @type {RulesConfig} */ (levn.parse("Object", string)) || {};
/*
* When the configuration has any invalid severities, it should be completely
* ignored. This is because the configuration is not valid and should not be
* applied.
*
* For example, the following configuration is invalid:
*
* "no-alert: 2 no-console: 2"
*
* This results in a configuration of { "no-alert": "2 no-console: 2" }, which is
* not valid. In this case, the configuration should be ignored.
*/
if (isEverySeverityValid(items)) {
return {
ok: true,
config: items,
};
}
} catch {
// levn parsing error: ignore to parse the string by a fallback.
}
/*
* Optionator cannot parse commaless notations.
* But we are supporting that. So this is a fallback for that.
*/
const normalizedString = string
.replace(/(?<![-a-zA-Z0-9/])([-a-zA-Z0-9/]+):/gu, '"$1":')
.replace(/(\]|[0-9])\s+(?=")/u, "$1,");
try {
const items = JSON.parse(`{${normalizedString}}`);
return {
ok: true,
config: items,
};
} catch (ex) {
const errorMessage = ex instanceof Error ? ex.message : String(ex);
return {
ok: false,
error: {
message: `Failed to parse JSON from '${normalizedString}': ${errorMessage}`,
},
};
}
}
/**
* Parses a config of values separated by comma.
* @param {string} string The string to parse.
* @returns {BooleanConfig} Result map of values and true values
*/
parseListConfig(string) {
const items = /** @type {BooleanConfig} */ ({});
string.split(",").forEach(name => {
const trimmedName = name
.trim()
.replace(
/^(?<quote>['"]?)(?<ruleId>.*)\k<quote>$/su,
"$<ruleId>",
);
if (trimmedName) {
items[trimmedName] = true;
}
});
return items;
}
/**
* Extract the directive and the justification from a given directive comment and trim them.
* @param {string} value The comment text to extract.
* @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification.
*/
#extractDirectiveComment(value) {
const match = /\s-{2,}\s/u.exec(value);
if (!match) {
return { directivePart: value.trim(), justificationPart: "" };
}
const directive = value.slice(0, match.index).trim();
const justification = value.slice(match.index + match[0].length).trim();
return { directivePart: directive, justificationPart: justification };
}
/**
* Parses a directive comment into directive text and value.
* @param {string} string The string with the directive to be parsed.
* @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid.
*/
parseDirective(string) {
const { directivePart, justificationPart } =
this.#extractDirectiveComment(string);
const match = directivesPattern.exec(directivePart);
if (!match) {
return undefined;
}
const directiveText = match[1];
const directiveValue = directivePart.slice(
match.index + directiveText.length,
);
return new DirectiveComment(
directiveText,
directiveValue.trim(),
justificationPart,
);
}
}
/**
* @fileoverview A collection of helper classes for implementing `SourceCode`.
* @author Nicholas C. Zakas
*/
/* eslint class-methods-use-this: off -- Required to complete interface. */
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/** @typedef {import("@eslint/core").VisitTraversalStep} VisitTraversalStep */
/** @typedef {import("@eslint/core").CallTraversalStep} CallTraversalStep */
/** @typedef {import("@eslint/core").TraversalStep} TraversalStep */
/** @typedef {import("@eslint/core").SourceLocation} SourceLocation */
/** @typedef {import("@eslint/core").SourceLocationWithOffset} SourceLocationWithOffset */
/** @typedef {import("@eslint/core").SourceRange} SourceRange */
/** @typedef {import("@eslint/core").Directive} IDirective */
/** @typedef {import("@eslint/core").DirectiveType} DirectiveType */
/** @typedef {import("@eslint/core").SourceCodeBaseTypeOptions} SourceCodeBaseTypeOptions */
/**
* @typedef {import("@eslint/core").TextSourceCode<Options>} TextSourceCode<Options>
* @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions]
*/
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* Determines if a node has ESTree-style loc information.
* @param {object} node The node to check.
* @returns {node is {loc:SourceLocation}} `true` if the node has ESTree-style loc information, `false` if not.
*/
function hasESTreeStyleLoc(node) {
return "loc" in node;
}
/**
* Determines if a node has position-style loc information.
* @param {object} node The node to check.
* @returns {node is {position:SourceLocation}} `true` if the node has position-style range information, `false` if not.
*/
function hasPosStyleLoc(node) {
return "position" in node;
}
/**
* Determines if a node has ESTree-style range information.
* @param {object} node The node to check.
* @returns {node is {range:SourceRange}} `true` if the node has ESTree-style range information, `false` if not.
*/
function hasESTreeStyleRange(node) {
return "range" in node;
}
/**
* Determines if a node has position-style range information.
* @param {object} node The node to check.
* @returns {node is {position:SourceLocationWithOffset}} `true` if the node has position-style range information, `false` if not.
*/
function hasPosStyleRange(node) {
return "position" in node;
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class to represent a step in the traversal process where a node is visited.
* @implements {VisitTraversalStep}
*/
class VisitNodeStep {
/**
* The type of the step.
* @type {"visit"}
* @readonly
*/
type = "visit";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {1}
* @readonly
*/
kind = 1;
/**
* The target of the step.
* @type {object}
*/
target;
/**
* The phase of the step.
* @type {1|2}
*/
phase;
/**
* The arguments of the step.
* @type {Array<any>}
*/
args;
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {object} options.target The target of the step.
* @param {1|2} options.phase The phase of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, phase, args }) {
this.target = target;
this.phase = phase;
this.args = args;
}
}
/**
* A class to represent a step in the traversal process where a
* method is called.
* @implements {CallTraversalStep}
*/
class CallMethodStep {
/**
* The type of the step.
* @type {"call"}
* @readonly
*/
type = "call";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {2}
* @readonly
*/
kind = 2;
/**
* The name of the method to call.
* @type {string}
*/
target;
/**
* The arguments to pass to the method.
* @type {Array<any>}
*/
args;
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {string} options.target The target of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, args }) {
this.target = target;
this.args = args;
}
}
/**
* A class to represent a directive comment.
* @implements {IDirective}
*/
class Directive {
/**
* The type of directive.
* @type {DirectiveType}
* @readonly
*/
type;
/**
* The node representing the directive.
* @type {unknown}
* @readonly
*/
node;
/**
* Everything after the "eslint-disable" portion of the directive,
* but before the "--" that indicates the justification.
* @type {string}
* @readonly
*/
value;
/**
* The justification for the directive.
* @type {string}
* @readonly
*/
justification;
/**
* Creates a new instance.
* @param {Object} options The options for the directive.
* @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive.
* @param {unknown} options.node The node representing the directive.
* @param {string} options.value The value of the directive.
* @param {string} options.justification The justification for the directive.
*/
constructor({ type, node, value, justification }) {
this.type = type;
this.node = node;
this.value = value;
this.justification = justification;
}
}
/**
* Source Code Base Object
* @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}]
* @implements {TextSourceCode<Options>}
*/
class TextSourceCodeBase {
/**
* The lines of text in the source code.
* @type {Array<string>}
*/
#lines;
/**
* The AST of the source code.
* @type {Options['RootNode']}
*/
ast;
/**
* The text of the source code.
* @type {string}
*/
text;
/**
* Creates a new instance.
* @param {Object} options The options for the instance.
* @param {string} options.text The source code text.
* @param {Options['RootNode']} options.ast The root AST node.
* @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code.
*/
constructor({ text, ast, lineEndingPattern = /\r?\n/u }) {
this.ast = ast;
this.text = text;
this.#lines = text.split(lineEndingPattern);
}
/**
* Returns the loc information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for.
* @returns {SourceLocation} The loc information for the node or token.
* @throws {Error} If the node or token does not have loc information.
*/
getLoc(nodeOrToken) {
if (hasESTreeStyleLoc(nodeOrToken)) {
return nodeOrToken.loc;
}
if (hasPosStyleLoc(nodeOrToken)) {
return nodeOrToken.position;
}
throw new Error(
"Custom getLoc() method must be implemented in the subclass.",
);
}
/**
* Returns the range information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for.
* @returns {SourceRange} The range information for the node or token.
* @throws {Error} If the node or token does not have range information.
*/
getRange(nodeOrToken) {
if (hasESTreeStyleRange(nodeOrToken)) {
return nodeOrToken.range;
}
if (hasPosStyleRange(nodeOrToken)) {
return [
nodeOrToken.position.start.offset,
nodeOrToken.position.end.offset,
];
}
throw new Error(
"Custom getRange() method must be implemented in the subclass.",
);
}
/* eslint-disable no-unused-vars -- Required to complete interface. */
/**
* Returns the parent of the given node.
* @param {Options['SyntaxElementWithLoc']} node The node to get the parent of.
* @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node.
* @throws {Error} If the method is not implemented in the subclass.
*/
getParent(node) {
throw new Error("Not implemented.");
}
/* eslint-enable no-unused-vars -- Required to complete interface. */
/**
* Gets all the ancestors of a given node
* @param {Options['SyntaxElementWithLoc']} node The node
* @returns {Array<Options['SyntaxElementWithLoc']>} All the ancestor nodes in the AST, not including the provided node, starting
* from the root node at index 0 and going inwards to the parent node.
* @throws {TypeError} When `node` is missing.
*/
getAncestors(node) {
if (!node) {
throw new TypeError("Missing required argument: node.");
}
const ancestorsStartingAtParent = [];
for (
let ancestor = this.getParent(node);
ancestor;
ancestor = this.getParent(ancestor)
) {
ancestorsStartingAtParent.push(ancestor);
}
return ancestorsStartingAtParent.reverse();
}
/**
* Gets the source code for the given node.
* @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for.
* @param {number} [beforeCount] The number of characters before the node to retrieve.
* @param {number} [afterCount] The number of characters after the node to retrieve.
* @returns {string} The text representing the AST node.
* @public
*/
getText(node, beforeCount, afterCount) {
if (node) {
const range = this.getRange(node);
return this.text.slice(
Math.max(range[0] - (beforeCount || 0), 0),
range[1] + (afterCount || 0),
);
}
return this.text;
}
/**
* Gets the entire source text split into an array of lines.
* @returns {Array<string>} The source text as an array of lines.
* @public
*/
get lines() {
return this.#lines;
}
/**
* Traverse the source code and return the steps that were taken.
* @returns {Iterable<TraversalStep>} The steps that were taken while traversing the source code.
*/
traverse() {
throw new Error("Not implemented.");
}
}
exportsnode_modules\@eslint\object-schema\dist\cjs\index.cjs (Line 3:1 - Line 453:8), node_modules\@eslint\object-schema\dist\esm\index.js (Line 2:1 - Line 452:7)
/**
* @fileoverview Merge Strategy
*/
//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------
/**
* Container class for several different merge strategies.
*/
class MergeStrategy {
/**
* Merges two keys by overwriting the first with the second.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value.
*/
static overwrite(value1, value2) {
return value2;
}
/**
* Merges two keys by replacing the first with the second only if the
* second is defined.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value if it is defined.
*/
static replace(value1, value2) {
if (typeof value2 !== "undefined") {
return value2;
}
return value1;
}
/**
* Merges two properties by assigning properties from the second to the first.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} A new object containing properties from both value1 and
* value2.
*/
static assign(value1, value2) {
return Object.assign({}, value1, value2);
}
}
/**
* @fileoverview Validation Strategy
*/
//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------
/**
* Container class for several different validation strategies.
*/
class ValidationStrategy {
/**
* Validates that a value is an array.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static array(value) {
if (!Array.isArray(value)) {
throw new TypeError("Expected an array.");
}
}
/**
* Validates that a value is a boolean.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static boolean(value) {
if (typeof value !== "boolean") {
throw new TypeError("Expected a Boolean.");
}
}
/**
* Validates that a value is a number.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static number(value) {
if (typeof value !== "number") {
throw new TypeError("Expected a number.");
}
}
/**
* Validates that a value is a object.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static object(value) {
if (!value || typeof value !== "object") {
throw new TypeError("Expected an object.");
}
}
/**
* Validates that a value is a object or null.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "object?"(value) {
if (typeof value !== "object") {
throw new TypeError("Expected an object or null.");
}
}
/**
* Validates that a value is a string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static string(value) {
if (typeof value !== "string") {
throw new TypeError("Expected a string.");
}
}
/**
* Validates that a value is a non-empty string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "string!"(value) {
if (typeof value !== "string" || value.length === 0) {
throw new TypeError("Expected a non-empty string.");
}
}
}
/**
* @fileoverview Object Schema
*/
//-----------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------------
/** @typedef {import("./types.ts").ObjectDefinition} ObjectDefinition */
/** @typedef {import("./types.ts").PropertyDefinition} PropertyDefinition */
//-----------------------------------------------------------------------------
// Private
//-----------------------------------------------------------------------------
/**
* Validates a schema strategy.
* @param {string} name The name of the key this strategy is for.
* @param {PropertyDefinition} definition The strategy for the object key.
* @returns {void}
* @throws {Error} When the strategy is missing a name.
* @throws {Error} When the strategy is missing a merge() method.
* @throws {Error} When the strategy is missing a validate() method.
*/
function validateDefinition(name, definition) {
let hasSchema = false;
if (definition.schema) {
if (typeof definition.schema === "object") {
hasSchema = true;
} else {
throw new TypeError("Schema must be an object.");
}
}
if (typeof definition.merge === "string") {
if (!(definition.merge in MergeStrategy)) {
throw new TypeError(
`Definition for key "${name}" missing valid merge strategy.`,
);
}
} else if (!hasSchema && typeof definition.merge !== "function") {
throw new TypeError(
`Definition for key "${name}" must have a merge property.`,
);
}
if (typeof definition.validate === "string") {
if (!(definition.validate in ValidationStrategy)) {
throw new TypeError(
`Definition for key "${name}" missing valid validation strategy.`,
);
}
} else if (!hasSchema && typeof definition.validate !== "function") {
throw new TypeError(
`Definition for key "${name}" must have a validate() method.`,
);
}
}
//-----------------------------------------------------------------------------
// Errors
//-----------------------------------------------------------------------------
/**
* Error when an unexpected key is found.
*/
class UnexpectedKeyError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was unexpected.
*/
constructor(key) {
super(`Unexpected key "${key}" found.`);
}
}
/**
* Error when a required key is missing.
*/
class MissingKeyError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was missing.
*/
constructor(key) {
super(`Missing required key "${key}".`);
}
}
/**
* Error when a key requires other keys that are missing.
*/
class MissingDependentKeysError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was unexpected.
* @param {Array<string>} requiredKeys The keys that are required.
*/
constructor(key, requiredKeys) {
super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`);
}
}
/**
* Wrapper error for errors occuring during a merge or validate operation.
*/
class WrapperError extends Error {
/**
* Creates a new instance.
* @param {string} key The object key causing the error.
* @param {Error} source The source error.
*/
constructor(key, source) {
super(`Key "${key}": ${source.message}`, { cause: source });
// copy over custom properties that aren't represented
for (const sourceKey of Object.keys(source)) {
if (!(sourceKey in this)) {
this[sourceKey] = source[sourceKey];
}
}
}
}
//-----------------------------------------------------------------------------
// Main
//-----------------------------------------------------------------------------
/**
* Represents an object validation/merging schema.
*/
class ObjectSchema {
/**
* Track all definitions in the schema by key.
* @type {Map<string, PropertyDefinition>}
*/
#definitions = new Map();
/**
* Separately track any keys that are required for faster validtion.
* @type {Map<string, PropertyDefinition>}
*/
#requiredKeys = new Map();
/**
* Creates a new instance.
* @param {ObjectDefinition} definitions The schema definitions.
*/
constructor(definitions) {
if (!definitions) {
throw new Error("Schema definitions missing.");
}
// add in all strategies
for (const key of Object.keys(definitions)) {
validateDefinition(key, definitions[key]);
// normalize merge and validate methods if subschema is present
if (typeof definitions[key].schema === "object") {
const schema = new ObjectSchema(definitions[key].schema);
definitions[key] = {
...definitions[key],
merge(first = {}, second = {}) {
return schema.merge(first, second);
},
validate(value) {
ValidationStrategy.object(value);
schema.validate(value);
},
};
}
// normalize the merge method in case there's a string
if (typeof definitions[key].merge === "string") {
definitions[key] = {
...definitions[key],
merge: MergeStrategy[
/** @type {string} */ (definitions[key].merge)
],
};
}
// normalize the validate method in case there's a string
if (typeof definitions[key].validate === "string") {
definitions[key] = {
...definitions[key],
validate:
ValidationStrategy[
/** @type {string} */ (definitions[key].validate)
],
};
}
this.#definitions.set(key, definitions[key]);
if (definitions[key].required) {
this.#requiredKeys.set(key, definitions[key]);
}
}
}
/**
* Determines if a strategy has been registered for the given object key.
* @param {string} key The object key to find a strategy for.
* @returns {boolean} True if the key has a strategy registered, false if not.
*/
hasKey(key) {
return this.#definitions.has(key);
}
/**
* Merges objects together to create a new object comprised of the keys
* of the all objects. Keys are merged based on the each key's merge
* strategy.
* @param {...Object} objects The objects to merge.
* @returns {Object} A new object with a mix of all objects' keys.
* @throws {Error} If any object is invalid.
*/
merge(...objects) {
// double check arguments
if (objects.length < 2) {
throw new TypeError("merge() requires at least two arguments.");
}
if (
objects.some(
object => object === null || typeof object !== "object",
)
) {
throw new TypeError("All arguments must be objects.");
}
return objects.reduce((result, object) => {
this.validate(object);
for (const [key, strategy] of this.#definitions) {
try {
if (key in result || key in object) {
const merge = /** @type {Function} */ (strategy.merge);
const value = merge.call(
this,
result[key],
object[key],
);
if (value !== undefined) {
result[key] = value;
}
}
} catch (ex) {
throw new WrapperError(key, ex);
}
}
return result;
}, {});
}
/**
* Validates an object's keys based on the validate strategy for each key.
* @param {Object} object The object to validate.
* @returns {void}
* @throws {Error} When the object is invalid.
*/
validate(object) {
// check existing keys first
for (const key of Object.keys(object)) {
// check to see if the key is defined
if (!this.hasKey(key)) {
throw new UnexpectedKeyError(key);
}
// validate existing keys
const definition = this.#definitions.get(key);
// first check to see if any other keys are required
if (Array.isArray(definition.requires)) {
if (
!definition.requires.every(otherKey => otherKey in object)
) {
throw new MissingDependentKeysError(
key,
definition.requires,
);
}
}
// now apply remaining validation strategy
try {
const validate = /** @type {Function} */ (definition.validate);
validate.call(definition, object[key]);
} catch (ex) {
throw new WrapperError(key, ex);
}
}
// ensure required keys aren't missing
for (const [key] of this.#requiredKeys) {
if (!(key in object)) {
throw new MissingKeyError(key);
}
}
}
}
exportsnode_modules\@eslint\config-helpers\dist\cjs\index.cjs (Line 3:1 - Line 580:8), node_modules\@eslint\config-helpers\dist\esm\index.js (Line 2:1 - Line 579:7)
/**
* @fileoverview defineConfig helper
* @author Nicholas C. Zakas
*/
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/** @typedef {import("eslint").Linter.Config} Config */
/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */
/** @typedef {import("eslint").ESLint.Plugin} Plugin */
/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */
/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */
/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */
/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */
/** @typedef {import("./types.ts").InfiniteArray<Config>} InfiniteConfigArray */
/** @typedef {import("./types.ts").ConfigWithExtendsArray} ConfigWithExtendsArray */
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const eslintrcKeys = [
"env",
"extends",
"globals",
"ignorePatterns",
"noInlineConfig",
"overrides",
"parser",
"parserOptions",
"reportUnusedDisableDirectives",
"root",
];
const allowedGlobalIgnoreKeys = new Set(["basePath", "ignores", "name"]);
/**
* Gets the name of a config object.
* @param {Config} config The config object.
* @param {string} indexPath The index path of the config object.
* @return {string} The name of the config object.
*/
function getConfigName(config, indexPath) {
if (config.name) {
return config.name;
}
return `UserConfig${indexPath}`;
}
/**
* Gets the name of an extension.
* @param {SimpleExtendsElement} extension The extension.
* @param {string} indexPath The index of the extension.
* @return {string} The name of the extension.
*/
function getExtensionName(extension, indexPath) {
if (typeof extension === "string") {
return extension;
}
if (extension.name) {
return extension.name;
}
return `ExtendedConfig${indexPath}`;
}
/**
* Determines if a config object is a legacy config.
* @param {Config|LegacyConfig} config The config object to check.
* @return {config is LegacyConfig} `true` if the config object is a legacy config.
*/
function isLegacyConfig(config) {
for (const key of eslintrcKeys) {
if (key in config) {
return true;
}
}
return false;
}
/**
* Determines if a config object is a global ignores config.
* @param {Config} config The config object to check.
* @return {boolean} `true` if the config object is a global ignores config.
*/
function isGlobalIgnores(config) {
return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key));
}
/**
* Parses a plugin member ID (rule, processor, etc.) and returns
* the namespace and member name.
* @param {string} id The ID to parse.
* @returns {{namespace:string, name:string}} The namespace and member name.
*/
function getPluginMember(id) {
const firstSlashIndex = id.indexOf("/");
if (firstSlashIndex === -1) {
return { namespace: "", name: id };
}
let namespace = id.slice(0, firstSlashIndex);
/*
* Special cases:
* 1. The namespace is `@`, that means it's referring to the
* core plugin so `@` is the full namespace.
* 2. The namespace starts with `@`, that means it's referring to
* an npm scoped package. That means the namespace is the scope
* and the package name (i.e., `@eslint/core`).
*/
if (namespace[0] === "@" && namespace !== "@") {
const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1);
if (secondSlashIndex !== -1) {
namespace = id.slice(0, secondSlashIndex);
return { namespace, name: id.slice(secondSlashIndex + 1) };
}
}
const name = id.slice(firstSlashIndex + 1);
return { namespace, name };
}
/**
* Normalizes the plugin config by replacing the namespace with the plugin namespace.
* @param {string} userNamespace The namespace of the plugin.
* @param {Plugin} plugin The plugin config object.
* @param {Config} config The config object to normalize.
* @return {Config} The normalized config object.
*/
function normalizePluginConfig(userNamespace, plugin, config) {
const pluginNamespace = plugin.meta?.namespace;
// don't do anything if the plugin doesn't have a namespace or rules
if (
!pluginNamespace ||
pluginNamespace === userNamespace ||
(!config.rules && !config.processor && !config.language)
) {
return config;
}
const result = { ...config };
// update the rules
if (result.rules) {
const ruleIds = Object.keys(result.rules);
/** @type {Record<string,RuleEntry|undefined>} */
const newRules = {};
for (let i = 0; i < ruleIds.length; i++) {
const ruleId = ruleIds[i];
const { namespace: ruleNamespace, name: ruleName } =
getPluginMember(ruleId);
if (ruleNamespace === pluginNamespace) {
newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId];
} else {
newRules[ruleId] = result.rules[ruleId];
}
}
result.rules = newRules;
}
// update the processor
if (typeof result.processor === "string") {
const { namespace: processorNamespace, name: processorName } =
getPluginMember(result.processor);
if (processorNamespace) {
if (processorNamespace === pluginNamespace) {
result.processor = `${userNamespace}/${processorName}`;
}
}
}
// update the language
if (typeof result.language === "string") {
const { namespace: languageNamespace, name: languageName } =
getPluginMember(result.language);
if (languageNamespace === pluginNamespace) {
result.language = `${userNamespace}/${languageName}`;
}
}
return result;
}
/**
* Deeply normalizes a plugin config, traversing recursively into an arrays.
* @param {string} userPluginNamespace The namespace of the plugin.
* @param {Plugin} plugin The plugin object.
* @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize.
* @param {string} pluginConfigName The name of the plugin config.
* @return {InfiniteConfigArray} The normalized plugin config.
* @throws {TypeError} If the plugin config is a legacy config.
*/
function deepNormalizePluginConfig(
userPluginNamespace,
plugin,
pluginConfig,
pluginConfigName,
) {
// if it's an array then it's definitely a new config
if (Array.isArray(pluginConfig)) {
return pluginConfig.map(pluginSubConfig =>
deepNormalizePluginConfig(
userPluginNamespace,
plugin,
pluginSubConfig,
pluginConfigName,
),
);
}
// if it's a legacy config, throw an error
if (isLegacyConfig(pluginConfig)) {
throw new TypeError(
`Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`,
);
}
return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig);
}
/**
* Finds a plugin config by name in the given config.
* @param {Config} config The config object.
* @param {string} pluginConfigName The name of the plugin config.
* @return {InfiniteConfigArray} The plugin config.
* @throws {TypeError} If the plugin config is not found or is a legacy config.
*/
function findPluginConfig(config, pluginConfigName) {
const { namespace: userPluginNamespace, name: configName } =
getPluginMember(pluginConfigName);
const plugin = config.plugins?.[userPluginNamespace];
if (!plugin) {
throw new TypeError(`Plugin "${userPluginNamespace}" not found.`);
}
const directConfig = plugin.configs?.[configName];
if (directConfig) {
// Arrays are always flat configs, and non-legacy configs can be used directly
if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) {
return deepNormalizePluginConfig(
userPluginNamespace,
plugin,
directConfig,
pluginConfigName,
);
}
// If it's a legacy config, look for the flat version
const flatConfig = plugin.configs?.[`flat/${configName}`];
if (
flatConfig &&
(Array.isArray(flatConfig) || !isLegacyConfig(flatConfig))
) {
return deepNormalizePluginConfig(
userPluginNamespace,
plugin,
flatConfig,
pluginConfigName,
);
}
throw new TypeError(
`Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.`,
);
}
throw new TypeError(
`Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`,
);
}
/**
* Flattens an array while keeping track of the index path.
* @param {any[]} configList The array to traverse.
* @param {string} indexPath The index path of the value in a multidimensional array.
* @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values.
*/
function* flatTraverse(configList, indexPath = "") {
for (let i = 0; i < configList.length; i++) {
const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`;
// if it's an array then traverse it as well
if (Array.isArray(configList[i])) {
yield* flatTraverse(configList[i], newIndexPath);
continue;
}
yield { indexPath: newIndexPath, value: configList[i] };
}
}
/**
* Extends a list of config files by creating every combination of base and extension files.
* @param {(string|string[])[]} [baseFiles] The base files.
* @param {(string|string[])[]} [extensionFiles] The extension files.
* @return {(string|string[])[]} The extended files.
*/
function extendConfigFiles(baseFiles = [], extensionFiles = []) {
if (!extensionFiles.length) {
return baseFiles.concat();
}
if (!baseFiles.length) {
return extensionFiles.concat();
}
/** @type {(string|string[])[]} */
const result = [];
for (const baseFile of baseFiles) {
for (const extensionFile of extensionFiles) {
/*
* Each entry can be a string or array of strings. The end result
* needs to be an array of strings, so we need to be sure to include
* all of the items when there's an array.
*/
const entry = [];
if (Array.isArray(baseFile)) {
entry.push(...baseFile);
} else {
entry.push(baseFile);
}
if (Array.isArray(extensionFile)) {
entry.push(...extensionFile);
} else {
entry.push(extensionFile);
}
result.push(entry);
}
}
return result;
}
/**
* Extends a config object with another config object.
* @param {Config} baseConfig The base config object.
* @param {string} baseConfigName The name of the base config object.
* @param {Config} extension The extension config object.
* @param {string} extensionName The index of the extension config object.
* @return {Config} The extended config object.
*/
function extendConfig(baseConfig, baseConfigName, extension, extensionName) {
const result = { ...extension };
// for global ignores there is no further work to be done, we just keep everything
if (!isGlobalIgnores(extension)) {
// for files we need to create every combination of base and extension files
if (baseConfig.files) {
result.files = extendConfigFiles(baseConfig.files, extension.files);
}
// for ignores we just concatenation the extension ignores onto the base ignores
if (baseConfig.ignores) {
result.ignores = baseConfig.ignores.concat(extension.ignores ?? []);
}
}
result.name = `${baseConfigName} > ${extensionName}`;
// @ts-ignore -- ESLint types aren't updated yet
if (baseConfig.basePath) {
// @ts-ignore -- ESLint types aren't updated yet
result.basePath = baseConfig.basePath;
}
return result;
}
/**
* Processes a list of extends elements.
* @param {ConfigWithExtends} config The config object.
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
* @return {Config[]} The flattened list of config objects.
* @throws {TypeError} If the `extends` property is not an array or if nested `extends` is found.
*/
function processExtends(config, configNames) {
if (!config.extends) {
return [config];
}
if (!Array.isArray(config.extends)) {
throw new TypeError("The `extends` property must be an array.");
}
const {
/** @type {Config[]} */
extends: extendsList,
/** @type {Config} */
...configObject
} = config;
const extensionNames = new WeakMap();
// replace strings with the actual configs
const objectExtends = extendsList.map(extendsElement => {
if (typeof extendsElement === "string") {
const pluginConfig = findPluginConfig(config, extendsElement);
// assign names
if (Array.isArray(pluginConfig)) {
pluginConfig.forEach((pluginConfigElement, index) => {
extensionNames.set(
pluginConfigElement,
`${extendsElement}[${index}]`,
);
});
} else {
extensionNames.set(pluginConfig, extendsElement);
}
return pluginConfig;
}
return /** @type {Config} */ (extendsElement);
});
const result = [];
for (const { indexPath, value: extendsElement } of flatTraverse(
objectExtends,
)) {
const extension = /** @type {Config} */ (extendsElement);
if ("basePath" in extension) {
throw new TypeError("'basePath' in `extends` is not allowed.");
}
if ("extends" in extension) {
throw new TypeError("Nested 'extends' is not allowed.");
}
const baseConfigName = /** @type {string} */ (configNames.get(config));
const extensionName =
extensionNames.get(extendsElement) ??
getExtensionName(extendsElement, indexPath);
result.push(
extendConfig(
configObject,
baseConfigName,
extension,
extensionName,
),
);
}
/*
* If the base config object has only `ignores` and `extends`, then
* removing `extends` turns it into a global ignores, which is not what
* we want. So we need to check if the base config object is a global ignores
* and if so, we don't add it to the array.
*
* (The other option would be to add a `files` entry, but that would result
* in a config that didn't actually do anything because there are no
* other keys in the config.)
*/
if (!isGlobalIgnores(configObject)) {
result.push(configObject);
}
return result.flat();
}
/**
* Processes a list of config objects and arrays.
* @param {ConfigWithExtends[]} configList The list of config objects and arrays.
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
* @return {Config[]} The flattened list of config objects.
*/
function processConfigList(configList, configNames) {
return configList.flatMap(config => processExtends(config, configNames));
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* Helper function to define a config array.
* @param {ConfigWithExtendsArray} args The arguments to the function.
* @returns {Config[]} The config array.
* @throws {TypeError} If no arguments are provided or if an argument is not an object.
*/
function defineConfig(...args) {
const configNames = new WeakMap();
const configs = [];
if (args.length === 0) {
throw new TypeError("Expected one or more arguments.");
}
// first flatten the list of configs and get the names
for (const { indexPath, value } of flatTraverse(args)) {
if (typeof value !== "object" || value === null) {
throw new TypeError(
`Expected an object but received ${String(value)}.`,
);
}
const config = /** @type {ConfigWithExtends} */ (value);
// save config name for easy reference later
configNames.set(config, getConfigName(config, indexPath));
configs.push(config);
}
return processConfigList(configs, configNames);
}
/**
* @fileoverview Global ignores helper function.
* @author Nicholas C. Zakas
*/
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
let globalIgnoreCount = 0;
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* Creates a global ignores config with the given patterns.
* @param {string[]} ignorePatterns The ignore patterns.
* @param {string} [name] The name of the global ignores config.
* @returns {Config} The global ignores config.
* @throws {TypeError} If ignorePatterns is not an array or if it is empty.
*/
function globalIgnores(ignorePatterns, name) {
if (!Array.isArray(ignorePatterns)) {
throw new TypeError("ignorePatterns must be an array");
}
if (ignorePatterns.length === 0) {
throw new TypeError("ignorePatterns must contain at least one pattern");
}
const id = globalIgnoreCount++;
return {
name: name || `globalIgnores ${id}`,
ignores: ignorePatterns,
};
}
exportsnode_modules\@babel\types\lib\definitions\flow.js (Line 295:11 - Line 301:13), node_modules\@babel\types\lib\definitions\flow.js (Line 92:12 - Line 98:21)
],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
supertype: (0, _utils.validateOptionalType)("FlowType"),
impltype: (0, _utils.validateTypenode_modules\@babel\types\lib\definitions\flow.js (Line 342:12 - Line 351:17), node_modules\@babel\types\lib\definitions\flow.js (Line 82:19 - Line 91:20)
, {
visitor: ["id", "typeParameters", "right"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
right: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeAnnotation"node_modules\@babel\traverse\lib\path\modification.js (Line 106:3 - Line 112:12), node_modules\@babel\traverse\lib\path\modification.js (Line 40:3 - Line 46:13)
const nodes = _verifyNodeList.call(this, nodes_);
const {
parentPath,
parent
} = this;
if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || isExportNamedDeclaration(parent) || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
return parentPath.insertAfternode_modules\@babel\traverse\lib\path\modification.js (Line 152:22 - Line 157:14), node_modules\@babel\traverse\lib\path\modification.js (Line 51:23 - Line 56:17)
.call(this, nodes);
} else if (this.isStatementOrBlock()) {
const node = this.node;
const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
return this.pushContainernode_modules\@babel\runtime\helpers\esm\asyncToGenerator.js (Line 1:1 - Line 26:7), node_modules\@babel\core\lib\config\files\module-types.js (Line 41:1 - Line 43:6)
function asyncGeneratorStep(n, t, e, r, o, a, c) {
try {
var i = n[a](c),
u = i.value;
} catch (n) {
return void e(n);
}
i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
return function () {
var t = this,
e = arguments;
return new Promise(function (r, o) {
var a = n.apply(t, e);
function _next(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
}
function _throw(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
}
_next(void 0);
});
};
}
exportnode_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 4:22 - Line 12:10), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 5:21 - Line 13:24)
() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function memberDecnode_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 62:2 - Line 75:15), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 82:2 - Line 95:11)
.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function applyMemberDecnode_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 150:2 - Line 158:2), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 181:2 - Line 189:2)
;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r)node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 160:2 - Line 165:2), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 191:2 - Line 196:2)
),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var onode_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 177:2 - Line 188:15), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 208:2 - Line 219:14)
);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2203Rnode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 2:21 - Line 10:2), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 5:21 - Line 12:2)
() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function memberDec(e, t, r, anode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 12:2 - Line 32:2), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 14:2 - Line 34:2)
) {
case 1:
c = "accessor";
break;
case 2:
c = "method";
break;
case 3:
c = "getter";
break;
case 4:
c = "setter";
break;
default:
c = "field";
}
var l,
u,
f = {
kind: c,
name: snode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 47:2 - Line 58:2), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 49:2 - Line 60:2)
|| (u = function u(e) {
r.set.call(this, e);
})), f.access = l && u ? {
get: l,
set: u
} : l ? {
get: l
} : {
set: u
};
try {
return e(onode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 58:2 - Line 73:2), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 60:2 - Line 75:2)
, f);
} finally {
p.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function applyMemberDec(e, t, r, anode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 126:2 - Line 135:4), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 181:2 - Line 159:7)
;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r) {
varnode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 138:2 - Line 146:2), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 133:2 - Line 141:2)
];
if (Array.isArray(c)) {
var l,
u,
f = c[1],
p = c[2],
d = c.length > 3,
h = f >= 5;
if (h ? (l = tnode_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 147:2 - Line 152:2), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 142:2 - Line 147:2)
: i,
g = v.get(p) || 0;
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p);
!g && f > 2 ? v.set(p, f) : v.set(p, !0);
}
applyMemberDec(enode_modules\@babel\helpers\lib\helpers\extends.js (Line 8:2 - Line 19:7), node_modules\jsx-ast-utils\lib\values\expressions\index.js (Line 7:2 - Line 9:8)
function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
returnnode_modules\@babel\helpers\lib\helpers\defineProperty.js (Line 9:2 - Line 23:43), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 14:15 - Line 15:9)
(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
//# sourceMappingURL=defineProperty.js.mapnode_modules\@babel\helpers\lib\helpers\createClass.js (Line 8:1 - Line 14:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 6:1 - Line 6:15)
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, (node_modules\@babel\helpers\lib\helpers\createClass.js (Line 14:2 - Line 26:40), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 6:15 - Line 8:9)
(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
//# sourceMappingURL=createClass.js.mapnode_modules\@babel\helpers\lib\helpers\arrayLikeToArray.js (Line 7:1 - Line 13:45), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 11:1 - Line 12:9)
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
//# sourceMappingURL=arrayLikeToArray.js.mapnode_modules\@babel\helpers\lib\helpers\applyDecs2305.js (Line 23:6 - Line 33:9), node_modules\@babel\helpers\lib\helpers\applyDecs2311.js (Line 28:2 - Line 38:13)
;
}
function assertCallable(fn, hint1, hint2, throwUndefined) {
if (typeof fn !== "function") {
if (throwUndefined || fn !== void 0) {
throw new TypeError(hint1 + " must " + (hint2 || "be") + " a function" + (throwUndefined ? "" : " or undefined"));
}
}
return fn;
}
function applyDec(Class, decInfo, decoratorsHaveThis, name, kind, metadatanode_modules\@babel\helpers\lib\helpers\applyDecs2305.js (Line 49:2 - Line 64:5), node_modules\@babel\helpers\lib\helpers\applyDecs2311.js (Line 66:2 - Line 81:9)
|| isAccessor ? "set" : "value";
if (isPrivate) {
if (isField || isAccessor) {
desc = {
get: (0, _setFunctionName.default)(function () {
return decVal(this);
}, name, "get"),
set: function (value) {
decInfo[4](this, value);
}
};
} else {
desc[key] = decVal;
}
if (!isField) {
(0, _setFunctionName.default)(desc[key], name, kindnode_modules\@babel\helpers\lib\helpers\applyDecs2305.js (Line 72:2 - Line 81:6), node_modules\@babel\helpers\lib\helpers\applyDecs2311.js (Line 96:2 - Line 105:10)
,
decThis = decoratorsHaveThis ? decs[i - 1] : void 0;
var decoratorFinishedRef = {};
var ctx = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][kind],
name: name,
metadata: metadata,
addInitializer: function (decoratorFinishedRef, initializer) {
if (decoratorFinishedRef.v) {
throw new Errornode_modules\@babel\helpers\lib\helpers\applyDecs2305.js (Line 128:2 - Line 138:5), node_modules\@babel\helpers\lib\helpers\applyDecs2311.js (Line 142:2 - Line 152:8)
;
if (isAccessor) {
if (typeof newValue === "object" && newValue) {
if (_ = assertCallable(newValue.get, "accessor.get")) {
desc.get = _;
}
if (_ = assertCallable(newValue.set, "accessor.set")) {
desc.set = _;
}
if (_ = assertCallable(newValue.init, "accessor.init")) {
init.pushnode_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 321:5 - Line 327:9), node_modules\@babel\helpers\lib\helpers\applyDecs2305.js (Line 189:5 - Line 195:19)
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStaticnode_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 17:6 - Line 48:5), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 23:16 - Line 54:2)
) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : _toPropertyKey(name),
static: isStatic,
private: isPrivate
};
var decoratorFinishedRef = {
v: false
};
if (kind !== 0) {
ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
}
var get, set;
if (kindnode_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 83:5 - Line 127:15), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 108:5 - Line 152:11)
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = true;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) {
throw new Error("attempted to call " + fnName + " after decoration was finished");
}
}
function assertCallable(fn, hint) {
if (typeof fn !== "function") {
throw new TypeError(hint + " must be a function");
}
}
function assertValidReturnValue(kind, value) {
var type = typeof value;
if (kind === 1) {
if (type !== "object" || value === null) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
}
if (value.get !== undefined) {
assertCallable(value.get, "accessor.get");
}
if (value.set !== undefined) {
assertCallable(value.set, "accessor.set");
}
if (value.init !== undefined) {
assertCallable(value.init, "accessor.init");
}
} else if (type !== "function") {
var hint;
if (kind === 0) {
hint = "field";
} else if (kind === 10) {
hint = "class";
} else {
hint = "method";
}
throw new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDecnode_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 137:2 - Line 152:3), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 173:9 - Line 188:2)
if (kind === 3) {
desc = {
get: decInfo[3]
};
prefix = "get";
} else if (kind === 4) {
desc = {
set: decInfo[3]
};
prefix = "set";
} else {
desc = {
value: decInfo[3]
};
}
ifnode_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 156:2 - Line 175:2), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 193:8 - Line 212:2)
], "#" + name, prefix);
}
} else if (kind !== 0) {
desc = Object.getOwnPropertyDescriptor(base, name);
}
if (kind === 1) {
value = {
get: desc.get,
set: desc.set
};
} else if (kind === 2) {
value = desc.value;
} else if (kind === 3) {
value = desc.get;
} else if (kind === 4) {
value = desc.set;
}
var newValue, get, set;
if (typeof decs === "function") {
newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 175:6 - Line 195:2), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 212:16 - Line 232:2)
);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
if (kind === 0) {
init = newValue;
} else if (kind === 1) {
init = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
}
} else {
for (var i = decs.length - 1; i >= 0; i--) {
var dec = decs[i];
newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value)node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 195:6 - Line 277:2), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 232:16 - Line 314:2)
);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
var newInit;
if (kind === 0) {
newInit = newValue;
} else if (kind === 1) {
newInit = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
if (newInit !== void 0) {
if (init === void 0) {
init = newInit;
} else if (typeof init === "function") {
init = [init, newInit];
} else {
init.push(newInit);
}
}
}
}
}
if (kind === 0 || kind === 1) {
if (init === void 0) {
init = function (instance, init) {
return init;
};
} else if (typeof init !== "function") {
var ownInitializers = init;
init = function (instance, init) {
var value = init;
for (var i = 0; i < ownInitializers.length; i++) {
value = ownInitializers[i].call(instance, value);
}
return value;
};
} else {
var originalInitializer = init;
init = function (instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(init);
}
if (kind !== 0) {
if (kind === 1) {
desc.get = value.get;
desc.set = value.set;
} else if (kind === 2) {
desc.value = value;
} else if (kind === 3) {
desc.get = value;
} else if (kind === 4) {
desc.set = value;
}
if (isPrivate) {
if (kind === 1) {
ret.push(function (instance, args) {
return value.get.call(instance, args);
});
ret.push(function (instance, args) {
return value.set.call(instance, args);
});
} else if (kind === 2) {
ret.push(value);
} else {
ret.push(function (instance, args) {
return value.call(instance, args);
});
}
} else {
Object.defineProperty(base, name, desc);
}
}
}
function applyMemberDecs(Class, decInfos)node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 280:19 - Line 292:3), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 318:12 - Line 330:4)
;
var existingProtoNonFields = new Map();
var existingStaticNonFields = new Map();
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStatic = kind >= 5;
var base;
var initializers;
ifnode_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 299:7 - Line 317:2), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 344:7 - Line 362:2)
} else {
base = Class.prototype;
if (kind !== 0) {
protoInitializers = protoInitializers || [];
initializers = protoInitializers;
}
}
if (kind !== 0 && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
var existingKind = existingNonFields.get(name) || 0;
if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
} else if (!existingKind && kind > 2) {
existingNonFields.set(name, kind);
} else {
existingNonFields.set(name, true);
}
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers)node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 317:13 - Line 363:15), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 362:16 - Line 408:14)
);
}
pushInitializers(ret, protoInitializers);
pushInitializers(ret, staticInitializers);
return ret;
}
function pushInitializers(ret, initializers) {
if (initializers) {
ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(instance);
}
return instance;
});
}
}
function applyClassDecs(targetClass, classDecs) {
if (classDecs.length > 0) {
var initializers = [];
var newClass = targetClass;
var name = targetClass.name;
for (var i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: false
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = true;
}
if (nextNewClass !== undefined) {
assertValidReturnValue(10, nextNewClass);
newClass = nextNewClass;
}
}
return [newClass, function () {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(newClass);
}
}];
}
}
return function applyDecs2203Rnode_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 7:21 - Line 35:5), node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 9:22 - Line 43:15)
() {
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function addInitializer(initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer");
assertCallable(initializer, "An initializer");
initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : namenode_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 35:5 - Line 127:6), node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 37:2 - Line 129:7)
,
static: isStatic,
private: isPrivate
};
var decoratorFinishedRef = {
v: false
};
if (kind !== 0) {
ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
}
var get, set;
if (kind === 0) {
if (isPrivate) {
get = desc.get;
set = desc.set;
} else {
get = function () {
return this[name];
};
set = function (v) {
this[name] = v;
};
}
} else if (kind === 2) {
get = function () {
return desc.value;
};
} else {
if (kind === 1 || kind === 3) {
get = function () {
return desc.get.call(this);
};
}
if (kind === 1 || kind === 4) {
set = function (v) {
desc.set.call(this, v);
};
}
}
ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = true;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) {
throw new Error("attempted to call " + fnName + " after decoration was finished");
}
}
function assertCallable(fn, hint) {
if (typeof fn !== "function") {
throw new TypeError(hint + " must be a function");
}
}
function assertValidReturnValue(kind, value) {
var type = typeof value;
if (kind === 1) {
if (type !== "object" || value === null) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
}
if (value.get !== undefined) {
assertCallable(value.get, "accessor.get");
}
if (value.set !== undefined) {
assertCallable(value.set, "accessor.set");
}
if (value.init !== undefined) {
assertCallable(value.init, "accessor.init");
}
} else if (type !== "function") {
var hint;
if (kind === 0) {
hint = "field";
} else if (kind === 10) {
hint = "class";
} else {
hint = "method";
}
throw new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var decs = decInfo[0];
var desc, init, valuenode_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 145:2 - Line 266:4), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 193:2 - Line 314:6)
;
}
} else if (kind !== 0) {
desc = Object.getOwnPropertyDescriptor(base, name);
}
if (kind === 1) {
value = {
get: desc.get,
set: desc.set
};
} else if (kind === 2) {
value = desc.value;
} else if (kind === 3) {
value = desc.get;
} else if (kind === 4) {
value = desc.set;
}
var newValue, get, set;
if (typeof decs === "function") {
newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
if (kind === 0) {
init = newValue;
} else if (kind === 1) {
init = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
}
} else {
for (var i = decs.length - 1; i >= 0; i--) {
var dec = decs[i];
newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
var newInit;
if (kind === 0) {
newInit = newValue;
} else if (kind === 1) {
newInit = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
if (newInit !== void 0) {
if (init === void 0) {
init = newInit;
} else if (typeof init === "function") {
init = [init, newInit];
} else {
init.push(newInit);
}
}
}
}
}
if (kind === 0 || kind === 1) {
if (init === void 0) {
init = function (instance, init) {
return init;
};
} else if (typeof init !== "function") {
var ownInitializers = init;
init = function (instance, init) {
var value = init;
for (var i = 0; i < ownInitializers.length; i++) {
value = ownInitializers[i].call(instance, value);
}
return value;
};
} else {
var originalInitializer = init;
init = function (instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(init);
}
if (kind !== 0) {
if (kind === 1) {
desc.get = value.get;
desc.set = value.set;
} else if (kind === 2) {
desc.value = value;
} else if (kind === 3) {
desc.get = value;
} else if (kind === 4) {
desc.set = value;
}
if (isPrivate) {
if (kind === 1) {
ret.push(function (instance, args) {
return value.get.call(instance, args);
});
ret.push(function (instance, args) {
return value.set.call(instance, args);
});
} else if (kind === 2) {
ret.push(value);
} else {
ret.push(function (instance, args) {
return value.call(instance, args);
});
}
} else {
Object.defineProperty(base, name, desc);
}
}
}
function applyMemberDecs(retnode_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 267:5 - Line 309:2), node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 279:5 - Line 321:7)
var protoInitializers;
var staticInitializers;
var existingProtoNonFields = new Map();
var existingStaticNonFields = new Map();
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStatic = kind >= 5;
var base;
var initializers;
if (isStatic) {
base = Class;
kind = kind - 5;
if (kind !== 0) {
staticInitializers = staticInitializers || [];
initializers = staticInitializers;
}
} else {
base = Class.prototype;
if (kind !== 0) {
protoInitializers = protoInitializers || [];
initializers = protoInitializers;
}
}
if (kind !== 0 && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
var existingKind = existingNonFields.get(name) || 0;
if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
} else if (!existingKind && kind > 2) {
existingNonFields.set(name, kind);
} else {
existingNonFields.set(name, true);
}
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
pushInitializers(ret, protoInitializers);
pushInitializers(ret, staticInitializers);
}node_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 308:2 - Line 320:4), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 366:4 - Line 378:12)
;
}
function pushInitializers(ret, initializers) {
if (initializers) {
ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(instance);
}
return instance;
});
}
}
function applyClassDecs(retnode_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 320:2 - Line 343:4), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 378:2 - Line 401:7)
targetClass, classDecs) {
if (classDecs.length > 0) {
var initializers = [];
var newClass = targetClass;
var name = targetClass.name;
for (var i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: false
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = true;
}
if (nextNewClass !== undefined) {
assertValidReturnValue(10, nextNewClass);
newClass = nextNewClass;
}
}
retnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 93:12 - Line 114:9), node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 17:5 - Line 44:7)
, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : _toPropertyKey(name),
isStaticnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 189:23 - Line 203:12), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 138:16 - Line 152:11)
);
}
} else if (type !== "function") {
var hint;
if (kind === 0) {
hint = "field";
} else if (kind === 10) {
hint = "class";
} else {
hint = "method";
}
throw new TypeError(hint + " decorators must return a function or void 0");
}
}
function old_getInitnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 212:12 - Line 258:14), node_modules\@babel\helpers\lib\helpers\applyDecs2203R.js (Line 129:5 - Line 212:10)
, prefix, value;
if (isPrivate) {
if (kind === 0 || kind === 1) {
desc = {
get: decInfo[3],
set: decInfo[4]
};
prefix = "get";
} else if (kind === 3) {
desc = {
get: decInfo[3]
};
prefix = "get";
} else if (kind === 4) {
desc = {
set: decInfo[3]
};
prefix = "set";
} else {
desc = {
value: decInfo[3]
};
}
if (kind !== 0) {
if (kind === 1) {
_setFunctionName(decInfo[4], "#" + name, "set");
}
_setFunctionName(decInfo[3], "#" + name, prefix);
}
} else if (kind !== 0) {
desc = Object.getOwnPropertyDescriptor(base, name);
}
if (kind === 1) {
value = {
get: desc.get,
set: desc.set
};
} else if (kind === 2) {
value = desc.value;
} else if (kind === 3) {
value = desc.get;
} else if (kind === 4) {
value = desc.set;
}
var newValue, get, set;
if (typeof decs === "function") {
newValue = old_memberDecnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 264:2 - Line 278:14), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 218:5 - Line 232:10)
;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
}
} else {
for (var i = decs.length - 1; i >= 0; i--) {
var dec = decs[i];
newValue = old_memberDecnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 285:2 - Line 296:12), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 239:5 - Line 250:5)
;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = {
get: get,
set: set
};
} else {
value = newValue;
}
if (newInit !== void 0) {
if (initializernode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 314:2 - Line 322:12), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 268:2 - Line 276:5)
= function (instance, init) {
var value = init;
for (var i = 0; i < ownInitializers.length; i++) {
value = ownInitializers[i].call(instance, value);
}
return value;
};
} else {
var originalInitializer = initializernode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 327:12 - Line 360:20), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 281:5 - Line 314:16)
);
}
if (kind !== 0) {
if (kind === 1) {
desc.get = value.get;
desc.set = value.set;
} else if (kind === 2) {
desc.value = value;
} else if (kind === 3) {
desc.get = value;
} else if (kind === 4) {
desc.set = value;
}
if (isPrivate) {
if (kind === 1) {
ret.push(function (instance, args) {
return value.get.call(instance, args);
});
ret.push(function (instance, args) {
return value.set.call(instance, args);
});
} else if (kind === 2) {
ret.push(value);
} else {
ret.push(function (instance, args) {
return value.call(instance, args);
});
}
} else {
Object.defineProperty(base, name, desc);
}
}
}
function old_applyMemberDecsnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 360:18 - Line 373:12), node_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 266:6 - Line 329:13)
, decInfos) {
var protoInitializers;
var staticInitializers;
var existingProtoNonFields = new Map();
var existingStaticNonFields = new Map();
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStatic = kind >= 5;
var base;
var metadataMapnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 385:17 - Line 402:19), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 345:10 - Line 362:15)
;
if (kind !== 0) {
protoInitializers = protoInitializers || [];
initializers = protoInitializers;
}
}
if (kind !== 0 && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
var existingKind = existingNonFields.get(name) || 0;
if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
} else if (!existingKind && kind > 2) {
existingNonFields.set(name, kind);
} else {
existingNonFields.set(name, true);
}
}
old_applyMemberDecnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 407:21 - Line 417:19), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 368:17 - Line 378:15)
(ret, initializers) {
if (initializers) {
ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(instance);
}
return instance;
});
}
}
function old_applyClassDecsnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 417:12 - Line 427:4), node_modules\@babel\helpers\lib\helpers\applyDecs2301.js (Line 378:12 - Line 388:13)
, classDecs) {
if (classDecs.length > 0) {
var initializers = [];
var newClass = targetClass;
var name = targetClass.name;
for (var i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: false
};
try {
var ctxnode_modules\@babel\helpers\lib\helpers\applyDecs.js (Line 437:27 - Line 448:9), node_modules\@babel\helpers\lib\helpers\applyDecs2203.js (Line 339:23 - Line 350:7)
(10, nextNewClass);
newClass = nextNewClass;
}
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(newClass);
}
});
}
}
functionnode_modules\@babel\generator\lib\generators\types.js (Line 158:11 - Line 164:9), node_modules\@babel\generator\lib\generators\types.js (Line 103:2 - Line 109:4)
);
for (let i = 0; i < elems.length; i++) {
const elem = elems[i];
if (elem) {
if (i > 0) this.space();
this.print(elem);
if (i < len - 1 || this.shouldPrintTrailingComma(endTokennode_modules\@babel\generator\lib\generators\classes.js (Line 136:2 - Line 160:21), node_modules\@babel\generator\lib\generators\classes.js (Line 105:5 - Line 129:22)
);
if (node.computed) {
this.tokenChar(91);
this.print(node.key);
this.tokenChar(93);
} else {
this._variance(node);
this.print(node.key);
}
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.value);
}
this.semicolon();
}
function ClassPrivatePropertynode_modules\@babel\generator\lib\generators\classes.js (Line 164:3 - Line 179:12), node_modules\@babel\generator\lib\generators\classes.js (Line 114:3 - Line 129:22)
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.value);
}
this.semicolon();
}
function ClassMethodnode_modules\@babel\core\lib\transformation\normalize-file.js (Line 7:1 - Line 21:7), node_modules\@babel\core\lib\config\files\configuration.js (Line 19:1 - Line 33:6)
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _debugnode_modules\@babel\core\lib\config\resolve-targets-browser.js (Line 16:10 - Line 34:7), node_modules\@babel\core\lib\config\resolve-targets.js (Line 24:2 - Line 42:6)
;
}
function resolveTargets(options, root) {
const optTargets = options.targets;
let targets;
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
targets = {
browsers: optTargets
};
} else if (optTargets) {
if ("esmodules" in optTargets) {
targets = Object.assign({}, optTargets, {
esmodules: "intersect"
});
} else {
targets = optTargets;
}
}
returnnode_modules\@babel\core\lib\config\config-chain.js (Line 9:1 - Line 23:4), node_modules\@babel\core\lib\transformation\normalize-file.js (Line 14:1 - Line 28:9)
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _debug() {
const data = require("debug");
_debug = function () {
return data;
};
return data;
}
varsrc\components\board\workspace\CanvasToolSection.tsx (Line 96:18 - Line 233:2), src\components\board\workspace\HeaderToolbar.tsx (Line 103:12 - Line 240:2)
}>
{/* Color Control */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<div className={styles.colorPickerWrapper}>
<ColorPicker
color={strokeColor}
onChange={setStrokeColor}
/>
</div>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.color')}</span>
</div>
{/* Size Control */}
{tool !== TOOLS.COLOR_PICKER && tool !== TOOLS.RECOLOR && tool !== TOOLS.DOWNLOAD && (
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<div className={styles.strokeControl}>
<Slider
value={strokeWidth}
min={tool === TOOLS.TEXT ? 12 : STROKE_WIDTH_RANGE.MIN}
max={tool === TOOLS.TEXT ? 48 : STROKE_WIDTH_RANGE.MAX}
onChange={setStrokeWidth}
aria-label={t('accessibility.sizeSlider', { size: strokeWidth })}
/>
</div>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.size')}</span>
</div>
)}
{/* Basic Tools */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<button
className={`${styles.iconButton} ${tool === TOOLS.BRUSH ? styles.active : ''}`}
onClick={() => handleToolClick(TOOLS.BRUSH)}
title={t('toolbar.tool.brush')}
>
<Brush size={20} />
</button>
<button
className={`${styles.iconButton} ${tool === TOOLS.ERASER ? styles.active : ''}`}
onClick={() => handleToolClick(TOOLS.ERASER)}
title={t('toolbar.tool.eraser')}
>
<Eraser size={20} />
</button>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.draw')}</span>
</div>
{/* Shape Tools */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<ShapeToolsDropdown
currentTool={tool}
onToolSelect={setTool}
/>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.shapes')}</span>
</div>
{/* Line Tools */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<LineToolsDropdown
currentTool={tool}
onToolSelect={setTool}
/>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.lines')}</span>
</div>
{/* Special Tools */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<button
className={`${styles.iconButton} ${tool === TOOLS.TEXT ? styles.active : ''}`}
onClick={() => handleToolClick(TOOLS.TEXT)}
title={t('toolbar.tool.text')}
>
<Type size={20} />
</button>
<button
className={`${styles.iconButton} ${tool === TOOLS.COLOR_PICKER ? styles.active : ''}`}
onClick={() => handleToolClick(TOOLS.COLOR_PICKER)}
title={t('toolbar.tool.colorPicker')}
>
<Pipette size={20} />
</button>
<button
className={`${styles.iconButton} ${tool === TOOLS.RECOLOR ? styles.active : ''}`}
onClick={() => handleToolClick(TOOLS.RECOLOR)}
title={t('toolbar.tool.recolor')}
>
<PaintBucket size={20} />
</button>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.tools')}</span>
</div>
{/* History */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<button
className={styles.iconButton}
onClick={onUndo}
disabled={!isUndoAvailable}
title={t('toolbar.tool.undo')}
>
<Undo size={20} />
</button>
<button
className={styles.iconButton}
onClick={onRedo}
disabled={!isRedoAvailable}
title={t('toolbar.tool.redo')}
>
<Redo size={20} />
</button>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.history')}</span>
</div>
{/* Actions */}
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<button
className={styles.iconButton}
onClick={handleDownload}
title={t('toolbar.tool.download')}
>
<Download size={20} />
</button>
</div>
<span className={styles.toolLabel}src\components\board\details\CanvasSettingsSection.tsx (Line 148:12 - Line 184:11), src\components\board\list\CreateBoardForm.tsx (Line 159:18 - Line 195:10)
}>
{/* Canvas Size Presets */}
<div className={styles.sizeGroup}>
{CANVAS_CONFIG.PRESET_ORDER.map((size) => {
const preset = CANVAS_CONFIG.CANVAS_SIZE_PRESETS[size];
return (
<label key={size} className={styles.radioOption}>
<input
type="radio"
value={size}
checked={canvasSize === size}
onChange={(e) => setCanvasSize(e.target.value as typeof canvasSize)}
disabled={isUpdating}
aria-label={`${t(`canvasSize.presets.${getTranslationKey(size)}.label`)} (${preset.ratio}) - ${preset.width}×${preset.height}`}
/>
<div className={styles.presetLabel}>
<span className={styles.presetName}>
{t(`canvasSize.presets.${getTranslationKey(size)}.label`)}
</span>
<span className={styles.presetInfo}>
({preset.ratio}) - {preset.width}×{preset.height}
</span>
</div>
</label>
);
})}
</div>
{/* Custom Option */}
<div className={styles.sizeGroup}>
<label className={styles.radioOption}>
<input
type="radio"
value="custom"
checked={canvasSize === 'custom'}
onChange={(e) => setCanvasSize(e.target.value as typeof canvasSize)}
disabled={isUpdatingsrc\components\board\details\CanvasSettingsSection.tsx (Line 184:11 - Line 202:14), src\components\board\list\CreateBoardForm.tsx (Line 195:10 - Line 213:2)
}
aria-label={`${t('canvasSize.custom.label')}`}
/>
<div className={styles.presetLabel}>
<span className={styles.presetName}>
{t('canvasSize.custom.label')}
</span>
<span className={styles.presetInfo}>
</span>
</div>
</label>
</div>
</div>
{canvasSize === 'custom' && (
<div className={styles.customSizeInputs}>
<Input
type="number"
value={customWidth}
onChange={(e) => setCustomWidth(parseInt(e.target.value) || boardDetailssrc\components\board\details\CanvasSettingsSection.tsx (Line 239:3 - Line 262:2), src\components\board\details\CanvasSettingsSection.tsx (Line 88:13 - Line 106:2)
} />
{isUpdating ? t('common.button.saving') : t('boardDetails.canvasSettings.applyChanges')}
</Button>
</div>
</div>
) : (
<div className={styles.readOnlySettings}>
<div className={styles.settingRow}>
<span className={styles.settingLabel}>{t('boardDetails.canvasSettings.backgroundColor')}:</span>
<div
className={styles.colorPreview}
style={{ backgroundColor: boardDetails.canvasBackgroundColor }}
title={boardDetails.canvasBackgroundColor}
/>
<span className={styles.settingValue}>
{(() => {
const colorName = getColorName(boardDetails.canvasBackgroundColor);
return colorName ? t(`colors.${colorName}`) : boardDetails.canvasBackgroundColor;
})()}
</span>
</div>
<div className={styles.settingRow}>
<span className={styles.settingLabel}>{t('boardDetails.canvasSettings.size')}:</span>
<span className={styles.settingValue}node_modules\vite\dist\node\cli.js (Line 698:39 - Line 704:5), node_modules\vite\dist\node\cli.js (Line 651:23 - Line 657:8)
${e.stack}`), { error: e });
process.exit(1);
} finally {
stopProfiler((message) => createLogger(options.logLevel).info(message));
}
});
cli.helpnode_modules\uri-js\dist\esnext\uri.js (Line 395:13 - Line 403:2), node_modules\uri-js\dist\esnext\uri.js (Line 386:9 - Line 394:9)
//target.authority = relative.authority;
target.userinfo = relative.userinfo;
target.host = relative.host;
target.port = relative.port;
target.path = removeDotSegments(relative.path || "");
target.query = relative.query;
}
else {
if (!node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 103:8 - Line 108:48), node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 97:7 - Line 102:43)
, "tsconfig.json");
var res = (0, tsconfig_loader_1.walkForTsConfig)((0, path_1.join)("/root", "dir1"), function (path) { return path === pathToTsconfig; });
// assert.equal(res, pathToTsconfig);
expect(res).toBe(pathToTsconfig);
});
it("should return undefined when reaching the top"node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 180:30 - Line 191:7), node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 140:22 - Line 151:19)
,
compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } },
};
var firstConfigPath = (0, path_1.join)("/root", "dir1", "tsconfig.json");
var baseConfig = {
compilerOptions: {
baseUrl: "olle",
paths: { foo: ["bar1"] },
strict: true,
},
};
var baseConfigPath = (0, path_1.join)("/root", "dir1"node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 191:13 - Line 202:45), node_modules\tsconfig-paths\lib\__tests__\tsconfig-loader.test.js (Line 151:8 - Line 162:37)
, "base-config.json");
var res = (0, tsconfig_loader_1.loadTsconfig)((0, path_1.join)("/root", "dir1", "tsconfig.json"), function (path) { return path === firstConfigPath || path === baseConfigPath; }, function (path) {
if (path === firstConfigPath) {
return JSON.stringify(firstConfig);
}
if (path === baseConfigPath) {
return JSON.stringify(baseConfig);
}
return "";
});
// assert.deepEqual(res, {
// extends: "my-package/base-config.json",node_modules\tsconfig-paths\lib\__tests__\try-path.test.js (Line 30:2 - Line 37:2), node_modules\tsconfig-paths\lib\__tests__\try-path.test.js (Line 6:2 - Line 11:2)
[
{
pattern: "longest/pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")],
},
{
pattern: "pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")],node_modules\tsconfig-paths\lib\__tests__\mapping-entry.test.js (Line 29:2 - Line 38:2), node_modules\tsconfig-paths\lib\__tests__\try-path.test.js (Line 6:2 - Line 39:2)
[
{
pattern: "longest/pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")],
},
{
pattern: "pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")],
},
{node_modules\tinyglobby\node_modules\picomatch\index.js (Line 1:1 - Line 17:2), node_modules\vite\node_modules\picomatch\index.js (Line 1:1 - Line 17:2)
'use strict';
const pico = require('./lib/picomatch');
const utils = require('./lib/utils');
function picomatch(glob, options, returnState = false) {
// default to os.platform()
if (options && (options.windows === null || options.windows === undefined)) {
// don't mutate the original options object
options = { ...options, windows: utils.isWindows() };
}
return pico(glob, options, returnState);
}
Object.assign(picomatch, pico);
module.exports = picomatch;node_modules\sockjs-client\lib\event\event.js (Line 12:5 - Line 22:2), node_modules\faye-websocket\lib\faye\websocket\api\event.js (Line 12:11 - Line 22:2)
;
};
Event.prototype.stopPropagation = function() {};
Event.prototype.preventDefault = function() {};
Event.CAPTURING_PHASE = 1;
Event.AT_TARGET = 2;
Event.BUBBLING_PHASE = 3;
module.exports = Event;node_modules\react-router\dist\production\dom-export.js (Line 43:1 - Line 49:15), node_modules\react-router\dist\production\dom-export.mjs (Line 43:1 - Line 49:10)
var ssrInfo = null;
var router = null;
function initSsrInfo() {
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
if (window.__reactRouterManifest.sri === true) {
const importMap = document.querySelector("script[rr-importmap]");
if (_optionalChainnode_modules\react-router\dist\production\dom-export.js (Line 49:2 - Line 81:13), node_modules\react-router\dist\production\dom-export.mjs (Line 49:12 - Line 81:10)
) {
try {
window.__reactRouterManifest.sri = JSON.parse(
importMap.textContent
).integrity;
} catch (err) {
console.error("Failed to parse import map", err);
}
}
}
ssrInfo = {
context: window.__reactRouterContext,
manifest: window.__reactRouterManifest,
routeModules: window.__reactRouterRouteModules,
stateDecodingPromise: void 0,
router: void 0,
routerInitialized: false
};
}
}
function createHydratedRouter({
unstable_getContext
}) {
initSsrInfo();
if (!ssrInfo) {
throw new Error(
"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`"
);
}
let localSsrInfo = ssrInfo;
if (!ssrInfo.stateDecodingPromise) {
let stream = ssrInfo.context.stream;
_reactrouternode_modules\react-router\dist\production\dom-export.js (Line 83:2 - Line 96:13), node_modules\react-router\dist\production\dom-export.mjs (Line 83:2 - Line 96:19)
stream, window).then((value) => {
ssrInfo.context.state = value.value;
localSsrInfo.stateDecodingPromise.value = true;
}).catch((e) => {
localSsrInfo.stateDecodingPromise.error = e;
});
}
if (ssrInfo.stateDecodingPromise.error) {
throw ssrInfo.stateDecodingPromise.error;
}
if (!ssrInfo.stateDecodingPromise.value) {
throw ssrInfo.stateDecodingPromise;
}
let routes = _reactrouternode_modules\react-router\dist\production\dom-export.js (Line 97:5 - Line 106:15), node_modules\react-router\dist\production\dom-export.mjs (Line 97:5 - Line 106:8)
ssrInfo.manifest.routes,
ssrInfo.routeModules,
ssrInfo.context.state,
ssrInfo.context.ssr,
ssrInfo.context.isSpaMode
);
let hydrationData = void 0;
if (ssrInfo.context.isSpaMode) {
let { loaderData } = ssrInfo.context.state;
if (_optionalChainnode_modules\react-router\dist\production\dom-export.js (Line 149:7 - Line 163:13), node_modules\react-router\dist\production\dom-export.mjs (Line 149:7 - Line 163:44)
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.routeDiscovery,
ssrInfo.context.isSpaMode,
ssrInfo.context.basename
)
});
ssrInfo.router = router2;
if (router2.state.initialized) {
ssrInfo.routerInitialized = true;
router2.initialize();
}
router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */
_reactrouternode_modules\react-router\dist\production\dom-export.js (Line 163:51 - Line 174:15), node_modules\react-router\dist\production\dom-export.mjs (Line 163:44 - Line 174:8)
;
window.__reactRouterDataRouter = router2;
return router2;
}
function HydratedRouter(props) {
if (!router) {
router = createHydratedRouter({
unstable_getContext: props.unstable_getContext
});
}
let [criticalCss, setCriticalCss] = React2.useState(
process.env.NODE_ENV === "development" ? _optionalChainnode_modules\react-router\dist\production\dom-export.js (Line 174:2 - Line 183:17), node_modules\react-router\dist\production\dom-export.mjs (Line 174:2 - Line 183:28)
: void 0
);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development") {
setCriticalCss(void 0);
}
}, []);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
document.querySelectorAll(`[${_chunkZ56HUDN5jsnode_modules\react-router\dist\production\dom-export.js (Line 183:2 - Line 202:13), node_modules\react-router\dist\production\dom-export.mjs (Line 183:3 - Line 202:10)
CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
}
}, [criticalCss]);
let [location, setLocation] = React2.useState(router.state.location);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {
ssrInfo.routerInitialized = true;
ssrInfo.router.initialize();
}
}, []);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router) {
return ssrInfo.router.subscribe((newState) => {
if (newState.location !== location) {
setLocation(newState.location);
}
});
}
}, [location]);
_reactrouternode_modules\react-router\dist\production\dom-export.js (Line 215:24 - Line 227:13), node_modules\react-router\dist\production\dom-export.mjs (Line 215:17 - Line 227:19)
.Provider,
{
value: {
manifest: ssrInfo.manifest,
routeModules: ssrInfo.routeModules,
future: ssrInfo.context.future,
criticalCss,
ssr: ssrInfo.context.ssr,
isSpaMode: ssrInfo.context.isSpaMode,
routeDiscovery: ssrInfo.context.routeDiscovery
}
},
/* @__PURE__ */ React2.createElement(_reactrouternode_modules\react-router\dist\development\index.mjs (Line 34:23 - Line 143:23), node_modules\react-router\dist\production\index.mjs (Line 34:23 - Line 143:23)
;
import {
Action,
Await,
BrowserRouter,
DataRouterContext,
DataRouterStateContext,
ErrorResponseImpl,
FetchersContext,
Form,
FrameworkContext,
HashRouter,
HistoryRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
LocationContext,
MemoryRouter,
Meta,
NavLink,
Navigate,
NavigationContext,
Outlet,
PrefetchPageLinks,
RemixErrorBoundary,
Route,
RouteContext,
Router,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
SingleFetchRedirectSymbol,
StaticRouter,
StaticRouterProvider,
ViewTransitionContext,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps,
createBrowserHistory,
createBrowserRouter,
createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut,
createHashRouter,
createMemoryRouter,
createPath,
createRouter,
createRoutesFromChildren,
createRoutesFromElements,
createSearchParams,
createStaticHandler2 as createStaticHandler,
createStaticRouter,
data,
decodeViaTurboStream,
generatePath,
getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties,
invariant,
isRouteErrorResponse,
mapRouteProperties,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
shouldHydrateRouteLoader,
unstable_RouterContextProvider,
unstable_createContext,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFogOFWarDiscovery,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
usePrompt,
useResolvedPath,
useRevalidator,
useRouteError,
useRouteLoaderData,
useRoutes,
useScrollRestoration,
useSearchParams,
useSubmit,
useViewTransitionState,
withComponentProps,
withErrorBoundaryProps,
withHydrateFallbackProps
} from "./chunk-PVWAREVJ.mjs"node_modules\react-router\dist\development\index.mjs (Line 143:23 - Line 273:2), node_modules\react-router\dist\production\index.mjs (Line 143:23 - Line 273:2)
;
export {
Await,
BrowserRouter,
Form,
HashRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Action as NavigationType,
Outlet,
PrefetchPageLinks,
Route,
Router,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
ServerRouter,
StaticRouter,
StaticRouterProvider,
DataRouterContext as UNSAFE_DataRouterContext,
DataRouterStateContext as UNSAFE_DataRouterStateContext,
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
FetchersContext as UNSAFE_FetchersContext,
FrameworkContext as UNSAFE_FrameworkContext,
LocationContext as UNSAFE_LocationContext,
NavigationContext as UNSAFE_NavigationContext,
RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,
RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
RouteContext as UNSAFE_RouteContext,
ServerMode as UNSAFE_ServerMode,
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
ViewTransitionContext as UNSAFE_ViewTransitionContext,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
createBrowserHistory as UNSAFE_createBrowserHistory,
createClientRoutes as UNSAFE_createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
createRouter as UNSAFE_createRouter,
decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
deserializeErrors as UNSAFE_deserializeErrors,
getHydrationData as UNSAFE_getHydrationData,
getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
invariant as UNSAFE_invariant,
mapRouteProperties as UNSAFE_mapRouteProperties,
shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
useScrollRestoration as UNSAFE_useScrollRestoration,
withComponentProps as UNSAFE_withComponentProps,
withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
createBrowserRouter,
createCookie,
createCookieSessionStorage,
createHashRouter,
createMemoryRouter,
createMemorySessionStorage,
createPath,
createRequestHandler,
createRoutesFromChildren,
createRoutesFromElements,
createRoutesStub,
createSearchParams,
createSession,
createSessionStorage,
createStaticHandler,
createStaticRouter,
data,
generatePath,
href,
isCookie,
isRouteErrorResponse,
isSession,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
HistoryRouter as unstable_HistoryRouter,
RSCHydratedRouter as unstable_RSCHydratedRouter,
RSCStaticRouter as unstable_RSCStaticRouter,
unstable_RouterContextProvider,
createCallServer as unstable_createCallServer,
unstable_createContext,
getRSCStream as unstable_getRSCStream,
routeRSCServerRequest as unstable_routeRSCServerRequest,
setDevServerHooks as unstable_setDevServerHooks,
usePrompt as unstable_usePrompt,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
useResolvedPath,
useRevalidator,
useRouteError,
useRouteLoaderData,
useRoutes,
useSearchParams,
useSubmit,
useViewTransitionState
};node_modules\react-router\dist\development\index-react-server-client.mjs (Line 1:1 - Line 35:23), node_modules\react-router\dist\production\index-react-server-client.mjs (Line 1:1 - Line 35:23)
/**
* react-router v7.8.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
import {
Await,
BrowserRouter,
Form,
HashRouter,
HistoryRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps
} from "./chunk-PVWAREVJ.mjs"node_modules\react-router\dist\development\index-react-server-client.mjs (Line 35:23 - Line 59:2), node_modules\react-router\dist\production\index-react-server-client.mjs (Line 35:23 - Line 59:2)
;
export {
Await,
BrowserRouter,
Form,
HashRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
HistoryRouter as unstable_HistoryRouter
};node_modules\react-router\dist\development\dom-export.mjs (Line 32:23 - Line 240:2), node_modules\react-router\dist\production\dom-export.mjs (Line 32:23 - Line 240:2)
;
// lib/dom-export/dom-router-provider.tsx
import * as React from "react";
import * as ReactDOM from "react-dom";
function RouterProvider2(props) {
return /* @__PURE__ */ React.createElement(RouterProvider, { flushSync: ReactDOM.flushSync, ...props });
}
// lib/dom-export/hydrated-router.tsx
import * as React2 from "react";
var ssrInfo = null;
var router = null;
function initSsrInfo() {
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
if (window.__reactRouterManifest.sri === true) {
const importMap = document.querySelector("script[rr-importmap]");
if (importMap?.textContent) {
try {
window.__reactRouterManifest.sri = JSON.parse(
importMap.textContent
).integrity;
} catch (err) {
console.error("Failed to parse import map", err);
}
}
}
ssrInfo = {
context: window.__reactRouterContext,
manifest: window.__reactRouterManifest,
routeModules: window.__reactRouterRouteModules,
stateDecodingPromise: void 0,
router: void 0,
routerInitialized: false
};
}
}
function createHydratedRouter({
unstable_getContext
}) {
initSsrInfo();
if (!ssrInfo) {
throw new Error(
"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`"
);
}
let localSsrInfo = ssrInfo;
if (!ssrInfo.stateDecodingPromise) {
let stream = ssrInfo.context.stream;
invariant(stream, "No stream found for single fetch decoding");
ssrInfo.context.stream = void 0;
ssrInfo.stateDecodingPromise = decodeViaTurboStream(stream, window).then((value) => {
ssrInfo.context.state = value.value;
localSsrInfo.stateDecodingPromise.value = true;
}).catch((e) => {
localSsrInfo.stateDecodingPromise.error = e;
});
}
if (ssrInfo.stateDecodingPromise.error) {
throw ssrInfo.stateDecodingPromise.error;
}
if (!ssrInfo.stateDecodingPromise.value) {
throw ssrInfo.stateDecodingPromise;
}
let routes = createClientRoutes(
ssrInfo.manifest.routes,
ssrInfo.routeModules,
ssrInfo.context.state,
ssrInfo.context.ssr,
ssrInfo.context.isSpaMode
);
let hydrationData = void 0;
if (ssrInfo.context.isSpaMode) {
let { loaderData } = ssrInfo.context.state;
if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
hydrationData = {
loaderData: {
root: loaderData.root
}
};
}
} else {
hydrationData = getHydrationData(
ssrInfo.context.state,
routes,
(routeId) => ({
clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,
hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,
hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null
}),
window.location,
window.__reactRouterContext?.basename,
ssrInfo.context.isSpaMode
);
if (hydrationData && hydrationData.errors) {
hydrationData.errors = deserializeErrors(hydrationData.errors);
}
}
let router2 = createRouter({
routes,
history: createBrowserHistory(),
basename: ssrInfo.context.basename,
unstable_getContext,
hydrationData,
hydrationRouteProperties,
mapRouteProperties,
future: {
unstable_middleware: ssrInfo.context.future.unstable_middleware
},
dataStrategy: getTurboStreamSingleFetchDataStrategy(
() => router2,
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.basename
),
patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.routeDiscovery,
ssrInfo.context.isSpaMode,
ssrInfo.context.basename
)
});
ssrInfo.router = router2;
if (router2.state.initialized) {
ssrInfo.routerInitialized = true;
router2.initialize();
}
router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */
createClientRoutesWithHMRRevalidationOptOut;
window.__reactRouterDataRouter = router2;
return router2;
}
function HydratedRouter(props) {
if (!router) {
router = createHydratedRouter({
unstable_getContext: props.unstable_getContext
});
}
let [criticalCss, setCriticalCss] = React2.useState(
process.env.NODE_ENV === "development" ? ssrInfo?.context.criticalCss : void 0
);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development") {
setCriticalCss(void 0);
}
}, []);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
document.querySelectorAll(`[${CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
}
}, [criticalCss]);
let [location, setLocation] = React2.useState(router.state.location);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {
ssrInfo.routerInitialized = true;
ssrInfo.router.initialize();
}
}, []);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router) {
return ssrInfo.router.subscribe((newState) => {
if (newState.location !== location) {
setLocation(newState.location);
}
});
}
}, [location]);
invariant(ssrInfo, "ssrInfo unavailable for HydratedRouter");
useFogOFWarDiscovery(
router,
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.routeDiscovery,
ssrInfo.context.isSpaMode
);
return (
// This fragment is important to ensure we match the <ServerRouter> JSX
// structure so that useId values hydrate correctly
/* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
FrameworkContext.Provider,
{
value: {
manifest: ssrInfo.manifest,
routeModules: ssrInfo.routeModules,
future: ssrInfo.context.future,
criticalCss,
ssr: ssrInfo.context.ssr,
isSpaMode: ssrInfo.context.isSpaMode,
routeDiscovery: ssrInfo.context.routeDiscovery
}
},
/* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(
RouterProvider2,
{
router,
unstable_onError: props.unstable_onError
}
))
), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
);
}
export {
HydratedRouter,
RouterProvider2 as RouterProvider
};node_modules\react-router\dist\development\dom-export.js (Line 1:1 - Line 14:17), node_modules\react-router\dist\production\dom-export.js (Line 1:1 - Line 14:17)
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
* react-router v7.8.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
var _chunkZO66TDGBjsnode_modules\react-router\dist\development\dom-export.js (Line 14:22 - Line 183:17), node_modules\react-router\dist\production\dom-export.js (Line 14:22 - Line 183:28)
);
// lib/dom-export/dom-router-provider.tsx
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
var _reactdom = require('react-dom'); var ReactDOM = _interopRequireWildcard(_reactdom);
var _reactrouter = require('react-router');
function RouterProvider(props) {
return /* @__PURE__ */ React.createElement(_reactrouter.RouterProvider, { flushSync: ReactDOM.flushSync, ...props });
}
// lib/dom-export/hydrated-router.tsx
var ssrInfo = null;
var router = null;
function initSsrInfo() {
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
if (window.__reactRouterManifest.sri === true) {
const importMap = document.querySelector("script[rr-importmap]");
if (_optionalChain([importMap, 'optionalAccess', _ => _.textContent])) {
try {
window.__reactRouterManifest.sri = JSON.parse(
importMap.textContent
).integrity;
} catch (err) {
console.error("Failed to parse import map", err);
}
}
}
ssrInfo = {
context: window.__reactRouterContext,
manifest: window.__reactRouterManifest,
routeModules: window.__reactRouterRouteModules,
stateDecodingPromise: void 0,
router: void 0,
routerInitialized: false
};
}
}
function createHydratedRouter({
unstable_getContext
}) {
initSsrInfo();
if (!ssrInfo) {
throw new Error(
"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`"
);
}
let localSsrInfo = ssrInfo;
if (!ssrInfo.stateDecodingPromise) {
let stream = ssrInfo.context.stream;
_reactrouter.UNSAFE_invariant.call(void 0, stream, "No stream found for single fetch decoding");
ssrInfo.context.stream = void 0;
ssrInfo.stateDecodingPromise = _reactrouter.UNSAFE_decodeViaTurboStream.call(void 0, stream, window).then((value) => {
ssrInfo.context.state = value.value;
localSsrInfo.stateDecodingPromise.value = true;
}).catch((e) => {
localSsrInfo.stateDecodingPromise.error = e;
});
}
if (ssrInfo.stateDecodingPromise.error) {
throw ssrInfo.stateDecodingPromise.error;
}
if (!ssrInfo.stateDecodingPromise.value) {
throw ssrInfo.stateDecodingPromise;
}
let routes = _reactrouter.UNSAFE_createClientRoutes.call(void 0,
ssrInfo.manifest.routes,
ssrInfo.routeModules,
ssrInfo.context.state,
ssrInfo.context.ssr,
ssrInfo.context.isSpaMode
);
let hydrationData = void 0;
if (ssrInfo.context.isSpaMode) {
let { loaderData } = ssrInfo.context.state;
if (_optionalChain([ssrInfo, 'access', _2 => _2.manifest, 'access', _3 => _3.routes, 'access', _4 => _4.root, 'optionalAccess', _5 => _5.hasLoader]) && loaderData && "root" in loaderData) {
hydrationData = {
loaderData: {
root: loaderData.root
}
};
}
} else {
hydrationData = _reactrouter.UNSAFE_getHydrationData.call(void 0,
ssrInfo.context.state,
routes,
(routeId) => ({
clientLoader: _optionalChain([ssrInfo, 'access', _6 => _6.routeModules, 'access', _7 => _7[routeId], 'optionalAccess', _8 => _8.clientLoader]),
hasLoader: _optionalChain([ssrInfo, 'access', _9 => _9.manifest, 'access', _10 => _10.routes, 'access', _11 => _11[routeId], 'optionalAccess', _12 => _12.hasLoader]) === true,
hasHydrateFallback: _optionalChain([ssrInfo, 'access', _13 => _13.routeModules, 'access', _14 => _14[routeId], 'optionalAccess', _15 => _15.HydrateFallback]) != null
}),
window.location,
_optionalChain([window, 'access', _16 => _16.__reactRouterContext, 'optionalAccess', _17 => _17.basename]),
ssrInfo.context.isSpaMode
);
if (hydrationData && hydrationData.errors) {
hydrationData.errors = _reactrouter.UNSAFE_deserializeErrors.call(void 0, hydrationData.errors);
}
}
let router2 = _reactrouter.UNSAFE_createRouter.call(void 0, {
routes,
history: _reactrouter.UNSAFE_createBrowserHistory.call(void 0, ),
basename: ssrInfo.context.basename,
unstable_getContext,
hydrationData,
hydrationRouteProperties: _reactrouter.UNSAFE_hydrationRouteProperties,
mapRouteProperties: _reactrouter.UNSAFE_mapRouteProperties,
future: {
unstable_middleware: ssrInfo.context.future.unstable_middleware
},
dataStrategy: _reactrouter.UNSAFE_getTurboStreamSingleFetchDataStrategy.call(void 0,
() => router2,
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.basename
),
patchRoutesOnNavigation: _reactrouter.UNSAFE_getPatchRoutesOnNavigationFunction.call(void 0,
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.routeDiscovery,
ssrInfo.context.isSpaMode,
ssrInfo.context.basename
)
});
ssrInfo.router = router2;
if (router2.state.initialized) {
ssrInfo.routerInitialized = true;
router2.initialize();
}
router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */
_reactrouter.UNSAFE_createClientRoutesWithHMRRevalidationOptOut;
window.__reactRouterDataRouter = router2;
return router2;
}
function HydratedRouter(props) {
if (!router) {
router = createHydratedRouter({
unstable_getContext: props.unstable_getContext
});
}
let [criticalCss, setCriticalCss] = React2.useState(
process.env.NODE_ENV === "development" ? _optionalChain([ssrInfo, 'optionalAccess', _18 => _18.context, 'access', _19 => _19.criticalCss]) : void 0
);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development") {
setCriticalCss(void 0);
}
}, []);
React2.useEffect(() => {
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
document.querySelectorAll(`[${_chunkZO66TDGBjsnode_modules\react-router\dist\development\dom-export.js (Line 183:17 - Line 240:2), node_modules\react-router\dist\production\dom-export.js (Line 183:17 - Line 240:2)
.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
}
}, [criticalCss]);
let [location, setLocation] = React2.useState(router.state.location);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {
ssrInfo.routerInitialized = true;
ssrInfo.router.initialize();
}
}, []);
React2.useLayoutEffect(() => {
if (ssrInfo && ssrInfo.router) {
return ssrInfo.router.subscribe((newState) => {
if (newState.location !== location) {
setLocation(newState.location);
}
});
}
}, [location]);
_reactrouter.UNSAFE_invariant.call(void 0, ssrInfo, "ssrInfo unavailable for HydratedRouter");
_reactrouter.UNSAFE_useFogOFWarDiscovery.call(void 0,
router,
ssrInfo.manifest,
ssrInfo.routeModules,
ssrInfo.context.ssr,
ssrInfo.context.routeDiscovery,
ssrInfo.context.isSpaMode
);
return (
// This fragment is important to ensure we match the <ServerRouter> JSX
// structure so that useId values hydrate correctly
/* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
_reactrouter.UNSAFE_FrameworkContext.Provider,
{
value: {
manifest: ssrInfo.manifest,
routeModules: ssrInfo.routeModules,
future: ssrInfo.context.future,
criticalCss,
ssr: ssrInfo.context.ssr,
isSpaMode: ssrInfo.context.isSpaMode,
routeDiscovery: ssrInfo.context.routeDiscovery
}
},
/* @__PURE__ */ React2.createElement(_reactrouter.UNSAFE_RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(
RouterProvider,
{
router,
unstable_onError: props.unstable_onError
}
))
), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
);
}
exports.HydratedRouter = HydratedRouter; exports.RouterProvider = RouterProvider;node_modules\react-i18next\dist\es\withTranslation.js (Line 4:2 - Line 24:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 742:2 - Line 762:6)
const withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {
function I18nextWithTranslation({
forwardedRef,
...rest
}) {
const [t, i18n, ready] = useTranslation(ns, {
...rest,
keyPrefix: options.keyPrefix
});
const passDownProps = {
...rest,
t,
i18n,
tReady: ready
};
if (options.withRef && forwardedRef) {
passDownProps.ref = forwardedRef;
} else if (!options.withRef && forwardedRef) {
passDownProps.forwardedRef = forwardedRef;
}
return createElementnode_modules\react-i18next\dist\es\utils.js (Line 1:2 - Line 17:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 121:2 - Line 137:6)
const warn = (i18n, code, msg, rest) => {
const args = [msg, {
code,
...(rest || {})
}];
if (i18n?.services?.logger?.forward) {
return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
const alreadyWarned = {};
exportnode_modules\react-i18next\dist\es\utils.js (Line 17:2 - Line 35:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 137:2 - Line 155:6)
const warnOnce = (i18n, code, msg, rest) => {
if (isString(msg) && alreadyWarned[msg]) return;
if (isString(msg)) alreadyWarned[msg] = new Date();
warn(i18n, code, msg, rest);
};
const loadedClb = (i18n, cb) => () => {
if (i18n.isInitialized) {
cb();
} else {
const initialized = () => {
setTimeout(() => {
i18n.off('initialized', initialized);
}, 0);
cb();
};
i18n.on('initialized', initialized);
}
};
exportnode_modules\react-i18next\dist\es\utils.js (Line 38:2 - Line 46:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 158:2 - Line 166:6)
const loadLanguages = (i18n, lng, ns, cb) => {
if (isString(ns)) ns = [ns];
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
ns.forEach(n => {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
i18n.loadLanguages(lng, loadedClb(i18n, cb));
};
exportnode_modules\react-i18next\dist\es\utils.js (Line 46:2 - Line 60:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 166:2 - Line 180:6)
const hasLoadedNamespace = (ns, i18n, options = {}) => {
if (!i18n.languages || !i18n.languages.length) {
warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
languages: i18n.languages
});
return true;
}
return i18n.hasLoadedNamespace(ns, {
lng: options.lng,
precheck: (i18nInstance, loadNotPending) => {
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
}
});
};
exportnode_modules\react-i18next\dist\es\useTranslation.js (Line 7:2 - Line 12:12), node_modules\react-i18next\dist\umd\react-i18next.js (Line 640:2 - Line 645:6)
value;
}, [value, ignore]);
return ref.current;
};
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
const useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallbacknode_modules\react-i18next\dist\es\useTranslation.js (Line 20:2 - Line 53:9), node_modules\react-i18next\dist\umd\react-i18next.js (Line 653:2 - Line 686:6)
useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');
const notReadyT = (k, optsOrDefaultValue) => {
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
const i18nOptions = {
...getDefaults(),
...i18n.options.react,
...props
};
const {
useSuspense,
keyPrefix
} = i18nOptions;
let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const getT = () => memoGetT;
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const [t, setT] = useStatenode_modules\react-i18next\dist\es\useTranslation.js (Line 58:3 - Line 89:10), node_modules\react-i18next\dist\umd\react-i18next.js (Line 691:2 - Line 722:6)
useEffect(() => {
const {
bindI18n,
bindI18nStore
} = i18nOptions;
isMounted.current = true;
if (!ready && !useSuspense) {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
} else {
loadNamespaces(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
if (bindI18n) i18n?.on(bindI18n, boundReset);
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
return () => {
isMounted.current = false;
if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
};
}, [i18n, joinedNS]);
useEffectnode_modules\react-i18next\dist\es\useTranslation.js (Line 89:3 - Line 107:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 722:2 - Line 740:2)
useEffect(() => {
if (isMounted.current && ready) {
setT(getT);
}
}, [i18n, keyPrefix, ready]);
const ret = [t, i18n, ready];
ret.t = t;
ret.i18n = i18n;
ret.ready = ready;
if (ready) return ret;
if (!ready && !useSuspense) return ret;
throw new Promise(resolve => {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => resolve());
} else {
loadNamespaces(i18n, namespaces, () => resolve());
}
});
};node_modules\react-i18next\dist\es\useSSR.js (Line 9:2 - Line 27:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 804:2 - Line 822:2)
useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n.options?.isClone) return;
if (initialI18nStore && !i18n.initializedStoreOnce) {
i18n.services.resourceStore.data = initialI18nStore;
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach(ns => {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};node_modules\react-i18next\dist\es\unescape.js (Line 1:1 - Line 25:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 184:2 - Line 208:6)
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
const htmlEntities = {
'&': '&',
'&': '&',
'<': '<',
'<': '<',
'>': '>',
'>': '>',
''': "'",
''': "'",
'"': '"',
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…',
'/': '/',
'/': '/'
};
const unescapeHtmlEntity = m => htmlEntities[m];
exportnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 5:20 - Line 17:15), node_modules\react-i18next\dist\umd\react-i18next.js (Line 232:13 - Line 245:6)
;
const hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
const getChildren = node => {
if (!node) return [];
const children = node.props?.children ?? node.children;
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
};
const hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 17:2 - Line 26:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 245:2 - Line 254:6)
isValidElement);
const getAsArray = data => Array.isArray(data) ? data : [data];
const mergeProps = (source, target) => {
const newTarget = {
...target
};
newTarget.props = Object.assign(source.props, target.props);
return newTarget;
};
exportnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 26:2 - Line 36:15), node_modules\react-i18next\dist\umd\react-i18next.js (Line 254:2 - Line 264:6)
const nodesToString = (children, i18nOptions, i18n, i18nKey) => {
if (!children) return '';
let stringNode = '';
const childrenArray = getAsArray(children);
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
childrenArray.forEach((child, childIndex) => {
if (isString(child)) {
stringNode += `${child}`;
return;
}
if (isValidElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 36:2 - Line 100:15), node_modules\react-i18next\dist\umd\react-i18next.js (Line 264:2 - Line 328:6)
isValidElement(child)) {
const {
props,
type
} = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
stringNode += `<${type}/>`;
return;
}
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
stringNode += `<${childIndex}></${childIndex}>`;
return;
}
if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
stringNode += `<${type}>${childChildren}</${type}>`;
return;
}
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {
i18nKey
});
return;
}
if (isObject(child)) {
const {
format,
...clone
} = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {
i18nKey,
child
});
return;
}
warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {
i18nKey,
child
});
});
return stringNode;
};
const renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {
if (targetString === '') return [];
const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);
if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];
const data = knownComponentsMap ?? {};
const getData = childs => {
const childrenArray = getAsArray(childs);
childrenArray.forEach(child => {
if (isString(child)) return;
if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 104:5 - Line 117:13), node_modules\react-i18next\dist\umd\react-i18next.js (Line 332:2 - Line 345:6)
.parse(`<0>${targetString}</0>`);
const opts = {
...data,
...combinedTOpts
};
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
};
const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {
if (child.dummy) {
child.children = inner;
mem.push(cloneElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 126:2 - Line 147:15), node_modules\react-i18next\dist\umd\react-i18next.js (Line 354:2 - Line 375:6)
createElement(c.type, {
...props,
key: i,
ref: c.props.ref ?? c.ref
}, isVoid ? null : inner);
}));
}
};
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i) => {
const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
if (node.type === 'tag') {
let tmp = reactNodes[parseInt(node.name, 10)];
if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
if (!tmp) tmp = {};
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
props: node.attrs
}, tmp) : tmp;
const isElement = isValidElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 147:2 - Line 166:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 375:2 - Line 394:6)
isValidElement(child);
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
if (isString(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (hasChildren(child) || isValidTranslationWithChildren) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (isEmptyTransWithHTML) {
const inner = mapAST(reactNodes, node.children, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (Number.isNaN(parseFloat(node.name))) {
if (isKnownComponent) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push(createElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 171:2 - Line 191:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 399:2 - Line 419:6)
createElement(node.name, {
key: `${node.name}-${i}`
}, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if (isObject(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
if (content) mem.push(content);
} else {
pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);
}
} else if (node.type === 'text') {
const wrapTextNodes = i18nOptions.transWrapTextNodes;
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
if (wrapTextNodes) {
mem.push(createElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 191:2 - Line 209:13), node_modules\react-i18next\dist\umd\react-i18next.js (Line 419:2 - Line 437:6)
createElement(wrapTextNodes, {
key: `${node.name}-${i}`
}, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
const result = mapAST([{
dummy: true,
children: children || []
}], ast, getAsArray(children || []));
return getChildren(result[0]);
};
const fixComponentProps = (component, index, translation) => {
const componentKey = component.key || index;
const comp = cloneElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 209:2 - Line 216:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 437:2 - Line 444:6)
cloneElement(component, {
key: componentKey
});
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
return comp;
}
function Componentized() {
return createElementnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 218:2 - Line 250:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 446:2 - Line 478:9)
createElement(Componentized, {
key: componentKey
});
};
const generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));
const generateObjectComponents = (components, translation) => {
const componentMap = {};
Object.keys(components).forEach(c => {
Object.assign(componentMap, {
[c]: fixComponentProps(components[c], c, translation)
});
});
return componentMap;
};
const generateComponents = (components, translation, i18n, i18nKey) => {
if (!components) return null;
if (Array.isArray(components)) {
return generateArrayComponents(components, translation);
}
if (isObject(components)) {
return generateObjectComponents(components, translation);
}
warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> "components" prop expects an object or array`, {
i18nKey
});
return null;
};
const isComponentsMap = object => {
if (!isObject(object)) return false;
if (Array.isArray(object)) return false;
return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);
};
exportnode_modules\react-i18next\dist\es\TransWithoutContext.js (Line 250:6 - Line 320:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 478:8 - Line 548:6)
({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18n();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {
i18nKey
});
return children;
}
const t = tFromProps || i18n.t.bind(i18n) || (k => k);
const reactI18nextOptions = {
...getDefaults(),
...i18n.options?.react
};
let namespaces = ns || t.ns || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const {
hashTransKey
} = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
values = values && Object.keys(values).length > 0 ? {
...values,
...i18n.options.interpolation.defaultVariables
} : {
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
interpolation: {
...tOptions.interpolation,
prefix: '#$?',
suffix: '?$#'
}
};
const combinedTOpts = {
...tOptions,
context: context || tOptions.context,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces
};
const translation = key ? t(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
return useAsParent ? createElementnode_modules\react-i18next\dist\es\Translation.js (Line 2:2 - Line 12:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 772:2 - Line 782:2)
const Translation = ({
ns,
children,
...options
}) => {
const [t, i18n, ready] = useTranslation(ns, options);
return children(t, {
i18n,
lng: i18n.language
}, ready);
};node_modules\react-i18next\dist\es\Trans.js (Line 5:2 - Line 24:11), node_modules\react-i18next\dist\umd\react-i18next.js (Line 597:2 - Line 616:6)
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = useContextnode_modules\react-i18next\dist\es\Trans.js (Line 27:20 - Line 43:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 619:8 - Line 635:2)
({
children,
count,
parent,
i18nKey,
context,
tOptions,
values,
defaults,
components,
ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
i18n,
t: tFromProps,
shouldUnescape,
...additionalProps
});
}node_modules\react-i18next\dist\es\context.js (Line 7:2 - Line 20:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 560:2 - Line 573:6)
class ReportNamespaces {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach(ns => {
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
exportnode_modules\react-i18next\dist\es\context.js (Line 28:2 - Line 42:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 581:2 - Line 595:2)
const getInitialProps = () => {
const i18n = getI18n();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach(l => {
initialI18nStore[l] = {};
namespaces.forEach(ns => {
initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
});
});
ret.initialI18nStore = initialI18nStore;
ret.initialLanguage = i18n.language;
return ret;
};node_modules\react-i18next\dist\commonjs\withTranslation.js (Line 15:2 - Line 30:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 747:15 - Line 762:6)
(ns, {
...rest,
keyPrefix: options.keyPrefix
});
const passDownProps = {
...rest,
t,
i18n,
tReady: ready
};
if (options.withRef && forwardedRef) {
passDownProps.ref = forwardedRef;
} else if (!options.withRef && forwardedRef) {
passDownProps.forwardedRef = forwardedRef;
}
return (node_modules\react-i18next\dist\commonjs\utils.js (Line 6:2 - Line 22:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 119:2 - Line 136:6)
;
const warn = (i18n, code, msg, rest) => {
const args = [msg, {
code,
...(rest || {})
}];
if (i18n?.services?.logger?.forward) {
return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
exportsnode_modules\react-i18next\dist\commonjs\utils.js (Line 22:5 - Line 29:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 135:2 - Line 142:6)
;
const alreadyWarned = {};
const warnOnce = (i18n, code, msg, rest) => {
if (isString(msg) && alreadyWarned[msg]) return;
if (isString(msg)) alreadyWarned[msg] = new Date();
warn(i18n, code, msg, rest);
};
exportsnode_modules\react-i18next\dist\commonjs\utils.js (Line 29:9 - Line 46:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 141:2 - Line 158:6)
;
const loadedClb = (i18n, cb) => () => {
if (i18n.isInitialized) {
cb();
} else {
const initialized = () => {
setTimeout(() => {
i18n.off('initialized', initialized);
}, 0);
cb();
};
i18n.on('initialized', initialized);
}
};
const loadNamespaces = (i18n, ns, cb) => {
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
};
exportsnode_modules\react-i18next\dist\commonjs\utils.js (Line 46:15 - Line 55:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 157:2 - Line 166:6)
;
const loadLanguages = (i18n, lng, ns, cb) => {
if (isString(ns)) ns = [ns];
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
ns.forEach(n => {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
i18n.loadLanguages(lng, loadedClb(i18n, cb));
};
exportsnode_modules\react-i18next\dist\commonjs\utils.js (Line 55:14 - Line 70:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 165:2 - Line 180:6)
;
const hasLoadedNamespace = (ns, i18n, options = {}) => {
if (!i18n.languages || !i18n.languages.length) {
warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
languages: i18n.languages
});
return true;
}
return i18n.hasLoadedNamespace(ns, {
lng: options.lng,
precheck: (i18nInstance, loadNotPending) => {
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
}
});
};
exportsnode_modules\react-i18next\dist\commonjs\useTranslation.js (Line 12:2 - Line 18:2), node_modules\react-i18next\dist\es\useTranslation.js (Line 6:10 - Line 645:6)
(() => {
ref.current = ignore ? ref.current : value;
}, [value, ignore]);
return ref.current;
};
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
const useMemoizedT = (i18n, language, namespace, keyPrefix) => (node_modules\react-i18next\dist\commonjs\useTranslation.js (Line 18:2 - Line 26:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 645:12 - Line 653:6)
(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
const useTranslation = (ns, props = {}) => {
const {
i18n: i18nFromProps
} = props;
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = (node_modules\react-i18next\dist\commonjs\useTranslation.js (Line 33:2 - Line 42:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 660:9 - Line 669:9)
(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait) (node_modules\react-i18next\dist\commonjs\useTranslation.js (Line 76:2 - Line 95:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 703:15 - Line 722:6)
(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
if (bindI18n) i18n?.on(bindI18n, boundReset);
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
return () => {
isMounted.current = false;
if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
};
}, [i18n, joinedNS]);
(node_modules\react-i18next\dist\commonjs\useTranslation.js (Line 95:2 - Line 108:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 722:10 - Line 735:14)
(() => {
if (isMounted.current && ready) {
setT(getT);
}
}, [i18n, keyPrefix, ready]);
const ret = [t, i18n, ready];
ret.t = t;
ret.i18n = i18n;
ret.ready = ready;
if (ready) return ret;
if (!ready && !useSuspense) return ret;
throw new Promise(resolve => {
if (props.lng) {
(node_modules\react-i18next\dist\commonjs\useSSR.js (Line 16:2 - Line 34:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 805:8 - Line 824:6)
();
if (i18n.options?.isClone) return;
if (initialI18nStore && !i18n.initializedStoreOnce) {
i18n.services.resourceStore.data = initialI18nStore;
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach(ns => {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};
exportsnode_modules\react-i18next\dist\commonjs\unescape.js (Line 6:2 - Line 32:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 182:5 - Line 210:4)
;
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
const htmlEntities = {
'&': '&',
'&': '&',
'<': '<',
'<': '<',
'>': '>',
'>': '>',
''': "'",
''': "'",
'"': '"',
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…',
'/': '/',
'/': '/'
};
const unescapeHtmlEntity = m => htmlEntities[m];
const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);
exportsnode_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 13:2 - Line 25:7), node_modules\react-i18next\dist\umd\react-i18next.js (Line 232:13 - Line 245:6)
;
const hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
const getChildren = node => {
if (!node) return [];
const children = node.props?.children ?? node.children;
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
};
const hasValidReactChildren = children => Array.isArray(children) && children.every(_reactnode_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 25:7 - Line 40:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 245:6 - Line 260:9)
.isValidElement);
const getAsArray = data => Array.isArray(data) ? data : [data];
const mergeProps = (source, target) => {
const newTarget = {
...target
};
newTarget.props = Object.assign(source.props, target.props);
return newTarget;
};
const nodesToString = (children, i18nOptions, i18n, i18nKey) => {
if (!children) return '';
let stringNode = '';
const childrenArray = getAsArray(children);
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
childrenArray.forEach((child, childIndex) => {
if ((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 44:2 - Line 60:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 264:15 - Line 280:9)
(child)) {
const {
props,
type
} = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
stringNode += `<${type}/>`;
return;
}
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
stringNode += `<${childIndex}></${childIndex}>`;
return;
}
if (shouldKeepChild && childPropsCount === 1 && (node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 60:2 - Line 69:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 280:9 - Line 289:5)
(childChildren)) {
stringNode += `<${type}>${childChildren}</${type}>`;
return;
}
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
(node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 74:2 - Line 85:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 294:9 - Line 305:5)
(child)) {
const {
format,
...clone
} = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
(node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 98:14 - Line 108:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 317:2 - Line 327:9)
;
const renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {
if (targetString === '') return [];
const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);
if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];
const data = knownComponentsMap ?? {};
const getData = childs => {
const childrenArray = getAsArray(childs);
childrenArray.forEach(child => {
if ((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 113:8 - Line 126:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 332:2 - Line 345:6)
.parse(`<0>${targetString}</0>`);
const opts = {
...data,
...combinedTOpts
};
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
};
const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {
if (child.dummy) {
child.children = inner;
mem.push((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 135:2 - Line 156:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 354:14 - Line 375:6)
(c.type, {
...props,
key: i,
ref: c.props.ref ?? c.ref
}, isVoid ? null : inner);
}));
}
};
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i) => {
const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
if (node.type === 'tag') {
let tmp = reactNodes[parseInt(node.name, 10)];
if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
if (!tmp) tmp = {};
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
props: node.attrs
}, tmp) : tmp;
const isElement = (node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 160:2 - Line 175:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 379:9 - Line 394:6)
(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (hasChildren(child) || isValidTranslationWithChildren) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (isEmptyTransWithHTML) {
const inner = mapAST(reactNodes, node.children, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (Number.isNaN(parseFloat(node.name))) {
if (isKnownComponent) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 180:2 - Line 190:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 399:14 - Line 409:9)
(node.name, {
key: `${node.name}-${i}`
}, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if ((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 190:2 - Line 200:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 409:9 - Line 419:6)
(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
if (content) mem.push(content);
} else {
pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);
}
} else if (node.type === 'text') {
const wrapTextNodes = i18nOptions.transWrapTextNodes;
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
if (wrapTextNodes) {
mem.push((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 200:2 - Line 218:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 419:14 - Line 437:6)
(wrapTextNodes, {
key: `${node.name}-${i}`
}, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
const result = mapAST([{
dummy: true,
children: children || []
}], ast, getAsArray(children || []));
return getChildren(result[0]);
};
const fixComponentProps = (component, index, translation) => {
const componentKey = component.key || index;
const comp = (node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 218:2 - Line 225:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 437:13 - Line 444:6)
(component, {
key: componentKey
});
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
return comp;
}
function Componentized() {
return (node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 227:2 - Line 246:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 446:14 - Line 465:9)
(Componentized, {
key: componentKey
});
};
const generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));
const generateObjectComponents = (components, translation) => {
const componentMap = {};
Object.keys(components).forEach(c => {
Object.assign(componentMap, {
[c]: fixComponentProps(components[c], c, translation)
});
});
return componentMap;
};
const generateComponents = (components, translation, i18n, i18nKey) => {
if (!components) return null;
if (Array.isArray(components)) {
return generateArrayComponents(components, translation);
}
if ((node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 288:2 - Line 329:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 507:9 - Line 548:6)
(namespaces) ? [namespaces] : namespaces || ['translation'];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const {
hashTransKey
} = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
values = values && Object.keys(values).length > 0 ? {
...values,
...i18n.options.interpolation.defaultVariables
} : {
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
interpolation: {
...tOptions.interpolation,
prefix: '#$?',
suffix: '?$#'
}
};
const combinedTOpts = {
...tOptions,
context: context || tOptions.context,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces
};
const translation = key ? t(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
return useAsParent ? (node_modules\react-i18next\dist\commonjs\Trans.js (Line 15:2 - Line 35:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 595:2 - Line 616:6)
;
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = (node_modules\react-i18next\dist\commonjs\Trans.js (Line 38:2 - Line 54:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 619:8 - Line 635:2)
({
children,
count,
parent,
i18nKey,
context,
tOptions,
values,
defaults,
components,
ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
i18n,
t: tFromProps,
shouldUnescape,
...additionalProps
});
}node_modules\react-i18next\dist\commonjs\context.js (Line 6:2 - Line 19:8), node_modules\react-i18next\dist\commonjs\index.js (Line 42:2 - Line 55:7)
= void 0;
Object.defineProperty(exports, "getDefaults", {
enumerable: true,
get: function () {
return _defaults.getDefaults;
}
});
Object.defineProperty(exports, "getI18n", {
enumerable: true,
get: function () {
return _i18nInstance.getI18n;
}
});
exportsnode_modules\react-i18next\dist\commonjs\context.js (Line 25:2 - Line 38:4), node_modules\react-i18next\dist\commonjs\index.js (Line 67:2 - Line 80:8)
;
Object.defineProperty(exports, "setDefaults", {
enumerable: true,
get: function () {
return _defaults.setDefaults;
}
});
Object.defineProperty(exports, "setI18n", {
enumerable: true,
get: function () {
return _i18nInstance.setI18n;
}
});
varnode_modules\react-i18next\dist\commonjs\context.js (Line 42:2 - Line 56:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 559:14 - Line 573:6)
();
class ReportNamespaces {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach(ns => {
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
exportsnode_modules\react-i18next\dist\commonjs\context.js (Line 67:2 - Line 81:8), node_modules\react-i18next\dist\umd\react-i18next.js (Line 582:8 - Line 597:9)
();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach(l => {
initialI18nStore[l] = {};
namespaces.forEach(ns => {
initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
});
});
ret.initialI18nStore = initialI18nStore;
ret.initialLanguage = i18n.language;
return ret;
};
exportsnode_modules\react-i18next\dist\amd\react-i18next.js (Line 1:2 - Line 867:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 5:5 - Line 871:2)
, (function (exports, react) { 'use strict';
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
var voidElements = {
"area": true,
"base": true,
"br": true,
"col": true,
"embed": true,
"hr": true,
"img": true,
"input": true,
"link": true,
"meta": true,
"param": true,
"source": true,
"track": true,
"wbr": true
};
var e = /*@__PURE__*/getDefaultExportFromCjs(voidElements);
var t = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
function n(n) {
var r = {
type: "tag",
name: "",
voidElement: false,
attrs: {},
children: []
},
i = n.match(/<\/?([^\s]+?)[/\s>]/);
if (i && (r.name = i[1], (e[i[1]] || "/" === n.charAt(n.length - 2)) && (r.voidElement = true), r.name.startsWith("!--"))) {
var s = n.indexOf("--\x3e");
return {
type: "comment",
comment: -1 !== s ? n.slice(4, s) : ""
};
}
for (var a = new RegExp(t), c = null; null !== (c = a.exec(n));) if (c[0].trim()) if (c[1]) {
var o = c[1].trim(),
l = [o, ""];
o.indexOf("=") > -1 && (l = o.split("=")), r.attrs[l[0]] = l[1], a.lastIndex--;
} else c[2] && (r.attrs[c[2]] = c[3].trim().substring(1, c[3].length - 1));
return r;
}
var r = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,
i = /^\s*$/,
s = Object.create(null);
function a(e, t) {
switch (t.type) {
case "text":
return e + t.content;
case "tag":
return e += "<" + t.name + (t.attrs ? function (e) {
var t = [];
for (var n in e) t.push(n + '="' + e[n] + '"');
return t.length ? " " + t.join(" ") : "";
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(a, "") + "</" + t.name + ">";
case "comment":
return e + "\x3c!--" + t.comment + "--\x3e";
}
}
var c = {
parse: function (e, t) {
t || (t = {}), t.components || (t.components = s);
var a,
c = [],
o = [],
l = -1,
m = false;
if (0 !== e.indexOf("<")) {
var u = e.indexOf("<");
c.push({
type: "text",
content: -1 === u ? e : e.substring(0, u)
});
}
return e.replace(r, function (r, s) {
if (m) {
if (r !== "</" + a.name + ">") return;
m = false;
}
var u,
f = "/" !== r.charAt(1),
h = r.startsWith("\x3c!--"),
p = s + r.length,
d = e.charAt(p);
if (h) {
var v = n(r);
return l < 0 ? (c.push(v), c) : ((u = o[l]).children.push(v), c);
}
if (f && (l++, "tag" === (a = n(r)).type && t.components[a.name] && (a.type = "component", m = true), a.voidElement || m || !d || "<" === d || a.children.push({
type: "text",
content: e.slice(p, e.indexOf("<", p))
}), 0 === l && c.push(a), (u = o[l - 1]) && u.children.push(a), o[l] = a), (!f || a.voidElement) && (l > -1 && (a.voidElement || a.name === r.slice(2, -1)) && (l--, a = -1 === l ? c : o[l]), !m && "<" !== d && d)) {
u = -1 === l ? c : o[l].children;
var x = e.indexOf("<", p),
g = e.slice(p, -1 === x ? void 0 : x);
i.test(g) && (g = " "), (x > -1 && l + u.length >= 0 || " " !== g) && u.push({
type: "text",
content: g
});
}
}), c;
},
stringify: function (e) {
return e.reduce(function (e, t) {
return e + a("", t);
}, "");
}
};
const warn = (i18n, code, msg, rest) => {
const args = [msg, {
code,
...(rest || {})
}];
if (i18n?.services?.logger?.forward) {
return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
const alreadyWarned = {};
const warnOnce = (i18n, code, msg, rest) => {
if (isString(msg) && alreadyWarned[msg]) return;
if (isString(msg)) alreadyWarned[msg] = new Date();
warn(i18n, code, msg, rest);
};
const loadedClb = (i18n, cb) => () => {
if (i18n.isInitialized) {
cb();
} else {
const initialized = () => {
setTimeout(() => {
i18n.off('initialized', initialized);
}, 0);
cb();
};
i18n.on('initialized', initialized);
}
};
const loadNamespaces = (i18n, ns, cb) => {
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
};
const loadLanguages = (i18n, lng, ns, cb) => {
if (isString(ns)) ns = [ns];
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
ns.forEach(n => {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
i18n.loadLanguages(lng, loadedClb(i18n, cb));
};
const hasLoadedNamespace = (ns, i18n, options = {}) => {
if (!i18n.languages || !i18n.languages.length) {
warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
languages: i18n.languages
});
return true;
}
return i18n.hasLoadedNamespace(ns, {
lng: options.lng,
precheck: (i18nInstance, loadNotPending) => {
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
}
});
};
const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');
const isString = obj => typeof obj === 'string';
const isObject = obj => typeof obj === 'object' && obj !== null;
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
const htmlEntities = {
'&': '&',
'&': '&',
'<': '<',
'<': '<',
'>': '>',
'>': '>',
''': "'",
''': "'",
'"': '"',
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…',
'/': '/',
'/': '/'
};
const unescapeHtmlEntity = m => htmlEntities[m];
const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);
let defaultOptions = {
bindI18n: 'languageChanged',
bindI18nStore: '',
transEmptyNodeValue: '',
transSupportBasicHtmlNodes: true,
transWrapTextNodes: '',
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
useSuspense: true,
unescape
};
const setDefaults = (options = {}) => {
defaultOptions = {
...defaultOptions,
...options
};
};
const getDefaults = () => defaultOptions;
let i18nInstance;
const setI18n = instance => {
i18nInstance = instance;
};
const getI18n = () => i18nInstance;
const hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
const getChildren = node => {
if (!node) return [];
const children = node.props?.children ?? node.children;
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
};
const hasValidReactChildren = children => Array.isArray(children) && children.every(react.isValidElement);
const getAsArray = data => Array.isArray(data) ? data : [data];
const mergeProps = (source, target) => {
const newTarget = {
...target
};
newTarget.props = Object.assign(source.props, target.props);
return newTarget;
};
const nodesToString = (children, i18nOptions, i18n, i18nKey) => {
if (!children) return '';
let stringNode = '';
const childrenArray = getAsArray(children);
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
childrenArray.forEach((child, childIndex) => {
if (isString(child)) {
stringNode += `${child}`;
return;
}
if (react.isValidElement(child)) {
const {
props,
type
} = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
stringNode += `<${type}/>`;
return;
}
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
stringNode += `<${childIndex}></${childIndex}>`;
return;
}
if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
stringNode += `<${type}>${childChildren}</${type}>`;
return;
}
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {
i18nKey
});
return;
}
if (isObject(child)) {
const {
format,
...clone
} = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {
i18nKey,
child
});
return;
}
warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {
i18nKey,
child
});
});
return stringNode;
};
const renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {
if (targetString === '') return [];
const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);
if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];
const data = knownComponentsMap ?? {};
const getData = childs => {
const childrenArray = getAsArray(childs);
childrenArray.forEach(child => {
if (isString(child)) return;
if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !react.isValidElement(child)) Object.assign(data, child);
});
};
getData(children);
const ast = c.parse(`<0>${targetString}</0>`);
const opts = {
...data,
...combinedTOpts
};
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
};
const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {
if (child.dummy) {
child.children = inner;
mem.push(react.cloneElement(child, {
key: i
}, isVoid ? undefined : inner));
} else {
mem.push(...react.Children.map([child], c => {
const props = {
...c.props
};
delete props.i18nIsDynamicList;
return react.createElement(c.type, {
...props,
key: i,
ref: c.props.ref ?? c.ref
}, isVoid ? null : inner);
}));
}
};
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i) => {
const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
if (node.type === 'tag') {
let tmp = reactNodes[parseInt(node.name, 10)];
if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
if (!tmp) tmp = {};
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
props: node.attrs
}, tmp) : tmp;
const isElement = react.isValidElement(child);
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
if (isString(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (hasChildren(child) || isValidTranslationWithChildren) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (isEmptyTransWithHTML) {
const inner = mapAST(reactNodes, node.children, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (Number.isNaN(parseFloat(node.name))) {
if (isKnownComponent) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push(react.createElement(node.name, {
key: `${node.name}-${i}`
}));
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(react.createElement(node.name, {
key: `${node.name}-${i}`
}, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if (isObject(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
if (content) mem.push(content);
} else {
pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);
}
} else if (node.type === 'text') {
const wrapTextNodes = i18nOptions.transWrapTextNodes;
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
if (wrapTextNodes) {
mem.push(react.createElement(wrapTextNodes, {
key: `${node.name}-${i}`
}, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
const result = mapAST([{
dummy: true,
children: children || []
}], ast, getAsArray(children || []));
return getChildren(result[0]);
};
const fixComponentProps = (component, index, translation) => {
const componentKey = component.key || index;
const comp = react.cloneElement(component, {
key: componentKey
});
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
return comp;
}
function Componentized() {
return react.createElement(react.Fragment, null, comp);
}
return react.createElement(Componentized, {
key: componentKey
});
};
const generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));
const generateObjectComponents = (components, translation) => {
const componentMap = {};
Object.keys(components).forEach(c => {
Object.assign(componentMap, {
[c]: fixComponentProps(components[c], c, translation)
});
});
return componentMap;
};
const generateComponents = (components, translation, i18n, i18nKey) => {
if (!components) return null;
if (Array.isArray(components)) {
return generateArrayComponents(components, translation);
}
if (isObject(components)) {
return generateObjectComponents(components, translation);
}
warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> "components" prop expects an object or array`, {
i18nKey
});
return null;
};
const isComponentsMap = object => {
if (!isObject(object)) return false;
if (Array.isArray(object)) return false;
return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);
};
function Trans$1({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18n();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {
i18nKey
});
return children;
}
const t = tFromProps || i18n.t.bind(i18n) || (k => k);
const reactI18nextOptions = {
...getDefaults(),
...i18n.options?.react
};
let namespaces = ns || t.ns || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const {
hashTransKey
} = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
values = values && Object.keys(values).length > 0 ? {
...values,
...i18n.options.interpolation.defaultVariables
} : {
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
interpolation: {
...tOptions.interpolation,
prefix: '#$?',
suffix: '?$#'
}
};
const combinedTOpts = {
...tOptions,
context: context || tOptions.context,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces
};
const translation = key ? t(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
return useAsParent ? react.createElement(useAsParent, additionalProps, content) : content;
}
const initReactI18next = {
type: '3rdParty',
init(instance) {
setDefaults(instance.options.react);
setI18n(instance);
}
};
const I18nContext = react.createContext();
class ReportNamespaces {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach(ns => {
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
const composeInitialProps = ForComponent => async ctx => {
const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};
const i18nInitialProps = getInitialProps();
return {
...componentsInitialProps,
...i18nInitialProps
};
};
const getInitialProps = () => {
const i18n = getI18n();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach(l => {
initialI18nStore[l] = {};
namespaces.forEach(ns => {
initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
});
});
ret.initialI18nStore = initialI18nStore;
ret.initialLanguage = i18n.language;
return ret;
};
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
const t = tFromProps || i18n?.t.bind(i18n);
return Trans$1({
children,
count,
parent,
i18nKey,
context,
tOptions,
values,
defaults,
components,
ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
i18n,
t: tFromProps,
shouldUnescape,
...additionalProps
});
}
const usePrevious = (value, ignore) => {
const ref = react.useRef();
react.useEffect(() => {
ref.current = value;
}, [value, ignore]);
return ref.current;
};
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
const useMemoizedT = (i18n, language, namespace, keyPrefix) => react.useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
const useTranslation = (ns, props = {}) => {
const {
i18n: i18nFromProps
} = props;
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');
const notReadyT = (k, optsOrDefaultValue) => {
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
const i18nOptions = {
...getDefaults(),
...i18n.options.react,
...props
};
const {
useSuspense,
keyPrefix
} = i18nOptions;
let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const getT = () => memoGetT;
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const [t, setT] = react.useState(getT);
let joinedNS = namespaces.join();
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
const previousJoinedNS = usePrevious(joinedNS);
const isMounted = react.useRef(true);
react.useEffect(() => {
const {
bindI18n,
bindI18nStore
} = i18nOptions;
isMounted.current = true;
if (!ready && !useSuspense) {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
} else {
loadNamespaces(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
if (bindI18n) i18n?.on(bindI18n, boundReset);
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
return () => {
isMounted.current = false;
if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
};
}, [i18n, joinedNS]);
react.useEffect(() => {
if (isMounted.current && ready) {
setT(getT);
}
}, [i18n, keyPrefix, ready]);
const ret = [t, i18n, ready];
ret.t = t;
ret.i18n = i18n;
ret.ready = ready;
if (ready) return ret;
if (!ready && !useSuspense) return ret;
throw new Promise(resolve => {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => resolve());
} else {
loadNamespaces(i18n, namespaces, () => resolve());
}
});
};
const withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {
function I18nextWithTranslation({
forwardedRef,
...rest
}) {
const [t, i18n, ready] = useTranslation(ns, {
...rest,
keyPrefix: options.keyPrefix
});
const passDownProps = {
...rest,
t,
i18n,
tReady: ready
};
if (options.withRef && forwardedRef) {
passDownProps.ref = forwardedRef;
} else if (!options.withRef && forwardedRef) {
passDownProps.forwardedRef = forwardedRef;
}
return react.createElement(WrappedComponent, passDownProps);
}
I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;
I18nextWithTranslation.WrappedComponent = WrappedComponent;
const forwardRef = (props, ref) => react.createElement(I18nextWithTranslation, Object.assign({}, props, {
forwardedRef: ref
}));
return options.withRef ? react.forwardRef(forwardRef) : I18nextWithTranslation;
};
const Translation = ({
ns,
children,
...options
}) => {
const [t, i18n, ready] = useTranslation(ns, options);
return children(t, {
i18n,
lng: i18n.language
}, ready);
};
function I18nextProvider({
i18n,
defaultNS,
children
}) {
const value = react.useMemo(() => ({
i18n,
defaultNS
}), [i18n, defaultNS]);
return react.createElement(I18nContext.Provider, {
value
}, children);
}
const useSSR = (initialI18nStore, initialLanguage, props = {}) => {
const {
i18n: i18nFromProps
} = props;
const {
i18n: i18nFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n.options?.isClone) return;
if (initialI18nStore && !i18n.initializedStoreOnce) {
i18n.services.resourceStore.data = initialI18nStore;
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach(ns => {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};
const withSSR = () => function Extend(WrappedComponent) {
function I18nextWithSSR({
initialI18nStore,
initialLanguage,
...rest
}) {
useSSR(initialI18nStore, initialLanguage);
return react.createElement(WrappedComponent, {
...rest
});
}
I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);
I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;
I18nextWithSSR.WrappedComponent = WrappedComponent;
return I18nextWithSSR;
};
const date = () => '';
const time = () => '';
const number = () => '';
const select = () => '';
const plural = () => '';
const selectOrdinal = () => '';
exports.I18nContext = I18nContext;
exports.I18nextProvider = I18nextProvider;
exports.Trans = Trans;
exports.TransWithoutContext = Trans$1;
exports.Translation = Translation;
exports.composeInitialProps = composeInitialProps;
exports.date = date;
exports.getDefaults = getDefaults;
exports.getI18n = getI18n;
exports.getInitialProps = getInitialProps;
exports.initReactI18next = initReactI18next;
exports.number = number;
exports.plural = plural;
exports.select = select;
exports.selectOrdinal = selectOrdinal;
exports.setDefaults = setDefaults;
exports.setI18n = setI18n;
exports.time = time;
exports.useSSR = useSSR;
exports.useTranslation = useTranslation;
exports.withSSR = withSSR;
exports.withTranslation = withTranslation;
}));node_modules\rc-util\es\utils\set.js (Line 10:9 - Line 17:19), node_modules\rc-util\lib\utils\set.js (Line 18:2 - Line 25:2)
(paths),
path = _paths[0],
restPath = _paths.slice(1);
var clone;
if (!entity && typeof path === 'number') {
clone = [];
} else if (Array.isArray(entity)) {
clone = _toConsumableArraynode_modules\rc-util\es\utils\set.js (Line 19:14 - Line 30:7), node_modules\rc-util\lib\utils\set.js (Line 27:2 - Line 38:9)
({}, entity);
}
// Delete prop if `removeIfUndefined` and value is undefined
if (removeIfUndefined && value === undefined && restPath.length === 1) {
delete clone[path][restPath[0]];
} else {
clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
}
return clone;
}
exportnode_modules\rc-util\es\utils\set.js (Line 39:8 - Line 49:7), node_modules\rc-util\lib\utils\set.js (Line 47:2 - Line 57:9)
(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
}
function createEmpty(source) {
return Array.isArray(source) ? [] : {};
}
var keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;
/**
* Merge objects which will create
*/
exportnode_modules\rc-util\es\utils\set.js (Line 49:2 - Line 57:4), node_modules\rc-util\lib\utils\set.js (Line 57:1 - Line 65:2)
function merge() {
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
sources[_key] = arguments[_key];
}
var clone = createEmpty(sources[0]);
sources.forEach(function (src) {
function internalMerge(path, parentLoopSet) {
var loopSet = new Set(parentLoopSet);
var value = getnode_modules\rc-util\es\utils\get.js (Line 1:2 - Line 10:2), node_modules\rc-util\lib\utils\get.js (Line 7:1 - Line 16:2)
function get(entity, path) {
var current = entity;
for (var i = 0; i < path.length; i += 1) {
if (current === null || current === undefined) {
return undefined;
}
current = current[path[i]];
}
return current;
}node_modules\rc-util\es\test\domHook.js (Line 7:2 - Line 24:14), node_modules\rc-util\lib\test\domHook.js (Line 15:1 - Line 32:2)
function spyElementPrototypes(elementClass, properties) {
var propNames = Object.keys(properties);
var originDescriptors = {};
propNames.forEach(function (propName) {
var originDescriptor = Object.getOwnPropertyDescriptor(elementClass.prototype, propName);
originDescriptors[propName] = originDescriptor || NO_EXIST;
var spyProp = properties[propName];
if (typeof spyProp === 'function') {
// If is a function
elementClass.prototype[propName] = function spyFunc() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return spyProp.call.apply(spyProp, [this, originDescriptor].concat(args));
};
} else {
// Otherwise tread as a property
Object.defineProperty(elementClass.prototype, propName, _objectSpreadnode_modules\rc-util\es\test\domHook.js (Line 24:14 - Line 56:7), node_modules\rc-util\lib\test\domHook.js (Line 32:2 - Line 64:9)
({}, spyProp), {}, {
set: function set(value) {
if (spyProp.set) {
return spyProp.set.call(this, originDescriptor, value);
}
return originDescriptor.set(value);
},
get: function get() {
if (spyProp.get) {
return spyProp.get.call(this, originDescriptor);
}
return originDescriptor.get();
},
configurable: true
}));
}
});
return {
mockRestore: function mockRestore() {
propNames.forEach(function (propName) {
var originDescriptor = originDescriptors[propName];
if (originDescriptor === NO_EXIST) {
delete elementClass.prototype[propName];
} else if (typeof originDescriptor === 'function') {
elementClass.prototype[propName] = originDescriptor;
} else {
Object.defineProperty(elementClass.prototype, propName, originDescriptor);
}
});
}
};
}
exportnode_modules\rc-util\es\React\render.js (Line 7:14 - Line 22:8), node_modules\rc-util\lib\React\render.js (Line 18:2 - Line 33:2)
({}, ReactDOM);
var version = fullClone.version,
reactRender = fullClone.render,
unmountComponentAtNode = fullClone.unmountComponentAtNode;
var createRoot;
try {
var mainVersion = Number((version || '').split('.')[0]);
if (mainVersion >= 18) {
createRoot = fullClone.createRoot;
}
} catch (e) {
// Do nothing;
}
function toggleWarning(skip) {
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeofnode_modules\rc-util\es\React\render.js (Line 22:8 - Line 42:7), node_modules\rc-util\lib\React\render.js (Line 33:2 - Line 53:9)
(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
}
}
var MARK = '__rc_react_root__';
// ========================== Render ==========================
function modernRender(node, container) {
toggleWarning(true);
var root = container[MARK] || createRoot(container);
toggleWarning(false);
root.render(node);
container[MARK] = root;
}
function legacyRender(node, container) {
reactRender === null || reactRender === void 0 || reactRender(node, container);
}
/** @private Test usage. Not work in prod */
exportnode_modules\rc-util\es\React\render.js (Line 47:2 - Line 60:18), node_modules\rc-util\lib\React\render.js (Line 58:1 - Line 71:2)
function render(node, container) {
if (createRoot) {
modernRender(node, container);
return;
}
legacyRender(node, container);
}
// ========================= Unmount ==========================
function modernUnmount(_x) {
return _modernUnmount.apply(this, arguments);
}
function _modernUnmount() {
_modernUnmount = _asyncToGeneratornode_modules\rc-util\es\React\render.js (Line 61:20 - Line 82:7), node_modules\rc-util\lib\React\render.js (Line 72:2 - Line 93:9)
().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Promise.resolve().then(function () {
var _container$MARK;
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();
delete container[MARK];
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _modernUnmount.apply(this, arguments);
}
function legacyUnmount(container) {
unmountComponentAtNode(container);
}
/** @private Test usage. Not work in prod */
exportnode_modules\rc-util\es\React\render.js (Line 92:20 - Line 109:2), node_modules\rc-util\lib\React\render.js (Line 103:2 - Line 120:2)
().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(createRoot !== undefined)) {
_context2.next = 2;
break;
}
return _context2.abrupt("return", modernUnmount(container));
case 2:
legacyUnmount(container);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _unmount.apply(this, arguments);
}node_modules\rc-util\es\hooks\useState.js (Line 11:15 - Line 27:2), node_modules\rc-util\lib\hooks\useState.js (Line 19:2 - Line 35:2)
(_React$useState, 2),
value = _React$useState2[0],
setValue = _React$useState2[1];
React.useEffect(function () {
destroyRef.current = false;
return function () {
destroyRef.current = true;
};
}, []);
function safeSetState(updater, ignoreDestroy) {
if (ignoreDestroy && destroyRef.current) {
return;
}
setValue(updater);
}
return [value, safeSetState];
}node_modules\rc-util\es\hooks\useMergedState.js (Line 22:9 - Line 31:15), node_modules\rc-util\lib\hooks\useMergedState.js (Line 29:2 - Line 38:2)
(function () {
if (hasValue(value)) {
return value;
} else if (hasValue(defaultValue)) {
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
} else {
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
}
}),
_useState2 = _slicedToArraynode_modules\rc-util\es\hooks\useMemo.js (Line 2:2 - Line 9:2), node_modules\rc-util\lib\hooks\useMemo.js (Line 9:1 - Line 16:2)
function useMemo(getValue, condition, shouldUpdate) {
var cacheRef = React.useRef({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}node_modules\rc-util\es\hooks\useLayoutEffect.js (Line 7:10 - Line 22:7), node_modules\rc-util\lib\hooks\useLayoutEffect.js (Line 14:2 - Line 29:4)
() ? React.useLayoutEffect : React.useEffect;
var useLayoutEffect = function useLayoutEffect(callback, deps) {
var firstMountRef = React.useRef(true);
useInternalLayoutEffect(function () {
return callback(firstMountRef.current);
}, deps);
// We tell react that first mount has passed
useInternalLayoutEffect(function () {
firstMountRef.current = false;
return function () {
firstMountRef.current = true;
};
}, []);
};
exportnode_modules\rc-util\es\hooks\useId.js (Line 18:2 - Line 38:15), node_modules\rc-util\lib\hooks\useId.js (Line 27:2 - Line 47:2)
useOriginId ?
// Use React `useId`
function useId(id) {
var reactId = useOriginId();
// Developer passed id is single source of truth
if (id) {
return id;
}
// Test env always return mock id
if (process.env.NODE_ENV === 'test') {
return 'test-id';
}
return reactId;
} :
// Use compatible of `useId`
function useCompatId(id) {
// Inner id for accessibility usage. Only work in client side
var _React$useState = React.useState('ssr-id'),
_React$useState2 = _slicedToArraynode_modules\rc-util\es\hooks\useId.js (Line 38:15 - Line 59:2), node_modules\rc-util\lib\hooks\useId.js (Line 47:2 - Line 68:2)
(_React$useState, 2),
innerId = _React$useState2[0],
setInnerId = _React$useState2[1];
React.useEffect(function () {
var nextId = uuid;
uuid += 1;
setInnerId("rc_unique_".concat(nextId));
}, []);
// Developer passed id is single source of truth
if (id) {
return id;
}
// Test env always return mock id
if (process.env.NODE_ENV === 'test') {
return 'test-id';
}
// Return react native id or inner id
return innerId;
};node_modules\rc-util\es\hooks\useEvent.js (Line 2:2 - Line 13:2), node_modules\rc-util\lib\hooks\useEvent.js (Line 9:1 - Line 20:2)
function useEvent(callback) {
var fnRef = React.useRef();
fnRef.current = callback;
var memoFn = React.useCallback(function () {
var _fnRef$current;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
}, []);
return memoFn;
}node_modules\rc-util\es\hooks\useEffect.js (Line 4:2 - Line 14:2), node_modules\rc-util\lib\hooks\useEffect.js (Line 10:1 - Line 20:2)
function useEffect(callback, deps) {
var prevRef = React.useRef(deps);
React.useEffect(function () {
if (deps.length !== prevRef.current.length || deps.some(function (dep, index) {
return dep !== prevRef.current[index];
})) {
callback(prevRef.current);
}
prevRef.current = deps;
});
}node_modules\rc-util\es\Dom\support.js (Line 1:14 - Line 23:7), node_modules\rc-util\lib\Dom\support.js (Line 8:2 - Line 30:4)
;
var animationEndEventNames = {
WebkitAnimation: 'webkitAnimationEnd',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
};
var transitionEventNames = {
WebkitTransition: 'webkitTransitionEnd',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
};
function supportEnd(names) {
var el = document.createElement('div');
for (var name in names) {
if (names.hasOwnProperty(name) && el.style[name] !== undefined) {
return {
end: names[name]
};
}
}
return false;
}
exportnode_modules\rc-util\es\Dom\styleChecker.js (Line 3:10 - Line 21:7), node_modules\rc-util\lib\Dom\styleChecker.js (Line 10:2 - Line 28:9)
() && window.document.documentElement) {
var styleNameList = Array.isArray(styleName) ? styleName : [styleName];
var documentElement = window.document.documentElement;
return styleNameList.some(function (name) {
return name in documentElement.style;
});
}
return false;
};
var isStyleValueSupport = function isStyleValueSupport(styleName, value) {
if (!isStyleNameSupport(styleName)) {
return false;
}
var ele = document.createElement('div');
var origin = ele.style[styleName];
ele.style[styleName] = value;
return ele.style[styleName] !== origin;
};
exportnode_modules\rc-util\es\Dom\scrollLocker.js (Line 25:16 - Line 39:16), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 32:2 - Line 46:2)
(this, "reLock", function (options) {
var findLock = locks.find(function (_ref) {
var target = _ref.target;
return target === _this.lockTarget;
});
if (findLock) {
_this.unLock();
}
_this.options = options;
if (findLock) {
findLock.options = options;
_this.lock();
}
});
_definePropertynode_modules\rc-util\es\Dom\scrollLocker.js (Line 39:16 - Line 55:19), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 46:2 - Line 62:2)
(this, "lock", function () {
var _this$options3;
// If lockTarget exist return
if (locks.some(function (_ref2) {
var target = _ref2.target;
return target === _this.lockTarget;
})) {
return;
}
// If same container effect, return
if (locks.some(function (_ref3) {
var _this$options2;
var options = _ref3.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_this$options2 = _this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.container);
})) {
locks = [].concat(_toConsumableArraynode_modules\rc-util\es\Dom\scrollLocker.js (Line 55:19 - Line 65:17), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 62:2 - Line 72:2)
(locks), [{
target: _this.lockTarget,
options: _this.options
}]);
return;
}
var scrollBarSize = 0;
var container = ((_this$options3 = _this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.container) || document.body;
if (container === document.body && window.innerWidth - document.documentElement.clientWidth > 0 || container.scrollHeight > container.clientHeight) {
if (getComputedStyle(container).overflow !== 'hidden') {
scrollBarSize = getScrollBarSizenode_modules\rc-util\es\Dom\scrollLocker.js (Line 65:17 - Line 74:9), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 72:2 - Line 81:2)
();
}
}
var containerClassName = container.className;
if (locks.filter(function (_ref4) {
var _this$options4;
var options = _ref4.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_this$options4 = _this.options) === null || _this$options4 === void 0 ? void 0 : _this$options4.container);
}).length === 0) {
cacheStyle.set(container, setStylenode_modules\rc-util\es\Dom\scrollLocker.js (Line 74:9 - Line 89:19), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 81:2 - Line 96:2)
({
width: scrollBarSize !== 0 ? "calc(100% - ".concat(scrollBarSize, "px)") : undefined,
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden'
}, {
element: container
}));
}
// https://github.com/ant-design/ant-design/issues/19729
if (!scrollingEffectClassNameReg.test(containerClassName)) {
var addClassName = "".concat(containerClassName, " ").concat(scrollingEffectClassName);
container.className = addClassName.trim();
}
locks = [].concat(_toConsumableArraynode_modules\rc-util\es\Dom\scrollLocker.js (Line 94:16 - Line 116:9), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 101:2 - Line 123:2)
(this, "unLock", function () {
var _this$options5;
var findLock = locks.find(function (_ref5) {
var target = _ref5.target;
return target === _this.lockTarget;
});
locks = locks.filter(function (_ref6) {
var target = _ref6.target;
return target !== _this.lockTarget;
});
if (!findLock || locks.some(function (_ref7) {
var _findLock$options;
var options = _ref7.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_findLock$options = findLock.options) === null || _findLock$options === void 0 ? void 0 : _findLock$options.container);
})) {
return;
}
// Remove Effect
var container = ((_this$options5 = _this.options) === null || _this$options5 === void 0 ? void 0 : _this$options5.container) || document.body;
var containerClassName = container.className;
if (!scrollingEffectClassNameReg.test(containerClassName)) return;
setStylenode_modules\rc-util\es\Dom\scrollLocker.js (Line 116:9 - Line 125:2), node_modules\rc-util\lib\Dom\scrollLocker.js (Line 123:2 - Line 132:2)
(cacheStyle.get(container), {
element: container
});
cacheStyle.delete(container);
container.className = container.className.replace(scrollingEffectClassNameReg, '').trim();
});
// eslint-disable-next-line no-plusplus
this.lockTarget = uuid++;
this.options = _options;
});node_modules\rc-util\es\Dom\isVisible.js (Line 1:2 - Line 27:2), node_modules\rc-util\lib\Dom\isVisible.js (Line 7:9 - Line 33:2)
(element) {
if (!element) {
return false;
}
if (element instanceof Element) {
if (element.offsetParent) {
return true;
}
if (element.getBBox) {
var _getBBox = element.getBBox(),
width = _getBBox.width,
height = _getBBox.height;
if (width || height) {
return true;
}
}
if (element.getBoundingClientRect) {
var _element$getBoundingC = element.getBoundingClientRect(),
_width = _element$getBoundingC.width,
_height = _element$getBoundingC.height;
if (_width || _height) {
return true;
}
}
}
return false;
})node_modules\rc-util\es\Dom\focus.js (Line 5:10 - Line 35:7), node_modules\rc-util\lib\Dom\focus.js (Line 16:2 - Line 46:9)
(node)) {
var nodeName = node.nodeName.toLowerCase();
var isFocusableElement =
// Focusable element
['input', 'select', 'textarea', 'button'].includes(nodeName) ||
// Editable element
node.isContentEditable ||
// Anchor with href element
nodeName === 'a' && !!node.getAttribute('href');
// Get tabIndex
var tabIndexAttr = node.getAttribute('tabindex');
var tabIndexNum = Number(tabIndexAttr);
// Parse as number if validate
var tabIndex = null;
if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {
tabIndex = tabIndexNum;
} else if (isFocusableElement && tabIndex === null) {
tabIndex = 0;
}
// Block focusable if disabled
if (isFocusableElement && node.disabled) {
tabIndex = null;
}
return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);
}
return false;
}
exportnode_modules\rc-util\es\Dom\focus.js (Line 37:19 - Line 48:7), node_modules\rc-util\lib\Dom\focus.js (Line 48:2 - Line 59:9)
(node.querySelectorAll('*')).filter(function (child) {
return focusable(child, includePositive);
});
if (focusable(node, includePositive)) {
res.unshift(node);
}
return res;
}
var lastFocusElement = null;
/** @deprecated Do not use since this may failed when used in async */
exportnode_modules\rc-util\es\Dom\focus.js (Line 71:2 - Line 82:2), node_modules\rc-util\lib\Dom\focus.js (Line 82:1 - Line 93:2)
function limitTabRange(node, e) {
if (e.keyCode === 9) {
var tabNodeList = getFocusNodeList(node);
var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];
var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;
if (leavingTab) {
var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];
target.focus();
e.preventDefault();
}
}
}node_modules\rc-util\es\Dom\dynamicCSS.js (Line 3:13 - Line 38:7), node_modules\rc-util\lib\Dom\dynamicCSS.js (Line 13:2 - Line 48:9)
;
var APPEND_ORDER = 'data-rc-order';
var APPEND_PRIORITY = 'data-rc-priority';
var MARK_KEY = "rc-util-key";
var containerCache = new Map();
function getMark() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
mark = _ref.mark;
if (mark) {
return mark.startsWith('data-') ? mark : "data-".concat(mark);
}
return MARK_KEY;
}
function getContainer(option) {
if (option.attachTo) {
return option.attachTo;
}
var head = document.querySelector('head');
return head || document.body;
}
function getOrder(prepend) {
if (prepend === 'queue') {
return 'prependQueue';
}
return prepend ? 'prepend' : 'append';
}
/**
* Find style which inject by rc-util
*/
function findStyles(container) {
return Array.from((containerCache.get(container) || container).children).filter(function (node) {
return node.tagName === 'STYLE';
});
}
exportnode_modules\rc-util\es\Dom\dynamicCSS.js (Line 40:10 - Line 93:7), node_modules\rc-util\lib\Dom\dynamicCSS.js (Line 50:2 - Line 103:9)
()) {
return null;
}
var csp = option.csp,
prepend = option.prepend,
_option$priority = option.priority,
priority = _option$priority === void 0 ? 0 : _option$priority;
var mergedOrder = getOrder(prepend);
var isPrependQueue = mergedOrder === 'prependQueue';
var styleNode = document.createElement('style');
styleNode.setAttribute(APPEND_ORDER, mergedOrder);
if (isPrependQueue && priority) {
styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority));
}
if (csp !== null && csp !== void 0 && csp.nonce) {
styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
}
styleNode.innerHTML = css;
var container = getContainer(option);
var firstChild = container.firstChild;
if (prepend) {
// If is queue `prepend`, it will prepend first style and then append rest style
if (isPrependQueue) {
var existStyle = (option.styles || findStyles(container)).filter(function (node) {
// Ignore style which not injected by rc-util with prepend
if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {
return false;
}
// Ignore style which priority less then new style
var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
return priority >= nodePriority;
});
if (existStyle.length) {
container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
return styleNode;
}
}
// Use `insertBefore` as `prepend`
container.insertBefore(styleNode, firstChild);
} else {
container.appendChild(styleNode);
}
return styleNode;
}
function findExistNode(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var container = getContainer(option);
return (option.styles || findStyles(container)).find(function (node) {
return node.getAttribute(getMark(option)) === key;
});
}
exportnode_modules\rc-util\es\Dom\dynamicCSS.js (Line 93:2 - Line 109:9), node_modules\rc-util\lib\Dom\dynamicCSS.js (Line 103:1 - Line 119:2)
function removeCSS(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var existNode = findExistNode(key, option);
if (existNode) {
var container = getContainer(option);
container.removeChild(existNode);
}
}
/**
* qiankun will inject `appendChild` to insert into other
*/
function syncRealContainer(container, option) {
var cachedRealContainer = containerCache.get(container);
// Find real container when not cached or cached container removed
if (!cachedRealContainer || !containsnode_modules\rc-util\es\Dom\dynamicCSS.js (Line 127:14 - Line 148:2), node_modules\rc-util\lib\Dom\dynamicCSS.js (Line 137:2 - Line 158:2)
({}, originOption), {}, {
styles: styles
});
// Sync real parent
syncRealContainer(container, option);
var existNode = findExistNode(key, option);
if (existNode) {
var _option$csp, _option$csp2;
if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {
var _option$csp3;
existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;
}
if (existNode.innerHTML !== css) {
existNode.innerHTML = css;
}
return existNode;
}
var newNode = injectCSS(css, option);
newNode.setAttribute(getMark(option), key);
return newNode;
}node_modules\rc-util\es\Dom\css.js (Line 1:1 - Line 30:7), node_modules\rc-util\lib\Dom\css.js (Line 14:1 - Line 43:9)
/* eslint-disable no-nested-ternary */
var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;
var removePixel = {
left: true,
top: true
};
var floatMap = {
cssFloat: 1,
styleFloat: 1,
float: 1
};
function getComputedStyle(node) {
return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
}
function getStyleValue(node, type, value) {
type = type.toLowerCase();
if (value === 'auto') {
if (type === 'height') {
return node.offsetHeight;
}
if (type === 'width') {
return node.offsetWidth;
}
}
if (!(type in removePixel)) {
removePixel[type] = PIXEL_PATTERN.test(type);
}
return removePixel[type] ? parseFloat(value) || 0 : value;
}
exportnode_modules\rc-util\es\Dom\css.js (Line 30:2 - Line 36:7), node_modules\rc-util\lib\Dom\css.js (Line 43:1 - Line 49:9)
function get(node, name) {
var length = arguments.length;
var style = getComputedStyle(node);
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);
}
exportnode_modules\rc-util\es\Dom\css.js (Line 36:2 - Line 53:7), node_modules\rc-util\lib\Dom\css.js (Line 49:1 - Line 66:9)
function set(node, name, value) {
var length = arguments.length;
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
if (length === 3) {
if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {
value = "".concat(value, "px");
}
node.style[name] = value; // Number
return value;
}
for (var x in name) {
if (name.hasOwnProperty(x)) {
set(node, x, name[x]);
}
}
return getComputedStyle(node);
}
exportnode_modules\rc-util\es\Dom\css.js (Line 65:2 - Line 73:7), node_modules\rc-util\lib\Dom\css.js (Line 78:1 - Line 86:9)
function getDocSize() {
var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
return {
width: width,
height: height
};
}
exportnode_modules\rc-util\es\Dom\css.js (Line 87:2 - Line 96:2), node_modules\rc-util\lib\Dom\css.js (Line 100:1 - Line 109:2)
function getOffset(node) {
var box = node.getBoundingClientRect();
var docElem = document.documentElement;
// < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft
return {
left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
};
}node_modules\rc-util\es\Dom\contains.js (Line 1:2 - Line 20:2), node_modules\rc-util\lib\Dom\contains.js (Line 7:1 - Line 26:2)
function contains(root, n) {
if (!root) {
return false;
}
// Use native if support
if (root.contains) {
return root.contains(n);
}
// `document.contains` not support with IE11
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}node_modules\rc-util\es\Dom\class.js (Line 1:2 - Line 8:7), node_modules\rc-util\lib\Dom\class.js (Line 9:1 - Line 16:9)
function hasClass(node, className) {
if (node.classList) {
return node.classList.contains(className);
}
var originClass = node.className;
return " ".concat(originClass, " ").indexOf(" ".concat(className, " ")) > -1;
}
exportnode_modules\rc-util\es\Dom\class.js (Line 8:2 - Line 17:7), node_modules\rc-util\lib\Dom\class.js (Line 16:1 - Line 25:9)
function addClass(node, className) {
if (node.classList) {
node.classList.add(className);
} else {
if (!hasClass(node, className)) {
node.className = "".concat(node.className, " ").concat(className);
}
}
}
exportnode_modules\rc-util\es\Dom\class.js (Line 17:2 - Line 26:2), node_modules\rc-util\lib\Dom\class.js (Line 25:1 - Line 34:2)
function removeClass(node, className) {
if (node.classList) {
node.classList.remove(className);
} else {
if (hasClass(node, className)) {
var originClass = node.className;
node.className = " ".concat(originClass, " ").replace(" ".concat(className, " "), ' ');
}
}
}node_modules\rc-util\es\Dom\addEventListener.js (Line 5:9 - Line 17:2), node_modules\rc-util\lib\Dom\addEventListener.js (Line 12:8 - Line 24:2)
.unstable_batchedUpdates(cb, e);
} : cb;
if (target !== null && target !== void 0 && target.addEventListener) {
target.addEventListener(eventType, callback, option);
}
return {
remove: function remove() {
if (target !== null && target !== void 0 && target.removeEventListener) {
target.removeEventListener(eventType, callback, option);
}
}
};
}node_modules\rc-util\es\debug\diff.js (Line 11:14 - Line 21:7), node_modules\rc-util\lib\debug\diff.js (Line 18:2 - Line 28:9)
({}, obj), {}, {
path: obj.path.join(' > ')
});
});
};
arr.__proto__.toString = function toString() {
return JSON.stringify(this.format(), null, 2);
};
return arr;
}
exportnode_modules\rc-util\es\debug\diff.js (Line 21:2 - Line 26:19), node_modules\rc-util\lib\debug\diff.js (Line 28:1 - Line 33:2)
function diff(obj1, obj2) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : createArray();
if (depth <= 0) return diffList;
var keys = new Set([].concat(_toConsumableArraynode_modules\rc-util\es\debug\diff.js (Line 34:8 - Line 65:2), node_modules\rc-util\lib\debug\diff.js (Line 41:2 - Line 72:2)
(value2);
// Diff type
if (type1 !== type2) {
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
return;
}
// NaN
if (Number.isNaN(value1) && Number.isNaN(value2)) {
return;
}
// Object & Array
if (type1 === 'object' && value1 !== null && value2 !== null) {
diff(value1, value2, depth - 1, path.concat(key), diffList);
return;
}
// Rest
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
});
return diffList;
}node_modules\rc-util\es\Children\toArray.js (Line 6:6 - Line 12:11), node_modules\rc-util\lib\Children\toArray.js (Line 13:8 - Line 19:2)
.Children.forEach(children, function (child) {
if ((child === undefined || child === null) && !option.keepEmpty) {
return;
}
if (Array.isArray(child)) {
ret = ret.concat(toArray(child));
} else if (isFragmentnode_modules\rc-slider\lib\Tracks\index.js (Line 1:1 - Line 10:12), node_modules\rc-slider\lib\Tracks\Track.js (Line 1:1 - Line 10:17)
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _classnamesnode_modules\rc-slider\lib\Steps\Dot.js (Line 9:2 - Line 15:9), node_modules\rc-slider\lib\Tracks\index.js (Line 8:2 - Line 14:4)
;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _classnames = _interopRequireDefault(require("classnames"));
var React = _interopRequireWildcard(require("react"));
var _context = _interopRequireDefault(require("../context"));
var _util = require("../util");
functionnode_modules\rc-slider\lib\Steps\Dot.js (Line 10:39 - Line 17:4), node_modules\rc-slider\lib\Tracks\Track.js (Line 10:40 - Line 17:6)
));
var _classnames = _interopRequireDefault(require("classnames"));
var React = _interopRequireWildcard(require("react"));
var _context = _interopRequireDefault(require("../context"));
var _util = require("../util");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var Dotnode_modules\rc-slider\lib\Marks\Mark.js (Line 1:1 - Line 17:5), node_modules\rc-slider\lib\Tracks\Track.js (Line 1:1 - Line 17:6)
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classnames = _interopRequireDefault(require("classnames"));
var React = _interopRequireWildcard(require("react"));
var _context = _interopRequireDefault(require("../context"));
var _util = require("../util");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var Marknode_modules\rc-slider\lib\Marks\index.js (Line 1:1 - Line 10:6), node_modules\rc-slider\lib\Steps\index.js (Line 1:1 - Line 10:9)
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _Marknode_modules\rc-slider\lib\Handles\Handle.js (Line 1:1 - Line 11:17), node_modules\rc-slider\lib\Handles\index.js (Line 1:1 - Line 11:16)
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _defineProperty2node_modules\rc-slider\es\Tracks\Track.js (Line 7:1 - Line 15:14), node_modules\rc-slider\lib\Tracks\Track.js (Line 17:1 - Line 25:9)
var Track = function Track(props) {
var prefixCls = props.prefixCls,
style = props.style,
start = props.start,
end = props.end,
index = props.index,
onStartMove = props.onStartMove,
replaceCls = props.replaceCls;
var _React$useContext = React.useContext(SliderContextnode_modules\rc-slider\es\Tracks\Track.js (Line 15:14 - Line 23:10), node_modules\rc-slider\lib\Tracks\Track.js (Line 25:8 - Line 33:2)
),
direction = _React$useContext.direction,
min = _React$useContext.min,
max = _React$useContext.max,
disabled = _React$useContext.disabled,
range = _React$useContext.range,
classNames = _React$useContext.classNames;
var trackPrefixCls = "".concat(prefixCls, "-track");
var offsetStart = getOffsetnode_modules\rc-slider\es\Tracks\Track.js (Line 24:10 - Line 52:4), node_modules\rc-slider\lib\Tracks\Track.js (Line 34:2 - Line 62:2)
(end, min, max);
// ============================ Events ============================
var onInternalStartMove = function onInternalStartMove(e) {
if (!disabled && onStartMove) {
onStartMove(e, -1);
}
};
// ============================ Render ============================
var positionStyle = {};
switch (direction) {
case 'rtl':
positionStyle.right = "".concat(offsetStart * 100, "%");
positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
case 'btt':
positionStyle.bottom = "".concat(offsetStart * 100, "%");
positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
case 'ttb':
positionStyle.top = "".concat(offsetStart * 100, "%");
positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
break;
default:
positionStyle.left = "".concat(offsetStart * 100, "%");
positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
}
var className = replaceCls || clsnode_modules\rc-slider\es\Tracks\index.js (Line 13:14 - Line 50:6), node_modules\rc-slider\lib\Tracks\index.js (Line 23:8 - Line 60:7)
),
included = _React$useContext.included,
range = _React$useContext.range,
min = _React$useContext.min,
styles = _React$useContext.styles,
classNames = _React$useContext.classNames;
// =========================== List ===========================
var trackList = React.useMemo(function () {
if (!range) {
// null value do not have track
if (values.length === 0) {
return [];
}
var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;
var endValue = values[0];
return [{
start: Math.min(startValue, endValue),
end: Math.max(startValue, endValue)
}];
}
// Multiple
var list = [];
for (var i = 0; i < values.length - 1; i += 1) {
list.push({
start: values[i],
end: values[i + 1]
});
}
return list;
}, [values, range, startPoint, min]);
if (!included) {
return null;
}
// ========================== Render ==========================
var tracksNode = trackList !== null && trackList !== void 0 && trackList.length && (classNames.tracks || styles.tracks) ? /*#__PURE__*/React.createElement(Tracknode_modules\rc-slider\es\Tracks\index.js (Line 55:4 - Line 61:6), node_modules\rc-slider\lib\Tracks\index.js (Line 65:2 - Line 71:7)
(classNames.tracks, "".concat(prefixCls, "-tracks")),
style: styles.tracks
}) : null;
return /*#__PURE__*/React.createElement(React.Fragment, null, tracksNode, trackList.map(function (_ref, index) {
var start = _ref.start,
end = _ref.end;
return /*#__PURE__*/React.createElement(Tracknode_modules\rc-slider\es\Steps\index.js (Line 10:14 - Line 35:4), node_modules\rc-slider\lib\Steps\index.js (Line 20:8 - Line 45:5)
),
min = _React$useContext.min,
max = _React$useContext.max,
step = _React$useContext.step;
var stepDots = React.useMemo(function () {
var dotSet = new Set();
// Add marks
marks.forEach(function (mark) {
dotSet.add(mark.value);
});
// Fill dots
if (dots && step !== null) {
var current = min;
while (current <= max) {
dotSet.add(current);
current += step;
}
}
return Array.from(dotSet);
}, [min, max, step, dots, marks]);
return /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-step")
}, stepDots.map(function (dotValue) {
return /*#__PURE__*/React.createElement(Dotnode_modules\rc-slider\es\Steps\Dot.js (Line 12:14 - Line 23:14), node_modules\rc-slider\lib\Steps\Dot.js (Line 22:8 - Line 33:2)
),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
included = _React$useContext.included,
includedStart = _React$useContext.includedStart,
includedEnd = _React$useContext.includedEnd;
var dotClassName = "".concat(prefixCls, "-dot");
var active = included && includedStart <= value && value <= includedEnd;
// ============================ Offset ============================
var mergedStyle = _objectSpreadnode_modules\rc-slider\es\Marks\Mark.js (Line 13:14 - Line 23:18), node_modules\rc-slider\lib\Marks\Mark.js (Line 23:8 - Line 33:2)
),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
includedStart = _React$useContext.includedStart,
includedEnd = _React$useContext.includedEnd,
included = _React$useContext.included;
var textCls = "".concat(prefixCls, "-text");
// ============================ Offset ============================
var positionStyle = getDirectionStylenode_modules\rc-slider\es\Marks\index.js (Line 3:1 - Line 19:5), node_modules\rc-slider\lib\Marks\index.js (Line 13:1 - Line 29:6)
var Marks = function Marks(props) {
var prefixCls = props.prefixCls,
marks = props.marks,
onClick = props.onClick;
var markPrefixCls = "".concat(prefixCls, "-mark");
// Not render mark if empty
if (!marks.length) {
return null;
}
return /*#__PURE__*/React.createElement("div", {
className: markPrefixCls
}, marks.map(function (_ref) {
var value = _ref.value,
style = _ref.style,
label = _ref.label;
return /*#__PURE__*/React.createElement(Marknode_modules\rc-slider\es\hooks\useRange.js (Line 4:8 - Line 13:8), node_modules\rc-slider\lib\hooks\useRange.js (Line 10:2 - Line 19:2)
(function () {
if (range === true || !range) {
return [!!range, false, false, 0];
}
var editable = range.editable,
draggableTrack = range.draggableTrack,
minCount = range.minCount,
maxCount = range.maxCount;
if (process.env.NODE_ENV !== 'production') {
warningnode_modules\rc-slider\es\hooks\useOffset.js (Line 10:2 - Line 123:19), node_modules\rc-slider\lib\hooks\useOffset.js (Line 19:1 - Line 132:2)
function useOffset(min, max, step, markList, allowCross, pushable) {
var formatRangeValue = React.useCallback(function (val) {
return Math.max(min, Math.min(max, val));
}, [min, max]);
var formatStepValue = React.useCallback(function (val) {
if (step !== null) {
var stepValue = min + Math.round((formatRangeValue(val) - min) / step) * step;
// Cut number in case to be like 0.30000000000000004
var getDecimal = function getDecimal(num) {
return (String(num).split('.')[1] || '').length;
};
var maxDecimal = Math.max(getDecimal(step), getDecimal(max), getDecimal(min));
var fixedValue = Number(stepValue.toFixed(maxDecimal));
return min <= fixedValue && fixedValue <= max ? fixedValue : null;
}
return null;
}, [step, min, max, formatRangeValue]);
var formatValue = React.useCallback(function (val) {
var formatNextValue = formatRangeValue(val);
// List align values
var alignValues = markList.map(function (mark) {
return mark.value;
});
if (step !== null) {
alignValues.push(formatStepValue(val));
}
// min & max
alignValues.push(min, max);
// Align with marks
var closeValue = alignValues[0];
var closeDist = max - min;
alignValues.forEach(function (alignValue) {
var dist = Math.abs(formatNextValue - alignValue);
if (dist <= closeDist) {
closeValue = alignValue;
closeDist = dist;
}
});
return closeValue;
}, [min, max, markList, step, formatRangeValue, formatStepValue]);
// ========================== Offset ==========================
// Single Value
var offsetValue = function offsetValue(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
if (typeof offset === 'number') {
var nextValue;
var originValue = values[valueIndex];
// Only used for `dist` mode
var targetDistValue = originValue + offset;
// Compare next step value & mark value which is best match
var potentialValues = [];
markList.forEach(function (mark) {
potentialValues.push(mark.value);
});
// Min & Max
potentialValues.push(min, max);
// In case origin value is align with mark but not with step
potentialValues.push(formatStepValue(originValue));
// Put offset step value also
var sign = offset > 0 ? 1 : -1;
if (mode === 'unit') {
potentialValues.push(formatStepValue(originValue + sign * step));
} else {
potentialValues.push(formatStepValue(targetDistValue));
}
// Find close one
potentialValues = potentialValues.filter(function (val) {
return val !== null;
})
// Remove reverse value
.filter(function (val) {
return offset < 0 ? val <= originValue : val >= originValue;
});
if (mode === 'unit') {
// `unit` mode can not contain itself
potentialValues = potentialValues.filter(function (val) {
return val !== originValue;
});
}
var compareValue = mode === 'unit' ? originValue : targetDistValue;
nextValue = potentialValues[0];
var valueDist = Math.abs(nextValue - compareValue);
potentialValues.forEach(function (potentialValue) {
var dist = Math.abs(potentialValue - compareValue);
if (dist < valueDist) {
nextValue = potentialValue;
valueDist = dist;
}
});
// Out of range will back to range
if (nextValue === undefined) {
return offset < 0 ? min : max;
}
// `dist` mode
if (mode === 'dist') {
return nextValue;
}
// `unit` mode may need another round
if (Math.abs(offset) > 1) {
var cloneValues = _toConsumableArraynode_modules\rc-slider\es\hooks\useOffset.js (Line 123:19 - Line 219:2), node_modules\rc-slider\lib\hooks\useOffset.js (Line 132:2 - Line 228:2)
(values);
cloneValues[valueIndex] = nextValue;
return offsetValue(cloneValues, offset - sign, valueIndex, mode);
}
return nextValue;
} else if (offset === 'min') {
return min;
} else if (offset === 'max') {
return max;
}
};
/** Same as `offsetValue` but return `changed` mark to tell value changed */
var offsetChangedValue = function offsetChangedValue(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
var originValue = values[valueIndex];
var nextValue = offsetValue(values, offset, valueIndex, mode);
return {
value: nextValue,
changed: nextValue !== originValue
};
};
var needPush = function needPush(dist) {
return pushable === null && dist === 0 || typeof pushable === 'number' && dist < pushable;
};
// Values
var offsetValues = function offsetValues(values, offset, valueIndex) {
var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
var nextValues = values.map(formatValue);
var originValue = nextValues[valueIndex];
var nextValue = offsetValue(nextValues, offset, valueIndex, mode);
nextValues[valueIndex] = nextValue;
if (allowCross === false) {
// >>>>> Allow Cross
var pushNum = pushable || 0;
// ============ AllowCross ===============
if (valueIndex > 0 && nextValues[valueIndex - 1] !== originValue) {
nextValues[valueIndex] = Math.max(nextValues[valueIndex], nextValues[valueIndex - 1] + pushNum);
}
if (valueIndex < nextValues.length - 1 && nextValues[valueIndex + 1] !== originValue) {
nextValues[valueIndex] = Math.min(nextValues[valueIndex], nextValues[valueIndex + 1] - pushNum);
}
} else if (typeof pushable === 'number' || pushable === null) {
// >>>>> Pushable
// =============== Push ==================
// >>>>>> Basic push
// End values
for (var i = valueIndex + 1; i < nextValues.length; i += 1) {
var changed = true;
while (needPush(nextValues[i] - nextValues[i - 1]) && changed) {
var _offsetChangedValue = offsetChangedValue(nextValues, 1, i);
nextValues[i] = _offsetChangedValue.value;
changed = _offsetChangedValue.changed;
}
}
// Start values
for (var _i = valueIndex; _i > 0; _i -= 1) {
var _changed = true;
while (needPush(nextValues[_i] - nextValues[_i - 1]) && _changed) {
var _offsetChangedValue2 = offsetChangedValue(nextValues, -1, _i - 1);
nextValues[_i - 1] = _offsetChangedValue2.value;
_changed = _offsetChangedValue2.changed;
}
}
// >>>>> Revert back to safe push range
// End to Start
for (var _i2 = nextValues.length - 1; _i2 > 0; _i2 -= 1) {
var _changed2 = true;
while (needPush(nextValues[_i2] - nextValues[_i2 - 1]) && _changed2) {
var _offsetChangedValue3 = offsetChangedValue(nextValues, -1, _i2 - 1);
nextValues[_i2 - 1] = _offsetChangedValue3.value;
_changed2 = _offsetChangedValue3.changed;
}
}
// Start to End
for (var _i3 = 0; _i3 < nextValues.length - 1; _i3 += 1) {
var _changed3 = true;
while (needPush(nextValues[_i3 + 1] - nextValues[_i3]) && _changed3) {
var _offsetChangedValue4 = offsetChangedValue(nextValues, 1, _i3 + 1);
nextValues[_i3 + 1] = _offsetChangedValue4.value;
_changed3 = _offsetChangedValue4.changed;
}
}
}
return {
value: nextValues[valueIndex],
values: nextValues
};
};
return [formatValue, offsetValues];
}node_modules\rc-slider\es\hooks\useDrag.js (Line 7:1 - Line 18:15), node_modules\rc-slider\lib\hooks\useDrag.js (Line 17:1 - Line 28:2)
/** Drag to delete offset. It's a user experience number for dragging out */
var REMOVE_DIST = 130;
function getPosition(e) {
var obj = 'targetTouches' in e ? e.targetTouches[0] : e;
return {
pageX: obj.pageX,
pageY: obj.pageY
};
}
function useDrag(containerRef, direction, rawValues, min, max, formatValue, triggerChange, finishChange, offsetValues, editable, minCount) {
var _React$useState = React.useState(null),
_React$useState2 = _slicedToArraynode_modules\rc-slider\es\hooks\useDrag.js (Line 34:15 - Line 40:16), node_modules\rc-slider\lib\hooks\useDrag.js (Line 44:2 - Line 50:9)
(_React$useState9, 2),
originValues = _React$useState10[0],
setOriginValues = _React$useState10[1];
var mouseMoveEventRef = React.useRef(null);
var mouseUpEventRef = React.useRef(null);
var touchEventTargetRef = React.useRef(null);
var _React$useContext = React.useContext(UnstableContextnode_modules\rc-slider\es\hooks\useDrag.js (Line 43:16 - Line 82:9), node_modules\rc-slider\lib\hooks\useDrag.js (Line 53:2 - Line 92:2)
(function () {
if (draggingIndex === -1) {
setCacheValues(rawValues);
}
}, [rawValues, draggingIndex]);
// Clean up event
React.useEffect(function () {
return function () {
document.removeEventListener('mousemove', mouseMoveEventRef.current);
document.removeEventListener('mouseup', mouseUpEventRef.current);
if (touchEventTargetRef.current) {
touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
}
};
}, []);
var flushValues = function flushValues(nextValues, nextValue, deleteMark) {
// Perf: Only update state when value changed
if (nextValue !== undefined) {
setDraggingValue(nextValue);
}
setCacheValues(nextValues);
var changeValues = nextValues;
if (deleteMark) {
changeValues = nextValues.filter(function (_, i) {
return i !== draggingIndex;
});
}
triggerChange(changeValues);
if (onDragChange) {
onDragChange({
rawValues: nextValues,
deleteIndex: deleteMark ? draggingIndex : -1,
draggingIndex: draggingIndex,
draggingValue: nextValue
});
}
};
var updateCacheValue = useEventnode_modules\rc-slider\es\hooks\useDrag.js (Line 82:9 - Line 107:19), node_modules\rc-slider\lib\hooks\useDrag.js (Line 92:2 - Line 117:2)
(function (valueIndex, offsetPercent, deleteMark) {
if (valueIndex === -1) {
// >>>> Dragging on the track
var startValue = originValues[0];
var endValue = originValues[originValues.length - 1];
var maxStartOffset = min - startValue;
var maxEndOffset = max - endValue;
// Get valid offset
var offset = offsetPercent * (max - min);
offset = Math.max(offset, maxStartOffset);
offset = Math.min(offset, maxEndOffset);
// Use first value to revert back of valid offset (like steps marks)
var formatStartValue = formatValue(startValue + offset);
offset = formatStartValue - startValue;
var cloneCacheValues = originValues.map(function (val) {
return val + offset;
});
flushValues(cloneCacheValues);
} else {
// >>>> Dragging on the handle
var offsetDist = (max - min) * offsetPercent;
// Always start with the valueIndex origin value
var cloneValues = _toConsumableArraynode_modules\rc-slider\es\hooks\useDrag.js (Line 107:19 - Line 204:19), node_modules\rc-slider\lib\hooks\useDrag.js (Line 117:2 - Line 214:2)
(cacheValues);
cloneValues[valueIndex] = originValues[valueIndex];
var next = offsetValues(cloneValues, offsetDist, valueIndex, 'dist');
flushValues(next.values, next.value, deleteMark);
}
});
var onStartMove = function onStartMove(e, valueIndex, startValues) {
e.stopPropagation();
// 如果是点击 track 触发的,需要传入变化后的初始值,而不能直接用 rawValues
var initialValues = startValues || rawValues;
var originValue = initialValues[valueIndex];
setDraggingIndex(valueIndex);
setDraggingValue(originValue);
setOriginValues(initialValues);
setCacheValues(initialValues);
setDraggingDelete(false);
var _getPosition = getPosition(e),
startX = _getPosition.pageX,
startY = _getPosition.pageY;
// We declare it here since closure can't get outer latest value
var deleteMark = false;
// Internal trigger event
if (onDragStart) {
onDragStart({
rawValues: initialValues,
draggingIndex: valueIndex,
draggingValue: originValue
});
}
// Moving
var onMouseMove = function onMouseMove(event) {
event.preventDefault();
var _getPosition2 = getPosition(event),
moveX = _getPosition2.pageX,
moveY = _getPosition2.pageY;
var offsetX = moveX - startX;
var offsetY = moveY - startY;
var _containerRef$current = containerRef.current.getBoundingClientRect(),
width = _containerRef$current.width,
height = _containerRef$current.height;
var offSetPercent;
var removeDist;
switch (direction) {
case 'btt':
offSetPercent = -offsetY / height;
removeDist = offsetX;
break;
case 'ttb':
offSetPercent = offsetY / height;
removeDist = offsetX;
break;
case 'rtl':
offSetPercent = -offsetX / width;
removeDist = offsetY;
break;
default:
offSetPercent = offsetX / width;
removeDist = offsetY;
}
// Check if need mark remove
deleteMark = editable ? Math.abs(removeDist) > REMOVE_DIST && minCount < cacheValues.length : false;
setDraggingDelete(deleteMark);
updateCacheValue(valueIndex, offSetPercent, deleteMark);
};
// End
var onMouseUp = function onMouseUp(event) {
event.preventDefault();
document.removeEventListener('mouseup', onMouseUp);
document.removeEventListener('mousemove', onMouseMove);
if (touchEventTargetRef.current) {
touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
}
mouseMoveEventRef.current = null;
mouseUpEventRef.current = null;
touchEventTargetRef.current = null;
finishChange(deleteMark);
setDraggingIndex(-1);
setDraggingDelete(false);
};
document.addEventListener('mouseup', onMouseUp);
document.addEventListener('mousemove', onMouseMove);
e.currentTarget.addEventListener('touchend', onMouseUp);
e.currentTarget.addEventListener('touchmove', onMouseMove);
mouseMoveEventRef.current = onMouseMove;
mouseUpEventRef.current = onMouseUp;
touchEventTargetRef.current = e.currentTarget;
};
// Only return cache value when it mapping with rawValues
var returnValues = React.useMemo(function () {
var sourceValues = _toConsumableArraynode_modules\rc-slider\es\hooks\useDrag.js (Line 207:19 - Line 225:7), node_modules\rc-slider\lib\hooks\useDrag.js (Line 217:2 - Line 235:4)
(cacheValues).sort(function (a, b) {
return a - b;
});
var counts = {};
targetValues.forEach(function (val) {
counts[val] = (counts[val] || 0) + 1;
});
sourceValues.forEach(function (val) {
counts[val] = (counts[val] || 0) - 1;
});
var maxDiffCount = editable ? 1 : 0;
var diffCount = Object.values(counts).reduce(function (prev, next) {
return prev + Math.abs(next);
}, 0);
return diffCount <= maxDiffCount ? cacheValues : rawValues;
}, [rawValues, cacheValues, editable]);
return [draggingIndex, draggingValue, draggingDelete, returnValues, onStartMove];
}
exportnode_modules\rc-slider\es\Handles\index.js (Line 10:1 - Line 21:25), node_modules\rc-slider\lib\Handles\index.js (Line 20:1 - Line 31:2)
var Handles = /*#__PURE__*/React.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
style = props.style,
onStartMove = props.onStartMove,
onOffsetChange = props.onOffsetChange,
values = props.values,
handleRender = props.handleRender,
activeHandleRender = props.activeHandleRender,
draggingIndex = props.draggingIndex,
draggingDelete = props.draggingDelete,
onFocus = props.onFocus,
restProps = _objectWithoutPropertiesnode_modules\rc-slider\es\Handles\index.js (Line 30:15 - Line 53:10), node_modules\rc-slider\lib\Handles\index.js (Line 40:2 - Line 63:2)
(_React$useState3, 2),
activeIndex = _React$useState4[0],
setActiveIndex = _React$useState4[1];
var onActive = function onActive(index) {
setActiveIndex(index);
setActiveVisible(true);
};
var onHandleFocus = function onHandleFocus(e, index) {
onActive(index);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var onHandleMouseEnter = function onHandleMouseEnter(e, index) {
onActive(index);
};
// =========================== Render ===========================
React.useImperativeHandle(ref, function () {
return {
focus: function focus(index) {
var _handlesRef$current$i;
(_handlesRef$current$i = handlesRef.current[index]) === null || _handlesRef$current$i === void 0 || _handlesRef$current$i.focus();
},
hideHelp: function hideHelp() {
flushSyncnode_modules\rc-slider\es\Handles\index.js (Line 62:14 - Line 72:7), node_modules\rc-slider\lib\Handles\index.js (Line 72:2 - Line 82:8)
({
prefixCls: prefixCls,
onStartMove: onStartMove,
onOffsetChange: onOffsetChange,
render: handleRender,
onFocus: onHandleFocus,
onMouseEnter: onHandleMouseEnter
}, restProps);
return /*#__PURE__*/React.createElement(React.Fragment, null, values.map(function (value, index) {
var dragging = draggingIndex === index;
return /*#__PURE__*/React.createElement(Handlenode_modules\rc-slider\es\Handles\index.js (Line 72:9 - Line 82:9), node_modules\rc-slider\lib\Handles\index.js (Line 82:2 - Line 92:2)
({
ref: function ref(node) {
if (!node) {
delete handlesRef.current[index];
} else {
handlesRef.current[index] = node;
}
},
dragging: dragging,
draggingDelete: dragging && draggingDelete,
style: getIndexnode_modules\rc-slider\es\Handles\index.js (Line 87:9 - Line 105:7), node_modules\rc-slider\lib\Handles\index.js (Line 97:2 - Line 115:4)
({
key: "a11y"
}, handleProps, {
value: values[activeIndex],
valueIndex: null,
dragging: draggingIndex !== -1,
draggingDelete: draggingDelete,
render: activeHandleRender,
style: {
pointerEvents: 'none'
},
tabIndex: null,
"aria-hidden": true
})));
});
if (process.env.NODE_ENV !== 'production') {
Handles.displayName = 'Handles';
}
exportnode_modules\rc-slider\es\Handles\Handle.js (Line 11:1 - Line 25:25), node_modules\rc-slider\lib\Handles\Handle.js (Line 21:1 - Line 35:2)
var Handle = /*#__PURE__*/React.forwardRef(function (props, ref) {
var prefixCls = props.prefixCls,
value = props.value,
valueIndex = props.valueIndex,
onStartMove = props.onStartMove,
onDelete = props.onDelete,
style = props.style,
render = props.render,
dragging = props.dragging,
draggingDelete = props.draggingDelete,
onOffsetChange = props.onOffsetChange,
onChangeComplete = props.onChangeComplete,
onFocus = props.onFocus,
onMouseEnter = props.onMouseEnter,
restProps = _objectWithoutPropertiesnode_modules\rc-slider\es\Handles\Handle.js (Line 26:14 - Line 62:8), node_modules\rc-slider\lib\Handles\Handle.js (Line 36:8 - Line 72:9)
),
min = _React$useContext.min,
max = _React$useContext.max,
direction = _React$useContext.direction,
disabled = _React$useContext.disabled,
keyboard = _React$useContext.keyboard,
range = _React$useContext.range,
tabIndex = _React$useContext.tabIndex,
ariaLabelForHandle = _React$useContext.ariaLabelForHandle,
ariaLabelledByForHandle = _React$useContext.ariaLabelledByForHandle,
ariaRequired = _React$useContext.ariaRequired,
ariaValueTextFormatterForHandle = _React$useContext.ariaValueTextFormatterForHandle,
styles = _React$useContext.styles,
classNames = _React$useContext.classNames;
var handlePrefixCls = "".concat(prefixCls, "-handle");
// ============================ Events ============================
var onInternalStartMove = function onInternalStartMove(e) {
if (!disabled) {
onStartMove(e, valueIndex);
}
};
var onInternalFocus = function onInternalFocus(e) {
onFocus === null || onFocus === void 0 || onFocus(e, valueIndex);
};
var onInternalMouseEnter = function onInternalMouseEnter(e) {
onMouseEnter(e, valueIndex);
};
// =========================== Keyboard ===========================
var onKeyDown = function onKeyDown(e) {
if (!disabled && keyboard) {
var offset = null;
// Change the value
switch (e.which || e.keyCode) {
case KeyCodenode_modules\rc-slider\es\Handles\Handle.js (Line 91:8 - Line 103:8), node_modules\rc-slider\lib\Handles\Handle.js (Line 101:8 - Line 113:9)
.DELETE:
onDelete(valueIndex);
break;
}
if (offset !== null) {
e.preventDefault();
onOffsetChange(offset, valueIndex);
}
}
};
var handleKeyUp = function handleKeyUp(e) {
switch (e.which || e.keyCode) {
case KeyCodenode_modules\rc-slider\es\Handles\Handle.js (Line 133:9 - Line 143:9), node_modules\rc-slider\lib\Handles\Handle.js (Line 143:2 - Line 153:2)
(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value),
'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical',
onMouseDown: onInternalStartMove,
onTouchStart: onInternalStartMove,
onFocus: onInternalFocus,
onMouseEnter: onInternalMouseEnter,
onKeyDown: onKeyDown,
onKeyUp: handleKeyUp
};
}
var handleNode = /*#__PURE__*/React.createElement("div", _extendsnode_modules\rc-slider\es\Handles\Handle.js (Line 146:14 - Line 164:7), node_modules\rc-slider\lib\Handles\Handle.js (Line 156:2 - Line 174:4)
({}, positionStyle), style), styles.handle)
}, divProps, restProps));
// Customize
if (render) {
handleNode = render(handleNode, {
index: valueIndex,
prefixCls: prefixCls,
value: value,
dragging: dragging,
draggingDelete: draggingDelete
});
}
return handleNode;
});
if (process.env.NODE_ENV !== 'production') {
Handle.displayName = 'Handle';
}
exportnode_modules\motion-utils\dist\cjs\index.js (Line 5:1 - Line 25:6), node_modules\motion-utils\dist\es\array.mjs (Line 1:1 - Line 21:7)
function addUniqueItem(arr, item) {
if (arr.indexOf(item) === -1)
arr.push(item);
}
function removeItem(arr, item) {
const index = arr.indexOf(item);
if (index > -1)
arr.splice(index, 1);
}
// Adapted from array-move
function moveItem([...arr], fromIndex, toIndex) {
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
if (startIndex >= 0 && startIndex < arr.length) {
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
const [item] = arr.splice(fromIndex, 1);
arr.splice(endIndex, 0, item);
}
return arr;
}
constnode_modules\motion-utils\dist\cjs\index.js (Line 109:2 - Line 153:4), node_modules\motion-utils\dist\es\subscription-manager.mjs (Line 1:14 - Line 40:7)
;
class SubscriptionManager {
constructor() {
this.subscriptions = [];
}
add(handler) {
addUniqueItem(this.subscriptions, handler);
return () => removeItem(this.subscriptions, handler);
}
notify(a, b, c) {
const numSubscriptions = this.subscriptions.length;
if (!numSubscriptions)
return;
if (numSubscriptions === 1) {
/**
* If there's only a single handler we can just call it without invoking a loop.
*/
this.subscriptions[0](a, b, c);
}
else {
for (let i = 0; i < numSubscriptions; i++) {
/**
* Check whether the handler exists before firing as it's possible
* the subscriptions were modified during this loop running.
*/
const handler = this.subscriptions[i];
handler && handler(a, b, c);
}
}
}
getSize() {
return this.subscriptions.length;
}
clear() {
this.subscriptions.length = 0;
}
}
/**
* Converts seconds to milliseconds
*
* @param seconds - Time in seconds.
* @return milliseconds - Converted time in milliseconds.
*/node_modules\motion-utils\dist\cjs\index.js (Line 169:1 - Line 180:6), node_modules\motion-utils\dist\es\warn-once.mjs (Line 3:1 - Line 14:7)
const warned = new Set();
function hasWarned(message) {
return warned.has(message);
}
function warnOnce(condition, message, errorCode) {
if (condition || warned.has(message))
return;
console.warn(formatErrorMessage(message, errorCode));
warned.add(message);
}
constnode_modules\motion-utils\dist\cjs\index.js (Line 183:2 - Line 233:85), node_modules\motion-utils\dist\es\easing\cubic-bezier.mjs (Line 1:14 - Line 51:7)
;
/*
Bezier function generator
This has been modified from Gaëtan Renaudeau's BezierEasing
https://github.com/gre/bezier-easing/blob/master/src/index.js
https://github.com/gre/bezier-easing/blob/master/LICENSE
I've removed the newtonRaphsonIterate algo because in benchmarking it
wasn't noticeably faster than binarySubdivision, indeed removing it
usually improved times, depending on the curve.
I also removed the lookup table, as for the added bundle size and loop we're
only cutting ~4 or so subdivision iterations. I bumped the max iterations up
to 12 to compensate and this still tended to be faster for no perceivable
loss in accuracy.
Usage
const easeOut = cubicBezier(.17,.67,.83,.67);
const x = easeOut(0.5); // returns 0.627...
*/
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *
t;
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 12;
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
let currentX;
let currentT;
let i = 0;
do {
currentT = lowerBound + (upperBound - lowerBound) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - x;
if (currentX > 0.0) {
upperBound = currentT;
}
else {
lowerBound = currentT;
}
} while (Math.abs(currentX) > subdivisionPrecision &&
++i < subdivisionMaxIterations);
return currentT;
}
function cubicBezier(mX1, mY1, mX2, mY2) {
// If this is a linear gradient, return linear easing
if (mX1 === mY1 && mX2 === mY2)
return noop;
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
// If animation is at start/end, return t without easing
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}
// Accepts an easing function and returns a new one that outputs mirrored values fornode_modules\motion-utils\dist\cjs\index.js (Line 253:2 - Line 267:6), node_modules\motion-utils\dist\es\easing\steps.mjs (Line 1:15 - Line 15:7)
;
function steps(numSteps, direction = "end") {
return (progress) => {
progress =
direction === "end"
? Math.min(progress, 0.999)
: Math.max(progress, 0.001);
const expanded = progress * numSteps;
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
return clamp(0, 1, rounded / numSteps);
};
}
constnode_modules\motion-utils\dist\cjs\index.js (Line 275:9 - Line 296:8), node_modules\motion-utils\dist\es\easing\utils\map.mjs (Line 8:29 - Line 29:10)
;
const easingLookup = {
linear: noop,
easeIn,
easeInOut,
easeOut,
circIn,
circInOut,
circOut,
backIn,
backInOut,
backOut,
anticipate,
};
const isValidEasing = (easing) => {
return typeof easing === "string";
};
const easingDefinitionToFunction = (definition) => {
if (isBezierDefinition(definition)) {
// If cubic bezier definition, create bezier curve
exportsnode_modules\jwt-decode\build\cjs\index.js (Line 7:1 - Line 38:9), node_modules\jwt-decode\build\esm\index.js (Line 3:1 - Line 34:7)
InvalidTokenError.prototype.name = "InvalidTokenError";
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {
let code = p.charCodeAt(0).toString(16).toUpperCase();
if (code.length < 2) {
code = "0" + code;
}
return "%" + code;
}));
}
function base64UrlDecode(str) {
let output = str.replace(/-/g, "+").replace(/_/g, "/");
switch (output.length % 4) {
case 0:
break;
case 2:
output += "==";
break;
case 3:
output += "=";
break;
default:
throw new Error("base64 string is not of the correct length");
}
try {
return b64DecodeUnicode(output);
}
catch (err) {
return atob(output);
}
}
functionnode_modules\jwt-decode\build\cjs\index.js (Line 38:1 - Line 61:2), node_modules\jwt-decode\build\esm\index.js (Line 34:2 - Line 57:2)
function jwtDecode(token, options) {
if (typeof token !== "string") {
throw new InvalidTokenError("Invalid token specified: must be a string");
}
options || (options = {});
const pos = options.header === true ? 0 : 1;
const part = token.split(".")[pos];
if (typeof part !== "string") {
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
}
let decoded;
try {
decoded = base64UrlDecode(part);
}
catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
}
try {
return JSON.parse(decoded);
}
catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
}
}node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 89:11 - Line 101:11), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 19:8 - Line 31:8)
();
assert.equal(actual, expected);
});
it('should return false if the prop is absent', () => {
const code = '<div />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const expected = false;
const actual = hasAnyPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 125:13 - Line 137:11), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 31:5 - Line 43:8)
);
assert.equal(actual, expected);
});
it('should return true if the prop exists', () => {
const code = '<div id="foo" />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const expected = true;
const actual = hasAnyPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 161:11 - Line 176:11), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 43:8 - Line 58:8)
(props, prop);
assert.equal(actual, expected);
});
it('should return true if the prop may exist in spread loose mode', () => {
const code = '<div {...props} />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const options = {
spreadStrict: false,
};
const expected = true;
const actual = hasAnyPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 191:11 - Line 206:11), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 58:8 - Line 73:8)
(props, prop, options);
assert.equal(actual, expected);
});
it('should return false if the prop is considered absent in case-sensitive mode', () => {
const code = '<div ID="foo" />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const options = {
ignoreCase: false,
};
const expected = false;
const actual = hasAnyPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 237:13 - Line 249:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 19:8 - Line 31:8)
();
assert.equal(actual, expected);
});
it('should return false if the prop is absent', () => {
const code = '<div />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const expected = false;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 261:13 - Line 273:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 101:5 - Line 113:11)
);
assert.equal(actual, expected);
});
it('should return false if all props are absent in array', () => {
const code = '<div />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const propsToCheck = ['id', 'className'];
const expected = false;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 267:10 - Line 278:72), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 255:19 - Line 266:55)
;
const node = getOpeningElement(code);
const { attributes: props } = node;
const propsToCheck = ['id', 'className'];
const expected = false;
const actual = hasEveryProp(props, propsToCheck);
assert.equal(actual, expected);
});
it('should return false if any props are absent in space delimited string'node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 285:13 - Line 297:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 113:11 - Line 125:11)
(props, propsToCheck);
assert.equal(actual, expected);
});
it('should return false if all props are absent in space delimited string', () => {
const code = '<div />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const propsToCheck = 'id className';
const expected = false;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 291:10 - Line 302:40), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 279:19 - Line 290:72)
;
const node = getOpeningElement(code);
const { attributes: props } = node;
const propsToCheck = 'id className';
const expected = false;
const actual = hasEveryProp(props, propsToCheck);
assert.equal(actual, expected);
});
it('should return true if the prop exists'node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 297:13 - Line 309:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 125:11 - Line 43:8)
(props, propsToCheck);
assert.equal(actual, expected);
});
it('should return true if the prop exists', () => {
const code = '<div id="foo" />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const expected = true;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 338:65 - Line 348:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 48:64 - Line 58:8)
, () => {
const code = '<div {...props} />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const options = {
spreadStrict: false,
};
const expected = true;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 353:65 - Line 363:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 181:64 - Line 191:11)
, () => {
const code = '<div {...props} />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = ['id', 'className'];
const options = {
spreadStrict: false,
};
const expected = true;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 363:13 - Line 378:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 58:8 - Line 73:8)
(props, prop, options);
assert.equal(actual, expected);
});
it('should return false if the prop is considered absent in case-sensitive mode', () => {
const code = '<div ID="foo" />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const options = {
ignoreCase: false,
};
const expected = false;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 378:13 - Line 393:13), node_modules\jsx-ast-utils\__tests__\src\hasProp-test.js (Line 206:11 - Line 221:11)
(props, prop, options);
assert.equal(actual, expected);
});
it('should return false if all props are considered absent in case-sensitive mode', () => {
const code = '<div ID="foo" />';
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = ['id', 'iD', 'className'];
const options = {
ignoreCase: false,
};
const expected = false;
const actual = hasEveryPropnode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 30:73 - Line 46:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 31:73 - Line 47:13)
, () => {
const prop = {
type: 'JSXAttribute',
value: {
type: 'JSXExpressionContainer',
},
};
let counter = 0;
// eslint-disable-next-line no-console
const errorOrig = console.error;
// eslint-disable-next-line no-console
console.error = () => {
counter += 1;
};
let value;
assert.doesNotThrow(() => {
value = getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 46:20 - Line 60:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 47:13 - Line 61:13)
(prop);
}, Error);
assert.equal(null, value);
assert.equal(counter, 1);
// eslint-disable-next-line no-console
console.error = errorOrig;
});
describe('Null', () => {
it('should return true when no value is given', () => {
const prop = extractProp('<div foo />');
const expected = true;
const actual = getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 60:20 - Line 71:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 61:13 - Line 72:13)
(prop);
assert.equal(actual, expected);
});
});
describe('Literal', () => {
it('should return correct string if value is a string', () => {
const prop = extractProp('<div foo="bar" />');
const expected = 'bar';
const actual = getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 165:20 - Line 176:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 202:13 - Line 213:13)
(prop);
assert.equal(actual, expected);
});
});
describe('Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 185:20 - Line 196:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 240:13 - Line 251:13)
(prop);
assert.equal(actual, expected);
});
});
describe('Tagged Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={noop`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 269:20 - Line 281:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 404:13 - Line 416:13)
(prop);
assert.equal(actual, expected);
});
});
describe('Unary expression', () => {
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-bar} />');
// -"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 355:20 - Line 367:20), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 490:13 - Line 502:13)
(prop);
assert.equal(actual, expected);
});
});
describe('Update expression', () => {
it('should correctly evaluate an expression that prefixes with ++', () => {
const prop = extractProp('<div foo={++bar} />');
// ++"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValuenode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 452:20 - Line 462:2), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 841:13 - Line 851:2)
(prop);
assert.deepEqual(actual, expected);
});
});
describe('Array expression', () => {
it('should evaluate to correct representation of the the array in props', () => {
const prop = extractProp('<div foo={["bar", 42, null]} />');
const expected = ['bar', 42]node_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 483:20 - Line 497:5), node_modules\jsx-ast-utils\__tests__\src\getPropValue-flowparser-test.js (Line 915:13 - Line 929:6)
(prop);
assert.deepEqual(actual, expected);
});
});
describeIfNotBabylon('Typescript', () => {
beforeEach(() => {
changePlugins((pls) => [...pls, 'typescript']);
});
it('should return string representation of variable identifier wrapped in a Typescript non-null assertion', () => {
const prop = extractProp('<div foo={bar!} />');
const expected = nullnode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-babelparser-test.js (Line 15:8 - Line 172:21), node_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 14:7 - Line 171:9)
);
});
it('should export a function', () => {
const expected = 'function';
const actual = typeof getLiteralPropValue;
assert.equal(actual, expected);
});
it('should return undefined when not provided with a JSXAttribute', () => {
const expected = undefined;
const actual = getLiteralPropValue(1);
assert.equal(actual, expected);
});
it('should not throw error when trying to get value from unknown node type', () => {
const prop = {
type: 'JSXAttribute',
value: {
type: 'JSXExpressionContainer',
},
};
let counter = 0;
// eslint-disable-next-line no-console
const errorOrig = console.error;
// eslint-disable-next-line no-console
console.error = () => {
counter += 1;
};
let value;
assert.doesNotThrow(() => {
value = getLiteralPropValue(prop);
}, Error);
assert.equal(null, value);
assert.equal(counter, 1);
// eslint-disable-next-line no-console
console.error = errorOrig;
});
describe('Null', () => {
it('should return true when no value is given', () => {
const prop = extractProp('<div foo />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Literal', () => {
it('should return correct string if value is a string', () => {
const prop = extractProp('<div foo="bar" />');
const expected = 'bar';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct string if value is a string expression', () => {
const prop = extractProp('<div foo={"bar"} />');
const expected = 'bar';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct integer if value is a integer expression', () => {
const prop = extractProp('<div foo={1} />');
const expected = 1;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "true" to boolean type', () => {
const prop = extractProp('<div foo="true" />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "TrUE" to boolean type', () => {
const prop = extractProp('<div foo="TrUE" />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "false" to boolean type', () => {
const prop = extractProp('<div foo="false" />');
const expected = false;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "FaLsE" to boolean type', () => {
const prop = extractProp('<div foo="FaLsE" />');
const expected = false;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return String null when value is null', () => {
const prop = extractProp('<div foo={null} />');
const expected = 'null';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('JSXElement', () => {
it('should return null', () => {
const prop = extractProp('<div foo={<bar />} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Identifier', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when identifier is literally `undefined`', () => {
const prop = extractProp('<div foo={undefined} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describeIfNotBabylonnode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-babelparser-test.js (Line 176:5 - Line 494:5), node_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 164:10 - Line 482:7)
;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Tagged Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={noop`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={noop`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Arrow function expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ () => { return "bar"; }} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Function expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ function() { return "bar"; } } />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Logical expression', () => {
it('should return null for && operator', () => {
const prop = extractProp('<div foo={bar && baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return null for || operator', () => {
const prop = extractProp('<div foo={bar || baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Member expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar.baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Call expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar()} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Unary expression', () => {
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-bar} />');
// -"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-42} />');
const expected = -42;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+bar} />');
// +"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+42} />');
const expected = 42;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with !', () => {
const prop = extractProp('<div foo={!bar} />');
const expected = false; // !"bar" === false
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with ~', () => {
const prop = extractProp('<div foo={~bar} />');
const expected = -1; // ~"bar" === -1
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return true when evaluating `delete foo`', () => {
const prop = extractProp('<div foo={delete x} />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when evaluating `void foo`', () => {
const prop = extractProp('<div foo={void x} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
// TODO: We should fix this to check to see if we can evaluate it.
it('should return undefined when evaluating `typeof foo`', () => {
const prop = extractProp('<div foo={typeof x} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Update expression', () => {
it('should correctly evaluate an expression that prefixes with ++', () => {
const prop = extractProp('<div foo={++bar} />');
// ++"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with --', () => {
const prop = extractProp('<div foo={--bar} />');
// --"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with ++', () => {
const prop = extractProp('<div foo={bar++} />');
// "bar"++ => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with --', () => {
const prop = extractProp('<div foo={bar--} />');
// "bar"-- => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
});
describe('This expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={this} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Conditional expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar ? baz : bam} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Binary expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={1 == "1"} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Object expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ { bar: "baz" } } />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('New expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={new Bar()} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('Array expression', () => {
it('should evaluate to correct representation of the the array in props', () => {
const prop = extractProp('<div foo={["bar", 42, null]} />');
const expected = ['bar', 42];
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
it('should return an empty array provided an empty array in props', () => {
const prop = extractProp('<div foo={[]} />');
const expected = [];
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
describe('Bind expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={::this.handleClick} />');
const expected = nullnode_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-babelparser-test.js (Line 509:5 - Line 549:3), node_modules\jsx-ast-utils\__tests__\src\getPropLiteralValue-flowparser-test.js (Line 482:7 - Line 521:2)
;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describeIfNotBabylon('Typescript', () => {
beforeEach(() => {
changePlugins((pls) => [...pls, 'typescript']);
});
it('should return string representation of variable identifier wrapped in a Typescript non-null assertion', () => {
const prop = extractProp('<div foo={bar!} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a deep Typescript non-null assertion', () => {
const prop = extractProp('<div foo={(bar!)!} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a Typescript type coercion', () => {
changePlugins((pls) => [...pls, 'typescript']);
const prop = extractProp('<div foo={bar as any} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
itnode_modules\jsx-ast-utils\__tests__\src\getProp-test.js (Line 115:21 - Line 126:51), node_modules\jsx-ast-utils\__tests__\src\getProp-test.js (Line 25:10 - Line 36:62)
;
const node = getOpeningElement(code);
const { attributes: props } = node;
const prop = 'id';
const expected = undefined;
const actual = getProp(props, prop);
assert.equal(actual, expected);
});
it('should not crash if the spread contains a spread'node_modules\jsx-ast-utils\lib\values\index.js (Line 1:1 - Line 9:9), node_modules\jsx-ast-utils\lib\values\expressions\index.js (Line 1:1 - Line 9:8)
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = getValuenode_modules\js-yaml\lib\type\pairs.js (Line 31:2 - Line 41:5), node_modules\js-yaml\lib\type\pairs.js (Line 8:5 - Line 18:3)
;
var index, length, pair, keys, result,
object = data;
result = new Array(object.length);
for (index = 0, length = object.length; index < length; index += 1) {
pair = object[index];
keysnode_modules\js-yaml\lib\type\binary.js (Line 95:2 - Line 100:5), node_modules\js-yaml\lib\type\binary.js (Line 81:4 - Line 88:5)
) {
result += map[(bits >> 18) & 0x3F];
result += map[(bits >> 12) & 0x3F];
result += map[(bits >> 6) & 0x3F];
result += map[bits & 0x3F];
} elsenode_modules\has-tostringtag\test\shams\core-js.js (Line 8:12 - Line 21:20), node_modules\has-tostringtag\test\shams\get-own-property-symbols.js (Line 8:2 - Line 22:27)
, 'symbol');
t.end();
});
// @ts-expect-error CJS has top-level return
return;
}
var hasSymbolToStringTag = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
// @ts-expect-error no types defined
require('core-js/fn/symbol'node_modules\has-symbols\test\shams\get-own-property-symbols.js (Line 1:1 - Line 11:73), node_modules\has-tostringtag\test\shams\get-own-property-symbols.js (Line 1:1 - Line 11:45)
'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
test('has native Symbol support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol(), 'symbol');
t.end();
});
// @ts-expect-error TS is stupid and doesn't know about top level returnnode_modules\has-symbols\test\shams\core-js.js (Line 1:1 - Line 20:20), node_modules\has-tostringtag\test\shams\get-own-property-symbols.js (Line 1:1 - Line 21:27)
'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
test('has native Symbol support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol(), 'symbol');
t.end();
});
// @ts-expect-error TS is stupid and doesn't know about top level return
return;
}
var hasSymbols = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
require('core-js/fn/symbol'node_modules\goober\src\__tests__\integrations.test.js (Line 196:5 - Line 215:7), node_modules\goober\src\__tests__\integrations.test.js (Line 138:5 - Line 156:6)
];
setup(h, undefined, undefined, (props) => {
for (let prop in props) {
if (list.indexOf(prop) !== -1) {
delete props[prop];
}
}
});
const target = document.createElement('div');
const Base = styled('div')(({ p = 0, m }) => [
{
color: 'white',
padding: p + 'em'
},
m != null && { margin: m + 'em' }
]);
rendernode_modules\framer-motion\dist\cjs\mini.js (Line 31:2 - Line 68:10), node_modules\framer-motion\dist\es\animation\animators\waapi\animate-elements.mjs (Line 7:5 - Line 44:19)
invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements");
/**
* WAAPI doesn't support interrupting animations.
*
* Therefore, starting animations requires a three-step process:
* 1. Stop existing animations (write styles to DOM)
* 2. Resolve keyframes (read styles from DOM)
* 3. Create new animations (write styles to DOM)
*
* The hybrid `animate()` function uses AsyncAnimation to resolve
* keyframes before creating new animations, which removes style
* thrashing. Here, we have much stricter filesize constraints.
* Therefore we do this in a synchronous way that ensures that
* at least within `animate()` calls there is no style thrashing.
*
* In the motion-native-animate-mini-interrupt benchmark this
* was 80% faster than a single loop.
*/
const animationDefinitions = [];
/**
* Step 1: Build options and stop existing animations (write)
*/
for (let i = 0; i < numElements; i++) {
const element = elements[i];
const elementTransition = { ...options };
/**
* Resolve stagger function if provided.
*/
if (typeof elementTransition.delay === "function") {
elementTransition.delay = elementTransition.delay(i, numElements);
}
for (const valueName in keyframes) {
let valueKeyframes = keyframes[valueName];
if (!Array.isArray(valueKeyframes)) {
valueKeyframes = [valueKeyframes];
}
const valueOptions = {
...motionDomnode_modules\framer-motion\dist\cjs\mini.js (Line 77:2 - Line 100:10), node_modules\framer-motion\dist\es\animation\animators\waapi\animate-elements.mjs (Line 53:2 - Line 76:17)
animationMapKey(valueName, valueOptions.pseudoElement || "");
const currentAnimation = map.get(key);
currentAnimation && currentAnimation.stop();
animationDefinitions.push({
map,
key,
unresolvedKeyframes: valueKeyframes,
options: {
...valueOptions,
element,
name: valueName,
allowFlatten: !elementTransition.type && !elementTransition.ease,
},
});
}
}
/**
* Step 2: Resolve keyframes (read)
*/
for (let i = 0; i < animationDefinitions.length; i++) {
const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];
const { element, name, pseudoElement } = animationOptions;
if (!pseudoElement && unresolvedKeyframes[0] === null) {
unresolvedKeyframes[0] = motionDomnode_modules\framer-motion\dist\cjs\mini.js (Line 111:2 - Line 121:10), node_modules\framer-motion\dist\es\animation\animators\waapi\animate-elements.mjs (Line 87:2 - Line 97:16)
getComputedStyle(element, name));
}
animationOptions.keyframes = unresolvedKeyframes;
}
/**
* Step 3: Create new animations (write)
*/
const animations = [];
for (let i = 0; i < animationDefinitions.length; i++) {
const { map, key, options: animationOptions } = animationDefinitions[i];
const animation = new motionDomnode_modules\framer-motion\dist\cjs\mini.js (Line 134:2 - Line 148:8), node_modules\framer-motion\dist\es\animation\hooks\use-animate-style.mjs (Line 3:39 - Line 17:7)
;
function useAnimateMini() {
const scope = useConstant(() => ({
current: null, // Will be hydrated by React
animations: [],
}));
const animate = useConstant(() => createScopedWaapiAnimate(scope));
useUnmountEffect(() => {
scope.animations.forEach((animation) => animation.stop());
});
return [scope, animate];
}
exportsnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 14:2 - Line 27:9), node_modules\framer-motion\dist\es\animation\animate\resolve-subjects.mjs (Line 6:2 - Line 19:7)
resolveElements(subject, scope, selectorCache);
}
else if (subject instanceof NodeList) {
return Array.from(subject);
}
else if (Array.isArray(subject)) {
return subject;
}
else {
return [subject];
}
}
functionnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 31:1 - Line 53:9), node_modules\framer-motion\dist\es\animation\sequence\utils\calc-time.mjs (Line 1:1 - Line 23:7)
/**
* Given a absolute or relative time definition and current/prev time state of the sequence,
* calculate an absolute time for the next keyframes.
*/
function calcNextTime(current, next, prev, labels) {
if (typeof next === "number") {
return next;
}
else if (next.startsWith("-") || next.startsWith("+")) {
return Math.max(0, current + parseFloat(next));
}
else if (next === "<") {
return prev;
}
else if (next.startsWith("<")) {
return Math.max(0, prev + parseFloat(next.slice(1)));
}
else {
return labels.get(next) ?? current;
}
}
functionnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 57:2 - Line 73:10), node_modules\framer-motion\dist\es\animation\sequence\utils\edit.mjs (Line 8:13 - Line 24:10)
removeItem(sequence, keyframe);
// If we remove this item we have to push the pointer back one
i--;
}
}
}
function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {
/**
* Erase every existing value between currentTime and targetTime,
* this will essentially splice this timeline into any currently
* defined ones.
*/
eraseKeyframes(sequence, startTime, endTime);
for (let i = 0; i < keyframes.length; i++) {
sequence.push({
value: keyframes[i],
at: motionDomnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 91:1 - Line 104:6), node_modules\framer-motion\dist\es\animation\sequence\utils\sort.mjs (Line 1:1 - Line 14:7)
function compareByTime(a, b) {
if (a.at === b.at) {
if (a.value === null)
return 1;
if (b.value === null)
return -1;
return 0;
}
else {
return a.at - b.at;
}
}
constnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 104:1 - Line 148:10), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 10:1 - Line 54:14)
const defaultSegmentEasing = "easeInOut";
const MAX_REPEAT = 20;
function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {
const defaultDuration = defaultTransition.duration || 0.3;
const animationDefinitions = new Map();
const sequences = new Map();
const elementCache = {};
const timeLabels = new Map();
let prevTime = 0;
let currentTime = 0;
let totalDuration = 0;
/**
* Build the timeline by mapping over the sequence array and converting
* the definitions into keyframes and offsets with absolute time values.
* These will later get converted into relative offsets in a second pass.
*/
for (let i = 0; i < sequence.length; i++) {
const segment = sequence[i];
/**
* If this is a timeline label, mark it and skip the rest of this iteration.
*/
if (typeof segment === "string") {
timeLabels.set(segment, currentTime);
continue;
}
else if (!Array.isArray(segment)) {
timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));
continue;
}
let [subject, keyframes, transition = {}] = segment;
/**
* If a relative or absolute time value has been specified we need to resolve
* it in relation to the currentTime.
*/
if (transition.at !== undefined) {
currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);
}
/**
* Keep track of the maximum duration in this definition. This will be
* applied to currentTime once the definition has been parsed.
*/
let maxDuration = 0;
const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {
const valueKeyframesAsList = keyframesAsList(valueKeyframes);
const { delay = 0, times = motionDomnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 148:2 - Line 160:10), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 54:2 - Line 66:12)
defaultOffset(valueKeyframesAsList), type = "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;
let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition;
/**
* Resolve stagger() if defined.
*/
const calculatedDelay = typeof delay === "function"
? delay(elementIndex, numSubjects)
: delay;
/**
* If this animation should and can use a spring, generate a spring easing function.
*/
const numKeyframes = valueKeyframesAsList.length;
const createGenerator = motionDomnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 160:2 - Line 178:12), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 66:2 - Line 84:22)
isGenerator(type)
? type
: generators?.[type || "keyframes"];
if (numKeyframes <= 2 && createGenerator) {
/**
* As we're creating an easing function from a spring,
* ideally we want to generate it using the real distance
* between the two keyframes. However this isn't always
* possible - in these situations we use 0-100.
*/
let absoluteDelta = 100;
if (numKeyframes === 2 &&
isNumberKeyframesArray(valueKeyframesAsList)) {
const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];
absoluteDelta = Math.abs(delta);
}
const springTransition = { ...remainingTransition };
if (duration !== undefined) {
springTransition.duration = motionUtilsnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 180:2 - Line 196:10), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 86:2 - Line 102:11)
createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
ease = springEasing.ease;
duration = springEasing.duration;
}
duration ?? (duration = defaultDuration);
const startTime = currentTime + calculatedDelay;
/**
* If there's only one time offset of 0, fill in a second with length 1
*/
if (times.length === 1 && times[0] === 0) {
times[1] = 1;
}
/**
* Fill out if offset if fewer offsets than keyframes
*/
const remainder = times.length - valueKeyframesAsList.length;
remainder > 0 && motionDomnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 208:2 - Line 220:12), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 114:17 - Line 126:20)
invariant(repeat < MAX_REPEAT, "Repeat count too high, must be less than 20", "repeat-count-high");
duration = calculateRepeatDuration(duration, repeat);
const originalKeyframes = [...valueKeyframesAsList];
const originalTimes = [...times];
ease = Array.isArray(ease) ? [...ease] : [ease];
const originalEase = [...ease];
for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {
valueKeyframesAsList.push(...originalKeyframes);
for (let keyframeIndex = 0; keyframeIndex < originalKeyframes.length; keyframeIndex++) {
times.push(originalTimes[keyframeIndex] + (repeatIndex + 1));
ease.push(keyframeIndex === 0
? "linear"
: motionUtilsnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 220:2 - Line 233:10), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 126:2 - Line 139:14)
getEasingForSegment(originalEase, keyframeIndex - 1));
}
}
normalizeTimes(times, repeat);
}
const targetTime = startTime + duration;
/**
* Add keyframes, mapping offsets to absolute time.
*/
addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);
maxDuration = Math.max(calculatedDelay + duration, maxDuration);
totalDuration = Math.max(targetTime, totalDuration);
};
if (motionDomnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 233:2 - Line 279:12), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 139:2 - Line 185:9)
isMotionValue(subject)) {
const subjectSequence = getSubjectSequence(subject, sequences);
resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence));
}
else {
const subjects = resolveSubjects(subject, keyframes, scope, elementCache);
const numSubjects = subjects.length;
/**
* For every element in this segment, process the defined values.
*/
for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {
/**
* Cast necessary, but we know these are of this type
*/
keyframes = keyframes;
transition = transition;
const thisSubject = subjects[subjectIndex];
const subjectSequence = getSubjectSequence(thisSubject, sequences);
for (const key in keyframes) {
resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);
}
}
}
prevTime = currentTime;
currentTime += maxDuration;
}
/**
* For every element and value combination create a new animation.
*/
sequences.forEach((valueSequences, element) => {
for (const key in valueSequences) {
const valueSequence = valueSequences[key];
/**
* Arrange all the keyframes in ascending time order.
*/
valueSequence.sort(compareByTime);
const keyframes = [];
const valueOffset = [];
const valueEasing = [];
/**
* For each keyframe, translate absolute times into
* relative offsets based on the total duration of the timeline.
*/
for (let i = 0; i < valueSequence.length; i++) {
const { at, value, easing } = valueSequence[i];
keyframes.push(value);
valueOffset.push(motionUtilsnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 279:2 - Line 343:9), node_modules\framer-motion\dist\es\animation\sequence\create.mjs (Line 185:2 - Line 249:7)
progress(0, totalDuration, at));
valueEasing.push(easing || "easeOut");
}
/**
* If the first keyframe doesn't land on offset: 0
* provide one by duplicating the initial keyframe. This ensures
* it snaps to the first keyframe when the animation starts.
*/
if (valueOffset[0] !== 0) {
valueOffset.unshift(0);
keyframes.unshift(keyframes[0]);
valueEasing.unshift(defaultSegmentEasing);
}
/**
* If the last keyframe doesn't land on offset: 1
* provide one with a null wildcard value. This will ensure it
* stays static until the end of the animation.
*/
if (valueOffset[valueOffset.length - 1] !== 1) {
valueOffset.push(1);
keyframes.push(null);
}
if (!animationDefinitions.has(element)) {
animationDefinitions.set(element, {
keyframes: {},
transition: {},
});
}
const definition = animationDefinitions.get(element);
definition.keyframes[key] = keyframes;
definition.transition[key] = {
...defaultTransition,
duration: totalDuration,
ease: valueEasing,
times: valueOffset,
...sequenceTransition,
};
}
});
return animationDefinitions;
}
function getSubjectSequence(subject, sequences) {
!sequences.has(subject) && sequences.set(subject, {});
return sequences.get(subject);
}
function getValueSequence(name, sequences) {
if (!sequences[name])
sequences[name] = [];
return sequences[name];
}
function keyframesAsList(keyframes) {
return Array.isArray(keyframes) ? keyframes : [keyframes];
}
function getValueTransition(transition, key) {
return transition && transition[key]
? {
...transition,
...transition[key],
}
: { ...transition };
}
const isNumber = (keyframe) => typeof keyframe === "number";
const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);
functionnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 343:1 - Line 444:9), node_modules\framer-motion\dist\cjs\mini.js (Line 28:1 - Line 129:6)
function animateElements(elementOrSelector, keyframes, options, scope) {
const elements = motionDom.resolveElements(elementOrSelector, scope);
const numElements = elements.length;
motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements");
/**
* WAAPI doesn't support interrupting animations.
*
* Therefore, starting animations requires a three-step process:
* 1. Stop existing animations (write styles to DOM)
* 2. Resolve keyframes (read styles from DOM)
* 3. Create new animations (write styles to DOM)
*
* The hybrid `animate()` function uses AsyncAnimation to resolve
* keyframes before creating new animations, which removes style
* thrashing. Here, we have much stricter filesize constraints.
* Therefore we do this in a synchronous way that ensures that
* at least within `animate()` calls there is no style thrashing.
*
* In the motion-native-animate-mini-interrupt benchmark this
* was 80% faster than a single loop.
*/
const animationDefinitions = [];
/**
* Step 1: Build options and stop existing animations (write)
*/
for (let i = 0; i < numElements; i++) {
const element = elements[i];
const elementTransition = { ...options };
/**
* Resolve stagger function if provided.
*/
if (typeof elementTransition.delay === "function") {
elementTransition.delay = elementTransition.delay(i, numElements);
}
for (const valueName in keyframes) {
let valueKeyframes = keyframes[valueName];
if (!Array.isArray(valueKeyframes)) {
valueKeyframes = [valueKeyframes];
}
const valueOptions = {
...motionDom.getValueTransition(elementTransition, valueName),
};
valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration));
valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay));
/**
* If there's an existing animation playing on this element then stop it
* before creating a new one.
*/
const map = motionDom.getAnimationMap(element);
const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || "");
const currentAnimation = map.get(key);
currentAnimation && currentAnimation.stop();
animationDefinitions.push({
map,
key,
unresolvedKeyframes: valueKeyframes,
options: {
...valueOptions,
element,
name: valueName,
allowFlatten: !elementTransition.type && !elementTransition.ease,
},
});
}
}
/**
* Step 2: Resolve keyframes (read)
*/
for (let i = 0; i < animationDefinitions.length; i++) {
const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];
const { element, name, pseudoElement } = animationOptions;
if (!pseudoElement && unresolvedKeyframes[0] === null) {
unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name);
}
motionDom.fillWildcards(unresolvedKeyframes);
motionDom.applyPxDefaults(unresolvedKeyframes, name);
/**
* If we only have one keyframe, explicitly read the initial keyframe
* from the computed style. This is to ensure consistency with WAAPI behaviour
* for restarting animations, for instance .play() after finish, when it
* has one vs two keyframes.
*/
if (!pseudoElement && unresolvedKeyframes.length < 2) {
unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name));
}
animationOptions.keyframes = unresolvedKeyframes;
}
/**
* Step 3: Create new animations (write)
*/
const animations = [];
for (let i = 0; i < animationDefinitions.length; i++) {
const { map, key, options: animationOptions } = animationDefinitions[i];
const animation = new motionDom.NativeAnimation(animationOptions);
map.set(key, animation);
animation.finished.finally(() => map.delete(key));
animations.push(animation);
}
return animations;
}
functionnode_modules\framer-motion\dist\cjs\dom-mini.js (Line 444:1 - Line 449:10), node_modules\framer-motion\dist\es\animation\animators\waapi\animate-sequence.mjs (Line 5:1 - Line 10:23)
function animateSequence(definition, options) {
const animations = [];
createAnimationsFromSequence(definition, options).forEach(({ keyframes, transition }, element) => {
animations.push(...animateElements(element, keyframes, transition));
});
return new motionDomnode_modules\framer-motion\dist\cjs\client.js (Line 15:1 - Line 205:8), node_modules\framer-motion\dist\es\render\components\motion\elements.mjs (Line 4:1 - Line 194:7)
/**
* HTML components
*/
const MotionA = /*@__PURE__*/ createMotionComponentWithFeatures("a");
const MotionAbbr = /*@__PURE__*/ createMotionComponentWithFeatures("abbr");
const MotionAddress = /*@__PURE__*/ createMotionComponentWithFeatures("address");
const MotionArea = /*@__PURE__*/ createMotionComponentWithFeatures("area");
const MotionArticle = /*@__PURE__*/ createMotionComponentWithFeatures("article");
const MotionAside = /*@__PURE__*/ createMotionComponentWithFeatures("aside");
const MotionAudio = /*@__PURE__*/ createMotionComponentWithFeatures("audio");
const MotionB = /*@__PURE__*/ createMotionComponentWithFeatures("b");
const MotionBase = /*@__PURE__*/ createMotionComponentWithFeatures("base");
const MotionBdi = /*@__PURE__*/ createMotionComponentWithFeatures("bdi");
const MotionBdo = /*@__PURE__*/ createMotionComponentWithFeatures("bdo");
const MotionBig = /*@__PURE__*/ createMotionComponentWithFeatures("big");
const MotionBlockquote =
/*@__PURE__*/ createMotionComponentWithFeatures("blockquote");
const MotionBody = /*@__PURE__*/ createMotionComponentWithFeatures("body");
const MotionButton = /*@__PURE__*/ createMotionComponentWithFeatures("button");
const MotionCanvas = /*@__PURE__*/ createMotionComponentWithFeatures("canvas");
const MotionCaption = /*@__PURE__*/ createMotionComponentWithFeatures("caption");
const MotionCite = /*@__PURE__*/ createMotionComponentWithFeatures("cite");
const MotionCode = /*@__PURE__*/ createMotionComponentWithFeatures("code");
const MotionCol = /*@__PURE__*/ createMotionComponentWithFeatures("col");
const MotionColgroup = /*@__PURE__*/ createMotionComponentWithFeatures("colgroup");
const MotionData = /*@__PURE__*/ createMotionComponentWithFeatures("data");
const MotionDatalist = /*@__PURE__*/ createMotionComponentWithFeatures("datalist");
const MotionDd = /*@__PURE__*/ createMotionComponentWithFeatures("dd");
const MotionDel = /*@__PURE__*/ createMotionComponentWithFeatures("del");
const MotionDetails = /*@__PURE__*/ createMotionComponentWithFeatures("details");
const MotionDfn = /*@__PURE__*/ createMotionComponentWithFeatures("dfn");
const MotionDialog = /*@__PURE__*/ createMotionComponentWithFeatures("dialog");
const MotionDiv = /*@__PURE__*/ createMotionComponentWithFeatures("div");
const MotionDl = /*@__PURE__*/ createMotionComponentWithFeatures("dl");
const MotionDt = /*@__PURE__*/ createMotionComponentWithFeatures("dt");
const MotionEm = /*@__PURE__*/ createMotionComponentWithFeatures("em");
const MotionEmbed = /*@__PURE__*/ createMotionComponentWithFeatures("embed");
const MotionFieldset = /*@__PURE__*/ createMotionComponentWithFeatures("fieldset");
const MotionFigcaption =
/*@__PURE__*/ createMotionComponentWithFeatures("figcaption");
const MotionFigure = /*@__PURE__*/ createMotionComponentWithFeatures("figure");
const MotionFooter = /*@__PURE__*/ createMotionComponentWithFeatures("footer");
const MotionForm = /*@__PURE__*/ createMotionComponentWithFeatures("form");
const MotionH1 = /*@__PURE__*/ createMotionComponentWithFeatures("h1");
const MotionH2 = /*@__PURE__*/ createMotionComponentWithFeatures("h2");
const MotionH3 = /*@__PURE__*/ createMotionComponentWithFeatures("h3");
const MotionH4 = /*@__PURE__*/ createMotionComponentWithFeatures("h4");
const MotionH5 = /*@__PURE__*/ createMotionComponentWithFeatures("h5");
const MotionH6 = /*@__PURE__*/ createMotionComponentWithFeatures("h6");
const MotionHead = /*@__PURE__*/ createMotionComponentWithFeatures("head");
const MotionHeader = /*@__PURE__*/ createMotionComponentWithFeatures("header");
const MotionHgroup = /*@__PURE__*/ createMotionComponentWithFeatures("hgroup");
const MotionHr = /*@__PURE__*/ createMotionComponentWithFeatures("hr");
const MotionHtml = /*@__PURE__*/ createMotionComponentWithFeatures("html");
const MotionI = /*@__PURE__*/ createMotionComponentWithFeatures("i");
const MotionIframe = /*@__PURE__*/ createMotionComponentWithFeatures("iframe");
const MotionImg = /*@__PURE__*/ createMotionComponentWithFeatures("img");
const MotionInput = /*@__PURE__*/ createMotionComponentWithFeatures("input");
const MotionIns = /*@__PURE__*/ createMotionComponentWithFeatures("ins");
const MotionKbd = /*@__PURE__*/ createMotionComponentWithFeatures("kbd");
const MotionKeygen = /*@__PURE__*/ createMotionComponentWithFeatures("keygen");
const MotionLabel = /*@__PURE__*/ createMotionComponentWithFeatures("label");
const MotionLegend = /*@__PURE__*/ createMotionComponentWithFeatures("legend");
const MotionLi = /*@__PURE__*/ createMotionComponentWithFeatures("li");
const MotionLink = /*@__PURE__*/ createMotionComponentWithFeatures("link");
const MotionMain = /*@__PURE__*/ createMotionComponentWithFeatures("main");
const MotionMap = /*@__PURE__*/ createMotionComponentWithFeatures("map");
const MotionMark = /*@__PURE__*/ createMotionComponentWithFeatures("mark");
const MotionMenu = /*@__PURE__*/ createMotionComponentWithFeatures("menu");
const MotionMenuitem = /*@__PURE__*/ createMotionComponentWithFeatures("menuitem");
const MotionMeter = /*@__PURE__*/ createMotionComponentWithFeatures("meter");
const MotionNav = /*@__PURE__*/ createMotionComponentWithFeatures("nav");
const MotionObject = /*@__PURE__*/ createMotionComponentWithFeatures("object");
const MotionOl = /*@__PURE__*/ createMotionComponentWithFeatures("ol");
const MotionOptgroup = /*@__PURE__*/ createMotionComponentWithFeatures("optgroup");
const MotionOption = /*@__PURE__*/ createMotionComponentWithFeatures("option");
const MotionOutput = /*@__PURE__*/ createMotionComponentWithFeatures("output");
const MotionP = /*@__PURE__*/ createMotionComponentWithFeatures("p");
const MotionParam = /*@__PURE__*/ createMotionComponentWithFeatures("param");
const MotionPicture = /*@__PURE__*/ createMotionComponentWithFeatures("picture");
const MotionPre = /*@__PURE__*/ createMotionComponentWithFeatures("pre");
const MotionProgress = /*@__PURE__*/ createMotionComponentWithFeatures("progress");
const MotionQ = /*@__PURE__*/ createMotionComponentWithFeatures("q");
const MotionRp = /*@__PURE__*/ createMotionComponentWithFeatures("rp");
const MotionRt = /*@__PURE__*/ createMotionComponentWithFeatures("rt");
const MotionRuby = /*@__PURE__*/ createMotionComponentWithFeatures("ruby");
const MotionS = /*@__PURE__*/ createMotionComponentWithFeatures("s");
const MotionSamp = /*@__PURE__*/ createMotionComponentWithFeatures("samp");
const MotionScript = /*@__PURE__*/ createMotionComponentWithFeatures("script");
const MotionSection = /*@__PURE__*/ createMotionComponentWithFeatures("section");
const MotionSelect = /*@__PURE__*/ createMotionComponentWithFeatures("select");
const MotionSmall = /*@__PURE__*/ createMotionComponentWithFeatures("small");
const MotionSource = /*@__PURE__*/ createMotionComponentWithFeatures("source");
const MotionSpan = /*@__PURE__*/ createMotionComponentWithFeatures("span");
const MotionStrong = /*@__PURE__*/ createMotionComponentWithFeatures("strong");
const MotionStyle = /*@__PURE__*/ createMotionComponentWithFeatures("style");
const MotionSub = /*@__PURE__*/ createMotionComponentWithFeatures("sub");
const MotionSummary = /*@__PURE__*/ createMotionComponentWithFeatures("summary");
const MotionSup = /*@__PURE__*/ createMotionComponentWithFeatures("sup");
const MotionTable = /*@__PURE__*/ createMotionComponentWithFeatures("table");
const MotionTbody = /*@__PURE__*/ createMotionComponentWithFeatures("tbody");
const MotionTd = /*@__PURE__*/ createMotionComponentWithFeatures("td");
const MotionTextarea = /*@__PURE__*/ createMotionComponentWithFeatures("textarea");
const MotionTfoot = /*@__PURE__*/ createMotionComponentWithFeatures("tfoot");
const MotionTh = /*@__PURE__*/ createMotionComponentWithFeatures("th");
const MotionThead = /*@__PURE__*/ createMotionComponentWithFeatures("thead");
const MotionTime = /*@__PURE__*/ createMotionComponentWithFeatures("time");
const MotionTitle = /*@__PURE__*/ createMotionComponentWithFeatures("title");
const MotionTr = /*@__PURE__*/ createMotionComponentWithFeatures("tr");
const MotionTrack = /*@__PURE__*/ createMotionComponentWithFeatures("track");
const MotionU = /*@__PURE__*/ createMotionComponentWithFeatures("u");
const MotionUl = /*@__PURE__*/ createMotionComponentWithFeatures("ul");
const MotionVideo = /*@__PURE__*/ createMotionComponentWithFeatures("video");
const MotionWbr = /*@__PURE__*/ createMotionComponentWithFeatures("wbr");
const MotionWebview = /*@__PURE__*/ createMotionComponentWithFeatures("webview");
/**
* SVG components
*/
const MotionAnimate = /*@__PURE__*/ createMotionComponentWithFeatures("animate");
const MotionCircle = /*@__PURE__*/ createMotionComponentWithFeatures("circle");
const MotionDefs = /*@__PURE__*/ createMotionComponentWithFeatures("defs");
const MotionDesc = /*@__PURE__*/ createMotionComponentWithFeatures("desc");
const MotionEllipse = /*@__PURE__*/ createMotionComponentWithFeatures("ellipse");
const MotionG = /*@__PURE__*/ createMotionComponentWithFeatures("g");
const MotionImage = /*@__PURE__*/ createMotionComponentWithFeatures("image");
const MotionLine = /*@__PURE__*/ createMotionComponentWithFeatures("line");
const MotionFilter = /*@__PURE__*/ createMotionComponentWithFeatures("filter");
const MotionMarker = /*@__PURE__*/ createMotionComponentWithFeatures("marker");
const MotionMask = /*@__PURE__*/ createMotionComponentWithFeatures("mask");
const MotionMetadata = /*@__PURE__*/ createMotionComponentWithFeatures("metadata");
const MotionPath = /*@__PURE__*/ createMotionComponentWithFeatures("path");
const MotionPattern = /*@__PURE__*/ createMotionComponentWithFeatures("pattern");
const MotionPolygon = /*@__PURE__*/ createMotionComponentWithFeatures("polygon");
const MotionPolyline = /*@__PURE__*/ createMotionComponentWithFeatures("polyline");
const MotionRect = /*@__PURE__*/ createMotionComponentWithFeatures("rect");
const MotionStop = /*@__PURE__*/ createMotionComponentWithFeatures("stop");
const MotionSvg = /*@__PURE__*/ createMotionComponentWithFeatures("svg");
const MotionSymbol = /*@__PURE__*/ createMotionComponentWithFeatures("symbol");
const MotionText = /*@__PURE__*/ createMotionComponentWithFeatures("text");
const MotionTspan = /*@__PURE__*/ createMotionComponentWithFeatures("tspan");
const MotionUse = /*@__PURE__*/ createMotionComponentWithFeatures("use");
const MotionView = /*@__PURE__*/ createMotionComponentWithFeatures("view");
const MotionClipPath = /*@__PURE__*/ createMotionComponentWithFeatures("clipPath");
const MotionFeBlend = /*@__PURE__*/ createMotionComponentWithFeatures("feBlend");
const MotionFeColorMatrix =
/*@__PURE__*/ createMotionComponentWithFeatures("feColorMatrix");
const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponentWithFeatures("feComponentTransfer");
const MotionFeComposite =
/*@__PURE__*/ createMotionComponentWithFeatures("feComposite");
const MotionFeConvolveMatrix =
/*@__PURE__*/ createMotionComponentWithFeatures("feConvolveMatrix");
const MotionFeDiffuseLighting =
/*@__PURE__*/ createMotionComponentWithFeatures("feDiffuseLighting");
const MotionFeDisplacementMap =
/*@__PURE__*/ createMotionComponentWithFeatures("feDisplacementMap");
const MotionFeDistantLight =
/*@__PURE__*/ createMotionComponentWithFeatures("feDistantLight");
const MotionFeDropShadow =
/*@__PURE__*/ createMotionComponentWithFeatures("feDropShadow");
const MotionFeFlood = /*@__PURE__*/ createMotionComponentWithFeatures("feFlood");
const MotionFeFuncA = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncA");
const MotionFeFuncB = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncB");
const MotionFeFuncG = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncG");
const MotionFeFuncR = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncR");
const MotionFeGaussianBlur =
/*@__PURE__*/ createMotionComponentWithFeatures("feGaussianBlur");
const MotionFeImage = /*@__PURE__*/ createMotionComponentWithFeatures("feImage");
const MotionFeMerge = /*@__PURE__*/ createMotionComponentWithFeatures("feMerge");
const MotionFeMergeNode =
/*@__PURE__*/ createMotionComponentWithFeatures("feMergeNode");
const MotionFeMorphology =
/*@__PURE__*/ createMotionComponentWithFeatures("feMorphology");
const MotionFeOffset = /*@__PURE__*/ createMotionComponentWithFeatures("feOffset");
const MotionFePointLight =
/*@__PURE__*/ createMotionComponentWithFeatures("fePointLight");
const MotionFeSpecularLighting =
/*@__PURE__*/ createMotionComponentWithFeatures("feSpecularLighting");
const MotionFeSpotLight =
/*@__PURE__*/ createMotionComponentWithFeatures("feSpotLight");
const MotionFeTile = /*@__PURE__*/ createMotionComponentWithFeatures("feTile");
const MotionFeTurbulence =
/*@__PURE__*/ createMotionComponentWithFeatures("feTurbulence");
const MotionForeignObject =
/*@__PURE__*/ createMotionComponentWithFeatures("foreignObject");
const MotionLinearGradient =
/*@__PURE__*/ createMotionComponentWithFeatures("linearGradient");
const MotionRadialGradient =
/*@__PURE__*/ createMotionComponentWithFeatures("radialGradient");
const MotionTextPath = /*@__PURE__*/ createMotionComponentWithFeatures("textPath");
exportsnode_modules\fast-glob\out\utils\fs.js (Line 1:1 - Line 19:2), node_modules\@nodelib\fs.scandir\out\utils\fs.js (Line 1:1 - Line 19:2)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDirentFromStats = void 0;
class DirentFromStats {
constructor(name, stats) {
this.name = name;
this.isBlockDevice = stats.isBlockDevice.bind(stats);
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
this.isDirectory = stats.isDirectory.bind(stats);
this.isFIFO = stats.isFIFO.bind(stats);
this.isFile = stats.isFile.bind(stats);
this.isSocket = stats.isSocket.bind(stats);
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
}
}
function createDirentFromStats(name, stats) {
return new DirentFromStats(name, stats);
}
exports.createDirentFromStats = createDirentFromStats;node_modules\fast-glob\out\providers\stream.js (Line 22:12 - Line 31:15), node_modules\fast-glob\out\providers\sync.js (Line 14:2 - Line 23:13)
;
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderStreamnode_modules\fast-glob\out\providers\async.js (Line 14:2 - Line 23:14), node_modules\fast-glob\out\providers\sync.js (Line 14:10 - Line 23:13)
);
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderAsyncnode_modules\eslint-plugin-react\lib\rules\sort-default-props.js (Line 95:2 - Line 105:7), node_modules\eslint-plugin-react\lib\util\variable.js (Line 68:2 - Line 78:3)
getVariableFromContext(context, node, name);
if (!variable || !variable.defs[0] || !variable.defs[0].node) {
return null;
}
if (variable.defs[0].node.type === 'TypeAlias') {
return variable.defs[0].node.right;
}
returnnode_modules\eslint-plugin-react\lib\rules\sort-default-props.js (Line 137:11 - Line 151:19), node_modules\eslint-plugin-react\lib\rules\sort-prop-types.js (Line 181:11 - Line 196:13)
return prev;
}
return curr;
}, declarations[0]);
}
function checkNode(node) {
if (!node) {
return;
}
if (node.type === 'ObjectExpression') {
checkSorted(node.properties);
} else if (node.type === 'Identifier') {
const propTypesObject = findVariableByNamenode_modules\eslint-plugin-react\lib\rules\sort-comp.js (Line 174:2 - Line 200:9), node_modules\eslint-plugin-react\lib\rules\sort-comp.js (Line 26:2 - Line 52:2)
[
'displayName',
'propTypes',
'contextTypes',
'childContextTypes',
'mixins',
'statics',
'defaultProps',
'constructor',
'getDefaultProps',
'state',
'getInitialState',
'getChildContext',
'getDerivedStateFromProps',
'componentWillMount',
'UNSAFE_componentWillMount',
'componentDidMount',
'componentWillReceiveProps',
'UNSAFE_componentWillReceiveProps',
'shouldComponentUpdate',
'componentWillUpdate',
'UNSAFE_componentWillUpdate',
'getSnapshotBeforeUpdate',
'componentDidUpdate',
'componentDidCatch',
'componentWillUnmount',
'render'node_modules\eslint-plugin-react\lib\rules\require-optimization.js (Line 159:18 - Line 173:7), node_modules\eslint-plugin-react\lib\rules\static-property-placement.js (Line 104:17 - Line 122:8)
(node) {
let blockNode;
let scope = getScope(context, node);
while (scope) {
blockNode = scope.block;
if (blockNode && blockNode.type === 'ClassDeclaration') {
return true;
}
scope = scope.upper;
}
return false;
}
returnnode_modules\eslint-plugin-react\lib\rules\no-unused-class-component-methods.js (Line 50:1 - Line 79:7), node_modules\eslint-plugin-react\lib\rules\no-unused-state.js (Line 18:1 - Line 47:8)
// Descend through all wrapping TypeCastExpressions and return the expression
// that was cast.
function uncast(node) {
while (node.type === 'TypeCastExpression') {
node = node.expression;
}
return node;
}
// Return the name of an identifier or the string value of a literal. Useful
// anywhere that a literal may be used as a key (e.g., member expressions,
// method definitions, ObjectExpression property keys).
function getName(node) {
node = uncast(node);
const type = node.type;
if (type === 'Identifier') {
return node.name;
}
if (type === 'Literal') {
return String(node.value);
}
if (type === 'TemplateLiteral' && node.expressions.length === 0) {
return node.quasis[0].value.raw;
}
return null;
}
function isThisExpression(node) {
return uncastnode_modules\eslint-plugin-react\lib\rules\no-multi-comp.js (Line 37:16 - Line 48:16), node_modules\eslint-plugin-react\lib\rules\prefer-stateless-function.js (Line 46:21 - Line 57:21)
: {
default: false,
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create: Components.detect((context, components, utils) => {
const configuration = context.options[0] || {};
const ignoreStatelessnode_modules\eslint-plugin-react\lib\rules\jsx-tag-spacing.js (Line 236:2 - Line 248:2), node_modules\eslint-plugin-react\lib\rules\jsx-tag-spacing.js (Line 225:9 - Line 236:5)
) {
report(context, messages.beforeCloseNeedSpace, 'beforeCloseNeedSpace', {
node,
loc: {
start: leftToken.loc.end,
end: closingToken.loc.start,
},
fix(fixer) {
return fixer.insertTextBefore(closingToken, ' ');
},
});
}
}node_modules\eslint-plugin-react\lib\rules\jsx-space-before-closing.js (Line 77:13 - Line 84:2), node_modules\eslint-plugin-react\lib\rules\jsx-tag-spacing.js (Line 138:7 - Line 147:9)
loc: closingSlash.loc.start,
fix(fixer) {
const previousToken = sourceCode.getTokenBefore(closingSlash);
return fixer.removeRange([previousToken.range[1], closingSlash.range[0]]);
},
});
}
},node_modules\eslint-plugin-react\lib\rules\jsx-sort-props.js (Line 395:5 - Line 403:19), node_modules\eslint-plugin-react\lib\rules\jsx-sort-props.js (Line 217:3 - Line 225:7)
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
const callbacksLast = configuration.callbacksLast || false;
const shorthandFirst = configuration.shorthandFirst || false;
const shorthandLast = configuration.shorthandLast || false;
const multiline = configuration.multiline || 'ignore';
const noSortAlphabetically = configuration.noSortAlphabetically || false;
const reservedFirst = configuration.reservedFirst || false;
const reservedFirstErrornode_modules\eslint-plugin-react\lib\rules\jsx-sort-default-props.js (Line 37:25 - Line 185:8), node_modules\eslint-plugin-react\lib\rules\sort-default-props.js (Line 32:21 - Line 178:2)
),
},
// fixable: 'code',
messages,
schema: [{
type: 'object',
properties: {
ignoreCase: {
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
/**
* Get properties name
* @param {Object} node - Property.
* @returns {string} Property name.
*/
function getPropertyName(node) {
if (node.key || ['MethodDefinition', 'Property'].indexOf(node.type) !== -1) {
return node.key.name;
}
if (node.type === 'MemberExpression') {
return node.property.name;
// Special case for class properties
// (babel-eslint@5 does not expose property name so we have to rely on tokens)
}
if (node.type === 'ClassProperty') {
const tokens = getFirstTokens(context, node, 2);
return tokens[1] && tokens[1].type === 'Identifier' ? tokens[1].value : tokens[0].value;
}
return '';
}
/**
* Checks if the Identifier node passed in looks like a defaultProps declaration.
* @param {ASTNode} node The node to check. Must be an Identifier node.
* @returns {boolean} `true` if the node is a defaultProps declaration, `false` if not
*/
function isDefaultPropsDeclaration(node) {
const propName = getPropertyName(node);
return (propName === 'defaultProps' || propName === 'getDefaultProps');
}
function getKey(node) {
return getText(context, node.key || node.argument);
}
/**
* Find a variable by name in the current scope.
* @param {ASTNode} node The node to look for.
* @param {string} name Name of the variable to look for.
* @returns {ASTNode|null} Return null if the variable could not be found, ASTNode otherwise.
*/
function findVariableByName(node, name) {
const variable = variableUtil
.getVariableFromContext(context, node, name);
if (!variable || !variable.defs[0] || !variable.defs[0].node) {
return null;
}
if (variable.defs[0].node.type === 'TypeAlias') {
return variable.defs[0].node.right;
}
return variable.defs[0].node.init;
}
/**
* Checks if defaultProps declarations are sorted
* @param {Array} declarations The array of AST nodes being checked.
* @returns {void}
*/
function checkSorted(declarations) {
// function fix(fixer) {
// return propTypesSortUtil.fixPropTypesSort(context, fixer, declarations, ignoreCase);
// }
declarations.reduce((prev, curr, idx, decls) => {
if (/Spread(?:Property|Element)$/.test(curr.type)) {
return decls[idx + 1];
}
let prevPropName = getKey(prev);
let currentPropName = getKey(curr);
if (ignoreCase) {
prevPropName = prevPropName.toLowerCase();
currentPropName = currentPropName.toLowerCase();
}
if (currentPropName < prevPropName) {
report(context, messages.propsNotSorted, 'propsNotSorted', {
node: curr,
// fix
});
return prev;
}
return curr;
}, declarations[0]);
}
function checkNode(node) {
if (!node) {
return;
}
if (node.type === 'ObjectExpression') {
checkSorted(node.properties);
} else if (node.type === 'Identifier') {
const propTypesObject = findVariableByName(node, node.name);
if (propTypesObject && propTypesObject.properties) {
checkSorted(propTypesObject.properties);
}
}
}
// --------------------------------------------------------------------------
// Public API
// --------------------------------------------------------------------------
return {
'ClassProperty, PropertyDefinition'(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode(node.value);
},
MemberExpression(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode('right' in node.parent && node.parent.right);
},
Programnode_modules\eslint-plugin-react\lib\rules\jsx-no-target-blank.js (Line 251:15 - Line 266:3), node_modules\eslint-plugin-react\lib\rules\jsx-no-target-blank.js (Line 188:15 - Line 199:6)
.has(node.name.name)) {
if (!attributeValuePossiblyBlank(node.attributes[targetIndex])) {
const hasSpread = spreadAttributeIndex >= 0;
if (warnOnSpreadAttributes && hasSpread) {
// continue to check below
} else if (
(hasSpread && targetIndex < spreadAttributeIndex)
|| !hasSpread
|| !warnOnSpreadAttributes
) {
return;
}
}
ifnode_modules\eslint-plugin-react\lib\rules\jsx-no-duplicate-props.js (Line 30:5 - Line 47:7), node_modules\eslint-plugin-react\lib\rules\sort-default-props.js (Line 36:5 - Line 57:8)
messages,
schema: [{
type: 'object',
properties: {
ignoreCase: {
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
returnnode_modules\eslint-plugin-react\lib\rules\jsx-handler-names.js (Line 65:13 - Line 79:10), node_modules\eslint-plugin-react\lib\rules\jsx-handler-names.js (Line 48:2 - Line 61:9)
},
checkLocalVariables: { type: 'boolean' },
checkInlineFunction: { type: 'boolean' },
ignoreComponentNames: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
},
additionalProperties: false,
}, {
type: 'object',
properties: {
eventHandlerPrefix: {
type: 'boolean'node_modules\eslint-plugin-react\lib\rules\jsx-handler-names.js (Line 81:13 - Line 95:20), node_modules\eslint-plugin-react\lib\rules\jsx-handler-names.js (Line 47:2 - Line 61:19)
},
eventHandlerPropPrefix: { type: 'string' },
checkLocalVariables: { type: 'boolean' },
checkInlineFunction: { type: 'boolean' },
ignoreComponentNames: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
},
additionalProperties: false,
}, {
type: 'object',
properties: {
checkLocalVariablesnode_modules\eslint-plugin-react\lib\rules\jsx-curly-brace-presence.js (Line 331:15 - Line 338:14), node_modules\eslint-plugin-react\lib\rules\jsx-curly-brace-presence.js (Line 322:35 - Line 329:2)
(node, children) {
if (!children) {
return false;
}
const childrenExcludingWhitespaceLiteral = children.filter((child) => !isWhiteSpaceLiteral(child));
const adjSiblings = getAdjacentSiblings(node, childrenExcludingWhitespaceLiteral);
return adjSiblings.some((x) => x.type && arrayIncludesnode_modules\eslint-plugin-react\lib\rules\forbid-component-props.js (Line 91:16 - Line 109:16), node_modules\eslint-plugin-react\lib\rules\forbid-component-props.js (Line 49:9 - Line 67:9)
: { type: 'string' },
allowedFor: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
allowedForPatterns: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
message: { type: 'string' },
},
additionalProperties: false,
},
{
type: 'object',
properties: {
propNamePatternnode_modules\eslint-plugin-react\lib\rules\forbid-component-props.js (Line 109:16 - Line 130:2), node_modules\eslint-plugin-react\lib\rules\forbid-component-props.js (Line 67:9 - Line 88:2)
: { type: 'string' },
disallowedFor: {
type: 'array',
uniqueItems: true,
minItems: 1,
items: { type: 'string' },
},
disallowedForPatterns: {
type: 'array',
uniqueItems: true,
minItems: 1,
items: { type: 'string' },
},
message: { type: 'string' },
},
anyOf: [
{ required: ['disallowedFor'] },
{ required: ['disallowedForPatterns'] },
],
additionalProperties: false,
},
]node_modules\eslint-plugin-react\lib\rules\forbid-component-props.js (Line 133:2 - Line 141:6), node_modules\eslint-plugin-react\lib\rules\forbid-dom-props.js (Line 83:6 - Line 91:7)
,
}],
},
create(context) {
const configuration = context.options[0] || {};
const forbid = new Map((configuration.forbid || DEFAULTS).map((value) => {
const propName = typeof value === 'string' ? value : value.propName;
constnode_modules\eslint-plugin-jsx-a11y\lib\util\isInteractiveRole.js (Line 1:1 - Line 12:6), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 12:20)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var rolesnode_modules\eslint-plugin-jsx-a11y\lib\util\isInteractiveElement.js (Line 1:1 - Line 30:3), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 1:1 - Line 31:49)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _axobjectQuery = require("axobject-query");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
var _attributesComparator = _interopRequireDefault(require("./attributesComparator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
var roleKeys = _ariaQuery.roles.keys();
var elementRoleEntries = _toConsumableArray(_ariaQuery.elementRoles);
var nonInteractiveRoles = new Set(roleKeys.filter(function (name) {
var role = _ariaQuery.roles.get(name);
return !role["abstract"]
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
&& name !== 'toolbar' &&node_modules\eslint-plugin-jsx-a11y\lib\util\isInteractiveElement.js (Line 30:2 - Line 42:3), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 33:2 - Line 46:49)
&& !role.superClass.some(function (classes) {
return (0, _arrayIncludes["default"])(classes, 'widget');
});
}).concat(
// The `progressbar` is descended from `widget`, but in practice, its
// value is always `readonly`, so we treat it as a non-interactive role.
'progressbar'));
var interactiveRoles = new Set(roleKeys.filter(function (name) {
var role = _ariaQuery.roles.get(name);
return !role["abstract"]
// The `progressbar` is descended from `widget`, but in practice, its
// value is always `readonly`, so we treat it as a non-interactive role.
&& name !== 'progressbar' &&node_modules\eslint-plugin-jsx-a11y\lib\util\isInteractiveElement.js (Line 42:2 - Line 65:21), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 48:2 - Line 71:24)
&& role.superClass.some(function (classes) {
return (0, _arrayIncludes["default"])(classes, 'widget');
});
}).concat(
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
'toolbar'));
var interactiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
elementSchema = _ref2[0],
rolesArr = _ref2[1];
return rolesArr.some(function (role) {
return interactiveRoles.has(role);
}) ? [elementSchema] : [];
});
var nonInteractiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
elementSchema = _ref4[0],
rolesArr = _ref4[1];
return rolesArr.every(function (role) {
return nonInteractiveRoles.has(role);
}) ? [elementSchema] : [];
});
var interactiveAXObjectsnode_modules\eslint-plugin-jsx-a11y\lib\util\isInteractiveElement.js (Line 68:2 - Line 73:21), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 74:2 - Line 79:24)
= (0, _arrayPrototype["default"])(_toConsumableArray(_axobjectQuery.elementAXObjects), function (_ref5) {
var _ref6 = _slicedToArray(_ref5, 2),
elementSchema = _ref6[0],
AXObjectsArr = _ref6[1];
return AXObjectsArr.every(function (role) {
return interactiveAXObjectsnode_modules\eslint-plugin-jsx-a11y\lib\rules\role-supports-aria-props.js (Line 1:1 - Line 11:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 11:9)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
varnode_modules\eslint-plugin-jsx-a11y\lib\rules\role-has-required-aria-props.js (Line 1:1 - Line 11:23), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 11:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isSemanticRoleElementnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 1:1 - Line 11:16), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 11:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isAbstractRolenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-redundant-roles.js (Line 45:2 - Line 60:5), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 41:7 - Line 56:11)
]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function (_JSXOpeningElement) {
function JSXOpeningElement(_x) {
return _JSXOpeningElement.apply(this, arguments);
}
JSXOpeningElement.toString = function () {
return _JSXOpeningElement.toString();
};
return JSXOpeningElement;
}(function (node) {
var typenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-onchange.js (Line 6:2 - Line 14:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 7:2 - Line 15:4)
;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce usage of onBlur over onChange for accessibility.
* @author Ethan Cohen
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-tabindex.js (Line 1:1 - Line 10:16), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 10:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _getElementTypenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-tabindex.js (Line 17:1 - Line 25:4), node_modules\@babel\runtime\helpers\esm\objectSpread2.js (Line 2:1 - Line 14:4)
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
* @fileoverview Disallow tabindex on static and noninteractive elements
* @author jessebeach
*
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-tabindex.js (Line 42:5 - Line 59:11), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 40:5 - Line 61:13)
},
schema: [schema]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function (_JSXOpeningElement) {
function JSXOpeningElement(_x) {
return _JSXOpeningElement.apply(this, arguments);
}
JSXOpeningElement.toString = function () {
return _JSXOpeningElement.toString();
};
return JSXOpeningElement;
}(function (node) {
var type = elementType(node);
var attributesnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-tabindex.js (Line 81:11 - Line 95:3), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 78:11 - Line 93:77)
return;
}
if (allowExpressionValues === true && (0, _isNonLiteralProperty["default"])(attributes, 'role')) {
// Special case if role is assigned using ternary with literals on both side
var roleProp = (0, _jsxAstUtils.getProp)(attributes, 'role');
if (roleProp && roleProp.type === 'JSXAttribute' && roleProp.value.type === 'JSXExpressionContainer') {
if (roleProp.value.expression.type === 'ConditionalExpression') {
if (roleProp.value.expression.consequent.type === 'Literal' && roleProp.value.expression.alternate.type === 'Literal') {
return;
}
}
}
return;
}
ifnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-to-interactive-role.js (Line 1:1 - Line 10:8), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 10:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _hasownnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-to-interactive-role.js (Line 33:5 - Line 49:13), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-redundant-roles.js (Line 35:5 - Line 51:18)
},
schema: [{
type: 'object',
additionalProperties: {
type: 'array',
items: {
type: 'string'
},
uniqueItems: true
}
}]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttributenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 1:1 - Line 11:9), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 11:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _hasown = _interopRequireDefault(require("hasown"));
var _schemasnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 14:28 - Line 20:20), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 11:25 - Line 17:22)
));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
var _isInteractiveElement = _interopRequireDefault(require("../util/isInteractiveElement"));
var _isInteractiveRole = _interopRequireDefault(require("../util/isInteractiveRole"));
var _isNonInteractiveElement = _interopRequireDefault(require("../util/isNonInteractiveElement"));
var _isNonInteractiveRole = _interopRequireDefault(require("../util/isNonInteractiveRole"));
var _isPresentationRolenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 32:6 - Line 39:118), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 31:6 - Line 38:110)
, _jsxAstUtils.eventHandlersByType.keyboard, _jsxAstUtils.eventHandlersByType.mouse);
var schema = (0, _schemas.generateObjSchema)({
handlers: _schemas.arraySchema
});
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md'node_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 41:5 - Line 59:7), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 40:5 - Line 58:5)
},
schema: [schema]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function (_JSXOpeningElement) {
function JSXOpeningElement(_x) {
return _JSXOpeningElement.apply(this, arguments);
}
JSXOpeningElement.toString = function () {
return _JSXOpeningElement.toString();
};
return JSXOpeningElement;
}(function (node) {
var attributes = node.attributes;
var type = elementType(node);
var confignode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 67:17 - Line 75:19), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 62:9 - Line 70:26)
.some(function (prop) {
return (0, _jsxAstUtils.hasProp)(attributes, prop) && (0, _jsxAstUtils.getPropValue)((0, _jsxAstUtils.getProp)(attributes, prop)) != null;
});
if (!_ariaQuery.dom.has(type)) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
return;
}
if (!hasInteractiveProps || (0, _isContentEditablenode_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-interactions.js (Line 75:2 - Line 81:2), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 70:2 - Line 76:2)
|| (0, _isHiddenFromScreenReader["default"])(type, attributes) || (0, _isPresentationRole["default"])(type, attributes)) {
// Presentation is an intentional signal from the author that this
// element is not meant to be perceivable. For example, a click screen
// to close a dialog .
return;
}
if ((0, _isInteractiveElement["default"])(type, attributes) || (0, _isInteractiveRole["default"])(type, attributes) || !node_modules\eslint-plugin-jsx-a11y\lib\rules\no-interactive-element-to-noninteractive-role.js (Line 1:1 - Line 12:22), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 12:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _hasown = _interopRequireDefault(require("hasown"));
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isInteractiveElementnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-interactive-element-to-noninteractive-role.js (Line 33:5 - Line 58:13), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-redundant-roles.js (Line 35:5 - Line 58:17)
},
schema: [{
type: 'object',
additionalProperties: {
type: 'array',
items: {
type: 'string'
},
uniqueItems: true
}
}]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttribute: function JSXAttribute(attribute) {
var attributeName = (0, _jsxAstUtils.propName)(attribute);
// $FlowFixMe: [TODO] Mark propName as a JSXIdentifier, not a string.
if (attributeName !== 'role') {
return;
}
var node = attribute.parent;
var attributes = node.attributes;
var type = elementType(node);
var role = (0, _jsxAstUtilsnode_modules\eslint-plugin-jsx-a11y\lib\rules\no-interactive-element-to-noninteractive-role.js (Line 58:2 - Line 70:22), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-noninteractive-element-to-interactive-role.js (Line 58:11 - Line 70:25)
);
if (!_ariaQuery.dom.has(type)) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
return;
}
// Allow overrides from rule configuration for specific elements and
// roles.
var allowedRoles = options[0] || {};
if ((0, _hasown["default"])(allowedRoles, type) && (0, _arrayIncludes["default"])(allowedRoles[type], role)) {
return;
}
if ((0, _isInteractiveElementnode_modules\eslint-plugin-jsx-a11y\lib\rules\mouse-events-have-key-events.js (Line 9:2 - Line 19:4), node_modules\@babel\runtime\helpers\esm\objectSpread2.js (Line 1:22 - Line 14:4)
;
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
* @fileoverview Enforce onmouseover/onmouseout are
* accompanied by onfocus/onblur.
* @author Ethan Cohen
*
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\lang.js (Line 28:5 - Line 36:7), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 28:5 - Line 36:8)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttribute: function JSXAttribute(node) {
var name = (0, _jsxAstUtils.propName)(node);
if (name && name.toUpperCase() !== 'LANG'node_modules\eslint-plugin-jsx-a11y\lib\rules\label-has-for.js (Line 1:1 - Line 10:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-onchange.js (Line 1:1 - Line 10:9)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
varnode_modules\eslint-plugin-jsx-a11y\lib\rules\label-has-associated-control.js (Line 1:1 - Line 10:26), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-onchange.js (Line 1:1 - Line 10:20)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _mayContainChildComponentnode_modules\eslint-plugin-jsx-a11y\lib\rules\label-has-associated-control.js (Line 42:22 - Line 47:5), node_modules\eslint-plugin-jsx-a11y\lib\rules\label-has-for.js (Line 60:11 - Line 65:11)
;
var settings = context.settings;
var htmlForAttributes = (_settings$jsxA11y$at = (_settings$jsxA11y = settings['jsx-a11y']) === null || _settings$jsxA11y === void 0 ? void 0 : (_settings$jsxA11y$att = _settings$jsxA11y.attributes) === null || _settings$jsxA11y$att === void 0 ? void 0 : _settings$jsxA11y$att["for"]) !== null && _settings$jsxA11y$at !== void 0 ? _settings$jsxA11y$at : ['htmlFor'];
for (var i = 0; i < htmlForAttributes.length; i += 1) {
var attribute = htmlForAttributes[i];
if ((0, _jsxAstUtils.hasProp)(nodenode_modules\eslint-plugin-jsx-a11y\lib\rules\interactive-supports-focus.js (Line 1:1 - Line 10:9), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveRole.js (Line 1:1 - Line 10:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _schemasnode_modules\eslint-plugin-jsx-a11y\lib\rules\interactive-supports-focus.js (Line 12:28 - Line 19:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js (Line 11:25 - Line 21:9)
));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
var _isInteractiveElement = _interopRequireDefault(require("../util/isInteractiveElement"));
var _isInteractiveRole = _interopRequireDefault(require("../util/isInteractiveRole"));
var _isNonInteractiveElement = _interopRequireDefault(require("../util/isNonInteractiveElement"));
var _isNonInteractiveRole = _interopRequireDefault(require("../util/isNonInteractiveRole"));
var _isPresentationRole = _interopRequireDefault(require("../util/isPresentationRole"));
varnode_modules\eslint-plugin-jsx-a11y\lib\rules\img-redundant-alt.js (Line 49:5 - Line 57:17), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-distracting-elements.js (Line 31:5 - Line 39:15)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var options = context.options[0] || {};
var componentOptionsnode_modules\eslint-plugin-jsx-a11y\lib\rules\iframe-has-title.js (Line 6:2 - Line 14:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\prefer-tag-over-role.js (Line 7:2 - Line 12:9)
;
var _jsxAstUtils = require("jsx-ast-utils");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _schemas = require("../util/schemas");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce iframe elements have a title attribute.
* @author Ethan Cohen
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\html-has-lang.js (Line 1:1 - Line 14:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-onchange.js (Line 1:1 - Line 15:4)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce html element has lang prop.
* @author Ethan Cohen
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\html-has-lang.js (Line 27:5 - Line 35:7), node_modules\eslint-plugin-jsx-a11y\lib\rules\iframe-has-title.js (Line 27:5 - Line 35:9)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var type = elementType(node);
if (type && type !== 'html'node_modules\eslint-plugin-jsx-a11y\lib\rules\heading-has-content.js (Line 31:5 - Line 40:10), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-distracting-elements.js (Line 31:5 - Line 58:16)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var options = context.options[0] || {};
var componentOptions = options.components || [];
var typeChecknode_modules\eslint-plugin-jsx-a11y\lib\rules\click-events-have-key-events.js (Line 1:1 - Line 11:26), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 11:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isHiddenFromScreenReadernode_modules\eslint-plugin-jsx-a11y\lib\rules\autocomplete-valid.js (Line 7:11 - Line 15:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 7:13 - Line 15:4)
);
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Ensure autocomplete attribute is correct.
* @author Wilco Fiers
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\autocomplete-valid.js (Line 29:5 - Line 37:22), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-distracting-elements.js (Line 31:5 - Line 39:15)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var options = context.options[0] || {};
var _options$inputComponenode_modules\eslint-plugin-jsx-a11y\lib\rules\aria-unsupported-elements.js (Line 1:1 - Line 16:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 15:4)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce that elements that do not support ARIA roles,
* states and properties do not have those attributes.
* @author Ethan Cohen
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\aria-role.js (Line 1:1 - Line 15:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\prefer-tag-over-role.js (Line 1:1 - Line 12:9)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _schemas = require("../util/schemas");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce aria role attribute is valid.
* @author Ethan Cohen
*/node_modules\eslint-plugin-jsx-a11y\lib\rules\aria-props.js (Line 1:1 - Line 10:15), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 10:16)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getSuggestionnode_modules\eslint-plugin-jsx-a11y\lib\rules\aria-activedescendant-has-tabindex.js (Line 1:1 - Line 11:13), node_modules\eslint-plugin-jsx-a11y\lib\rules\scope.js (Line 1:1 - Line 11:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _getTabIndexnode_modules\eslint-plugin-jsx-a11y\lib\rules\anchor-has-content.js (Line 1:1 - Line 10:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\iframe-has-title.js (Line 1:1 - Line 10:9)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _schemas = require("../util/schemas");
varnode_modules\eslint-plugin-jsx-a11y\lib\rules\anchor-has-content.js (Line 30:5 - Line 39:2), node_modules\eslint-plugin-jsx-a11y\lib\rules\no-distracting-elements.js (Line 31:5 - Line 40:9)
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var options = context.options[0] || {};
var componentOptions = options.components || [];
var typeCheck = [node_modules\eslint-plugin-jsx-a11y\lib\rules\anchor-has-content.js (Line 37:9 - Line 46:3), node_modules\eslint-plugin-jsx-a11y\lib\rules\anchor-is-valid.js (Line 45:9 - Line 55:37)
var options = context.options[0] || {};
var componentOptions = options.components || [];
var typeCheck = ['a'].concat(componentOptions);
var nodeType = elementType(node);
// Only check anchor elements and custom types.
if (typeCheck.indexOf(nodeType) === -1) {
return;
}
ifnode_modules\eslint-plugin-jsx-a11y\lib\rules\alt-text.js (Line 1:1 - Line 11:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\media-has-caption.js (Line 1:1 - Line 11:9)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
varnode_modules\eslint-plugin-jsx-a11y\lib\rules\alt-text.js (Line 149:5 - Line 159:126), node_modules\eslint-plugin-jsx-a11y\lib\rules\alt-text.js (Line 116:5 - Line 126:117)
var ariaLabelProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-label');
var arialLabelledByProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-labelledby');
var hasLabel = ariaLabelHasValue(ariaLabelProp) || ariaLabelHasValue(arialLabelledByProp);
if (hasLabel) {
return;
}
var altProp = (0, _jsxAstUtils.getProp)(node.attributes, 'alt');
if (altProp === undefined) {
context.report({
node,
message: '<input> elements with type="image" must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'node_modules\eslint-plugin-jsx-a11y\lib\rules\alt-text.js (Line 160:7 - Line 171:126), node_modules\eslint-plugin-jsx-a11y\lib\rules\alt-text.js (Line 127:7 - Line 138:117)
});
return;
}
var altValue = (0, _jsxAstUtils.getPropValue)(altProp);
var isNullValued = altProp.value === null; // <area alt />
if (altValue && !isNullValued || altValue === '') {
return;
}
context.report({
node,
message: '<input> elements with type="image" must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'node_modules\eslint-plugin-jsx-a11y\lib\rules\accessible-emoji.js (Line 8:16 - Line 17:4), node_modules\eslint-plugin-jsx-a11y\lib\rules\img-redundant-alt.js (Line 9:2 - Line 18:4)
);
var _safeRegexTest = _interopRequireDefault(require("safe-regex-test"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce emojis are wrapped in <span> and provide screen reader access.
* @author Ethan Cohen
*/node_modules\eslint-plugin-import\lib\rules\no-unresolved.js (Line 7:2 - Line 12:186), node_modules\eslint-plugin-import\lib\rules\no-webpack-loader-syntax.js (Line 1:13 - Line 4:9)
;
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} /**
* @fileOverview Ensures that an imported path exists, given resolution rules.
* @author Ben Mosher
*/node_modules\eslint-plugin-import\lib\rules\no-self-import.js (Line 7:9 - Line 13:186), node_modules\eslint-plugin-import\lib\rules\no-unresolved.js (Line 7:13 - Line 4:9)
);
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} /**
* @fileOverview Forbids a module from importing itself
* @author Gio d'Amelio
*/node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 4:9 - Line 9:7), node_modules\eslint-plugin-import\lib\rules\no-restricted-paths.js (Line 6:12 - Line 11:4)
);
var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
modulenode_modules\eslint-plugin-import\lib\rules\no-named-export.js (Line 1:12 - Line 8:14), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 13:18)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide'node_modules\eslint-plugin-import\lib\rules\no-named-default.js (Line 1:13 - Line 8:32), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:2 - Line 9:24)
;var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid named default exports.'node_modules\eslint-plugin-import\lib\rules\no-named-as-default.js (Line 2:19 - Line 7:10), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 11:13)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'problem'node_modules\eslint-plugin-import\lib\rules\no-named-as-default-member.js (Line 1:1 - Line 11:81), node_modules\eslint-plugin-import\lib\rules\no-named-as-default.js (Line 1:1 - Line 5:7)
'use strict';
var _builder = require('../exportMap/builder');var _builder2 = _interopRequireDefault(_builder);
var _importDeclaration = require('../importDeclaration');var _importDeclaration2 = _interopRequireDefault(_importDeclaration);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
//------------------------------------------------------------------------------node_modules\eslint-plugin-import\lib\rules\no-internal-modules.js (Line 3:2 - Line 8:7), node_modules\eslint-plugin-import\lib\rules\no-nodejs-modules.js (Line 1:13 - Line 4:9)
;
var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType);
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
modulenode_modules\eslint-plugin-import\lib\rules\no-internal-modules.js (Line 5:15 - Line 13:52), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 14:52)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid importing the submodules of other modules.'node_modules\eslint-plugin-import\lib\rules\no-extraneous-dependencies.js (Line 5:7 - Line 10:13), node_modules\eslint-plugin-import\lib\rules\no-relative-packages.js (Line 4:36 - Line 8:9)
);
var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType);
var _packagePathnode_modules\eslint-plugin-import\lib\rules\no-extraneous-dependencies.js (Line 266:29 - Line 276:20), node_modules\eslint-plugin-import\lib\rules\no-unassigned-import.js (Line 63:23 - Line 72:6)
) },
schema: [
{
type: 'object',
properties: {
devDependencies: { type: ['boolean', 'array'] },
optionalDependencies: { type: ['boolean', 'array'] },
peerDependencies: { type: ['boolean', 'array'] },
bundledDependenciesnode_modules\eslint-plugin-import\lib\rules\no-duplicates.js (Line 251:5 - Line 258:7), node_modules\eslint-plugin-import\lib\rules\no-duplicates.js (Line 238:11 - Line 245:75)
.range[1] + 1];
var charAfterImport = sourceCode.text.substring(charAfterImportRange[0], charAfterImportRange[1]);
if (charAfterImport === '\n') {
fixes.push(fixer.removeRange(charAfterImportRange));
}
});
returnnode_modules\eslint-plugin-import\lib\rules\no-duplicates.js (Line 282:2 - Line 287:48), node_modules\eslint-plugin-import\lib\rules\no-useless-path-segments.js (Line 105:4 - Line 110:7)
);
}
}} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}}
}
/** @type {import('eslint').Rule.RuleModule} */node_modules\eslint-plugin-import\lib\rules\no-default-export.js (Line 1:36 - Line 10:14), node_modules\eslint-plugin-import\lib\rules\unambiguous.js (Line 6:34 - Line 14:17)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);
var _sourceType = require('../core/sourceType');var _sourceType2 = _interopRequireDefault(_sourceType);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide'node_modules\eslint-plugin-import\lib\rules\no-absolute-path.js (Line 5:21 - Line 13:49), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 14:52)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid import of modules using absolute paths.'node_modules\eslint-plugin-import\lib\rules\newline-after-import.js (Line 133:2 - Line 154:15), node_modules\eslint-plugin-import\lib\rules\newline-after-import.js (Line 107:2 - Line 129:19)
EXPECTED_LINE_DIFFERENCE) {
var column = node.loc.start.column;
if (node.loc.start.line !== node.loc.end.line) {
column = 0;
}
context.report({
loc: {
line: node.loc.end.line,
column: column },
message: 'Expected ' + String(options.count) + ' empty line' + (options.count > 1 ? 's' : '') + ' after ' + String(type) + ' statement not followed by another ' + String(type) + '.',
fix: options.exactCount && EXPECTED_LINE_DIFFERENCE < lineDifference ? undefined : function (fixer) {return fixer.insertTextAfter(
node,
'\n'.repeat(EXPECTED_LINE_DIFFERENCE - lineDifference));} });
}
}
function incrementLevelnode_modules\eslint-plugin-import\lib\rules\namespace.js (Line 110:9 - Line 115:3), node_modules\eslint-plugin-import\lib\rules\no-deprecated.js (Line 108:9 - Line 114:11)
MemberExpression: function () {function MemberExpression(dereference) {
if (dereference.object.type !== 'Identifier') {return;}
if (!namespaces.has(dereference.object.name)) {return;}
if ((0, _declaredScope2['default'])(context, dereference.object.name, dereference) !== 'module') {return;}
ifnode_modules\eslint-plugin-import\lib\rules\named.js (Line 121:2 - Line 126:12), node_modules\eslint-plugin-import\lib\rules\named.js (Line 67:2 - Line 72:20)
name);
if (!deepLookup.found) {
if (deepLookup.path.length > 1) {
var deepPath = deepLookup.path.
map(function (i) {return path.relative(path.dirname((0, _contextCompat.getFilenamenode_modules\eslint-plugin-import\lib\rules\group-exports.js (Line 130:6 - Line 139:59), node_modules\eslint-plugin-import\lib\rules\group-exports.js (Line 110:8 - Line 119:68)
.sources).
filter(function (nodesWithSource) {return Array.isArray(nodesWithSource) && nodesWithSource.length > 1;})).
forEach(function (node) {
context.report({
node: node,
message: errors[node.type] });
});
// Report multiple `module.exports` assignments (CommonJS)node_modules\eslint-plugin-import\lib\rules\export.js (Line 230:2 - Line 235:17101), node_modules\eslint-plugin-import\lib\rules\first.js (Line 79:29 - Line 379:39385)
}
}} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}}
}return ProgramExit;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHBvcnQuanMiXSwibmFtZXMiOlsicm9vdFByb2dyYW0iLCJ0c1R5cGVQcmVmaXgiLCJyZW1vdmVUeXBlc2NyaXB0RnVuY3Rpb25PdmVybG9hZHMiLCJub2RlcyIsImZvckVhY2giLCJub2RlIiwiZGVjbFR5cGUiLCJ0eXBlIiwiZGVjbGFyYXRpb24iLCJwYXJlbnQiLCJpc1R5cGVzY3JpcHROYW1lc3BhY2VNZXJnaW5nIiwidHlwZXMiLCJTZXQiLCJBcnJheSIsImZyb20iLCJub05hbWVzcGFjZU5vZGVzIiwiZmlsdGVyIiwiaGFzIiwic2l6ZSIsImxlbmd0aCIsInNob3VsZFNraXBUeXBlc2NyaXB0TmFtZXNwYWNlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJuYW1lc3BhY2UiLCJNYXAiLCJhZGROYW1lZCIsIm5hbWUiLCJpc1R5cGUiLCJzZXQiLCJuYW1lZCIsImdldCIsImtleSIsImFkZCIsImdldFBhcmVudCIsIkV4cG9ydERlZmF1bHREZWNsYXJhdGlvbiIsIkV4cG9ydFNwZWNpZmllciIsImV4cG9ydGVkIiwidmFsdWUiLCJFeHBvcnROYW1lZERlY2xhcmF0aW9uIiwiaXNUeXBlVmFyaWFibGVEZWNsIiwia2luZCIsImlkIiwiZGVjbGFyYXRpb25zIiwidiIsIkV4cG9ydEFsbERlY2xhcmF0aW9uIiwic291cmNlIiwicmVtb3RlRXhwb3J0cyIsIkV4cG9ydE1hcEJ1aWxkZXIiLCJlcnJvcnMiLCJyZXBvcnRFcnJvcnMiLCJhbnkiLCJyZXBvcnQiLCJyZXBsYWNlIl0sIm1hcHBpbmdzIjoicW9CQUFBLCtDO0FBQ0EsNkQ7QUFDQSxxQztBQUNBLCtDOztBQUVBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBbUJBLElBQU1BLGNBQWMsTUFBcEI7QUFDQSxJQUFNQyxlQUFlLE9BQXJCOztBQUVBOzs7Ozs7OztBQVFBLFNBQVNDLGlDQUFULENBQTJDQyxLQUEzQyxFQUFrRDtBQUNoREEsUUFBTUMsT0FBTixDQUFjLFVBQUNDLElBQUQsRUFBVTtBQUN0QixRQUFNQyxXQUFXRCxLQUFLRSxJQUFMLEtBQWMsMEJBQWQsR0FBMkNGLEtBQUtHLFdBQUwsQ0FBaUJELElBQTVELEdBQW1FRixLQUFLSSxNQUFMLENBQVlGLElBQWhHO0FBQ0E7QUFDRTtBQUNBRCxpQkFBYTtBQUNiO0FBREEsT0FFR0EsYUFBYSxnQ0FKbEI7QUFLRTtBQUNBSCxzQkFBYUUsSUFBYjtBQUNEO0FBQ0YsR0FWRDtBQVdEOztBQUVEOzs7Ozs7Ozs7QUFTQSxTQUFTSyw0QkFBVCxDQUFzQ1AsS0FBdEMsRUFBNkM7QUFDM0MsTUFBTVEsUUFBUSxJQUFJQyxHQUFKLENBQVFDLE1BQU1DLElBQU4sQ0FBV1gsS0FBWCxFQUFrQixVQUFDRSxJQUFELFVBQVVBLEtBQUtJLE1BQUwsQ0FBWUYsSUFBdEIsRUFBbEIsQ0FBUixDQUFkO0FBQ0EsTUFBTVEsbUJBQW1CRixNQUFNQyxJQUFOLENBQVdYLEtBQVgsRUFBa0JhLE1BQWxCLENBQXlCLFVBQUNYLElBQUQsVUFBVUEsS0FBS0ksTUFBTCxDQUFZRixJQUFaLEtBQXFCLHFCQUEvQixFQUF6QixDQUF6Qjs7QUFFQSxTQUFPSSxNQUFNTSxHQUFOLENBQVUscUJBQVY7O0FBRUhOLFFBQU1PLElBQU4sS0FBZTtBQUNmO0FBREEsS0FFR1AsTUFBTU8sSUFBTixLQUFlLENBQWYsS0FBcUJQLE1BQU1NLEdBQU4sQ0FBVSxxQkFBVixLQUFvQ04sTUFBTU0sR0FBTixDQUFVLG1CQUFWLENBQXpELENBRkg7QUFHR04sUUFBTU8sSUFBTixLQUFlLENBQWYsSUFBb0JQLE1BQU1NLEdBQU4sQ0FBVSxxQkFBVixDQUFwQixJQUF3RE4sTUFBTU0sR0FBTixDQUFVLG1CQUFWO0FBQzNEO0FBSkEsS0FLR04sTUFBTU8sSUFBTixLQUFlLENBQWYsS0FBcUJQLE1BQU1NLEdBQU4sQ0FBVSxrQkFBVixLQUFpQ04sTUFBTU0sR0FBTixDQUFVLG1CQUFWLENBQXRELEtBQXlGRixpQkFBaUJJLE1BQWpCLEtBQTRCLENBUHJILENBQVA7O0FBU0Q7O0FBRUQ7Ozs7Ozs7Ozs7O0FBV0EsU0FBU0MsNkJBQVQsQ0FBdUNmLElBQXZDLEVBQTZDRixLQUE3QyxFQUFvRDtBQUNsRCxNQUFNUSxRQUFRLElBQUlDLEdBQUosQ0FBUUMsTUFBTUMsSUFBTixDQUFXWCxLQUFYLEVBQWtCLFVBQUNFLElBQUQsVUFBVUEsS0FBS0ksTUFBTCxDQUFZRixJQUF0QixFQUFsQixDQUFSLENBQWQ7O0FBRUEsU0FBTyxDQUFDRyw2QkFBNkJQLEtBQTdCLENBQUQ7QUFDRkUsT0FBS0ksTUFBTCxDQUFZRixJQUFaLEtBQXFCLHFCQURuQjs7QUFHSEksUUFBTU0sR0FBTixDQUFVLG1CQUFWO0FBQ0dOLFFBQU1NLEdBQU4sQ0FBVSxrQkFBVixDQURIO0FBRUdOLFFBQU1NLEdBQU4sQ0FBVSxxQkFBVixDQUZIO0FBR0dOLFFBQU1NLEdBQU4sQ0FBVSxtQkFBVixDQU5BLENBQVA7O0FBUUQ7O0FBRURJLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsUUFBTTtBQUNKaEIsVUFBTSxTQURGO0FBRUppQixVQUFNO0FBQ0pDLGdCQUFVLGtCQUROO0FBRUpDLG1CQUFhLDhEQUZUO0FBR0pDLFdBQUssMEJBQVEsUUFBUixDQUhELEVBRkY7O0FBT0pDLFlBQVEsRUFQSixFQURTOzs7QUFXZkMsUUFYZSwrQkFXUkMsT0FYUSxFQVdDO0FBQ2QsVUFBTUMsWUFBWSxJQUFJQyxHQUFKLENBQVEsQ0FBQyxDQUFDaEMsV0FBRCxFQUFjLElBQUlnQyxHQUFKLEVBQWQsQ0FBRCxDQUFSLENBQWxCOztBQUVBLGVBQVNDLFFBQVQsQ0FBa0JDLElBQWxCLEVBQXdCN0IsSUFBeEIsRUFBOEJJLE1BQTlCLEVBQXNDMEIsTUFBdEMsRUFBOEM7QUFDNUMsWUFBSSxDQUFDSixVQUFVZCxHQUFWLENBQWNSLE1BQWQsQ0FBTCxFQUE0QjtBQUMxQnNCLG9CQUFVSyxHQUFWLENBQWMzQixNQUFkLEVBQXNCLElBQUl1QixHQUFKLEVBQXRCO0FBQ0Q7QUFDRCxZQUFNSyxRQUFRTixVQUFVTyxHQUFWLENBQWM3QixNQUFkLENBQWQ7O0FBRUEsWUFBTThCLE1BQU1KLGNBQVlsQyxZQUFaLFVBQTJCaUMsSUFBM0IsSUFBb0NBLElBQWhEO0FBQ0EsWUFBSS9CLFFBQVFrQyxNQUFNQyxHQUFOLENBQVVDLEdBQVYsQ0FBWjs7QUFFQSxZQUFJcEMsU0FBUyxJQUFiLEVBQW1CO0FBQ2pCQSxrQkFBUSxJQUFJUyxHQUFKLEVBQVI7QUFDQXlCLGdCQUFNRCxHQUFOLENBQVVHLEdBQVYsRUFBZXBDLEtBQWY7QUFDRDs7QUFFREEsY0FBTXFDLEdBQU4sQ0FBVW5DLElBQVY7QUFDRDs7QUFFRCxlQUFTb0MsU0FBVCxDQUFtQnBDLElBQW5CLEVBQXlCO0FBQ3ZCLFlBQUlBLEtBQUtJLE1BQUwsSUFBZUosS0FBS0ksTUFBTCxDQUFZRixJQUFaLEtBQXFCLGVBQXhDLEVBQXlEO0FBQ3ZELGlCQUFPRixLQUFLSSxNQUFMLENBQVlBLE1BQW5CO0FBQ0Q7O0FBRUQ7QUFDQTtBQUNBLGVBQU9ULFdBQVA7QUFDRDs7QUFFRCxhQUFPO0FBQ0wwQyxnQ0FESyxpREFDb0JyQyxJQURwQixFQUMwQjtBQUM3QjRCLHFCQUFTLFNBQVQsRUFBb0I1QixJQUFwQixFQUEwQm9DLFVBQVVwQyxJQUFWLENBQTFCO0FBQ0QsV0FISTs7QUFLTHNDLHVCQUxLLHdDQUtXdEMsSUFMWCxFQUtpQjtBQUNwQjRCO0FBQ0U1QixpQkFBS3VDLFFBQUwsQ0FBY1YsSUFBZCxJQUFzQjdCLEtBQUt1QyxRQUFMLENBQWNDLEtBRHRDO0FBRUV4QyxpQkFBS3VDLFFBRlA7QUFHRUgsc0JBQVVwQyxLQUFLSSxNQUFmLENBSEY7O0FBS0QsV0FYSTs7QUFhTHFDLDhCQWJLLCtDQWFrQnpDLElBYmxCLEVBYXdCO0FBQzNCLGdCQUFJQSxLQUFLRyxXQUFMLElBQW9CLElBQXhCLEVBQThCLENBQUUsT0FBUzs7QUFFekMsZ0JBQU1DLFNBQVNnQyxVQUFVcEMsSUFBVixDQUFmO0FBQ0E7QUFDQSxnQkFBTTBDLHFCQUFxQjFDLEtBQUtHLFdBQUwsQ0FBaUJ3QyxJQUFqQixLQUEwQixNQUFyRDs7QUFFQSxnQkFBSTNDLEtBQUtHLFdBQUwsQ0FBaUJ5QyxFQUFqQixJQUF1QixJQUEzQixFQUFpQztBQUMvQixrQkFBSSxnQ0FBUztBQUNYLHNDQURXO0FBRVgsc0NBRlcsQ0FBVDtBQUdENUMsbUJBQUtHLFdBQUwsQ0FBaUJELElBSGhCLENBQUosRUFHMkI7QUFDekIwQix5QkFBUzVCLEtBQUtHLFdBQUwsQ0FBaUJ5QyxFQUFqQixDQUFvQmYsSUFBN0IsRUFBbUM3QixLQUFLRyxXQUFMLENBQWlCeUMsRUFBcEQsRUFBd0R4QyxNQUF4RCxFQUFnRSxJQUFoRTtBQUNELGVBTEQsTUFLTztBQUNMd0IseUJBQVM1QixLQUFLRyxXQUFMLENBQWlCeUMsRUFBakIsQ0FBb0JmLElBQTdCLEVBQW1DN0IsS0FBS0csV0FBTCxDQUFpQnlDLEVBQXBELEVBQXdEeEMsTUFBeEQsRUFBZ0VzQyxrQkFBaEU7QUFDRDtBQUNGOztBQUVELGdCQUFJMUMsS0FBS0csV0FBTCxDQUFpQjBDLFlBQWpCLElBQWlDLElBQXJDLEVBQTJDO0FBQ3pDLHFDQUEwQjdDLEtBQUtHLFdBQUwsQ0FBaUIwQyxZQUEzQyw4SEFBeUQsS0FBOUMxQyxXQUE4QztBQUN2RCxtREFBd0JBLFlBQVl5QyxFQUFwQyxFQUF3QyxVQUFDRSxDQUFELEVBQU8sQ0FBRWxCLFNBQVNrQixFQUFFakIsSUFBWCxFQUFpQmlCLENBQWpCLEVBQW9CMUMsTUFBcEIsRUFBNEJzQyxrQkFBNUIsRUFBa0QsQ0FBbkc7QUFDRCxpQkFId0M7QUFJMUM7QUFDRixXQXBDSTs7QUFzQ0xLLDRCQXRDSyw2Q0FzQ2dCL0MsSUF0Q2hCLEVBc0NzQjtBQUN6QixnQkFBSUEsS0FBS2dELE1BQUwsSUFBZSxJQUFuQixFQUF5QixDQUFFLE9BQVMsQ0FEWCxDQUNZOztBQUVyQztBQUNBLGdCQUFJaEQsS0FBS3VDLFFBQUwsSUFBaUJ2QyxLQUFLdUMsUUFBTCxDQUFjVixJQUFuQyxFQUF5QyxDQUFFLE9BQVM7O0FBRXBELGdCQUFNb0IsZ0JBQWdCQyxxQkFBaUJqQixHQUFqQixDQUFxQmpDLEtBQUtnRCxNQUFMLENBQVlSLEtBQWpDLEVBQXdDZixPQUF4QyxDQUF0QjtBQUNBLGdCQUFJd0IsaUJBQWlCLElBQXJCLEVBQTJCLENBQUUsT0FBUzs7QUFFdEMsZ0JBQUlBLGNBQWNFLE1BQWQsQ0FBcUJyQyxNQUF6QixFQUFpQztBQUMvQm1DLDRCQUFjRyxZQUFkLENBQTJCM0IsT0FBM0IsRUFBb0N6QixJQUFwQztBQUNBO0FBQ0Q7O0FBRUQsZ0JBQU1JLFNBQVNnQyxVQUFVcEMsSUFBVixDQUFmOztBQUVBLGdCQUFJcUQsTUFBTSxLQUFWO0FBQ0FKLDBCQUFjbEQsT0FBZCxDQUFzQixVQUFDK0MsQ0FBRCxFQUFJakIsSUFBSixFQUFhO0FBQ2pDLGtCQUFJQSxTQUFTLFNBQWIsRUFBd0I7QUFDdEJ3QixzQkFBTSxJQUFOLENBRHNCLENBQ1Y7QUFDWnpCLHlCQUFTQyxJQUFULEVBQWU3QixJQUFmLEVBQXFCSSxNQUFyQjtBQUNEO0FBQ0YsYUFMRDs7QUFPQSxnQkFBSSxDQUFDaUQsR0FBTCxFQUFVO0FBQ1I1QixzQkFBUTZCLE1BQVI7QUFDRXRELG1CQUFLZ0QsTUFEUDtBQUV1Q2hELG1CQUFLZ0QsTUFBTCxDQUFZUixLQUZuRDs7QUFJRDtBQUNGLFdBcEVJOztBQXNFTCxzQkF0RUssc0NBc0VZO0FBQ2Ysb0NBQXdCZCxTQUF4QixtSUFBbUMsaUVBQXJCTSxLQUFxQjtBQUNqQyx3Q0FBNEJBLEtBQTVCLG1JQUFtQyxtRUFBdkJILElBQXVCLGdCQUFqQi9CLEtBQWlCO0FBQ2pDRCxzREFBa0NDLEtBQWxDOztBQUVBLHdCQUFJQSxNQUFNZSxJQUFOLElBQWMsQ0FBbEIsRUFBcUIsQ0FBRSxTQUFXOztBQUVsQyx3QkFBSVIsNkJBQTZCUCxLQUE3QixDQUFKLEVBQXlDLENBQUUsU0FBVyxDQUxyQjs7QUFPakMsNENBQW1CQSxLQUFuQixtSUFBMEIsS0FBZkUsSUFBZTtBQUN4Qiw0QkFBSWUsOEJBQThCZixJQUE5QixFQUFvQ0YsS0FBcEMsQ0FBSixFQUFnRCxDQUFFLFNBQVc7O0FBRTdELDRCQUFJK0IsU0FBUyxTQUFiLEVBQXdCO0FBQ3RCSixrQ0FBUTZCLE1BQVIsQ0FBZXRELElBQWYsRUFBcUIsMkJBQXJCO0FBQ0QseUJBRkQsTUFFTztBQUNMeUIsa0NBQVE2QixNQUFSO0FBQ0V0RCw4QkFERjtBQUUrQjZCLCtCQUFLMEIsT0FBTCxDQUFhM0QsWUFBYixFQUEyQixFQUEzQixDQUYvQjs7QUFJRDtBQUNGLHVCQWxCZ0M7QUFtQmxDLG1CQXBCZ0M7QUFxQmxDLGVBdEJjO0FBdUJoQixXQTdGSSx3QkFBUDs7QUErRkQsS0F4SWMsbUJBQWpCIiwiZmlsZSI6ImV4cG9ydC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeHBvcnRNYXBCdWlsZGVyIGZyb20gJy4uL2V4cG9ydE1hcC9idWlsZGVyJztcbmltcG9ydCByZWN1cnNpdmVQYXR0ZXJuQ2FwdHVyZSBmcm9tICcuLi9leHBvcnRNYXAvcGF0dGVybkNhcHR1cmUnO1xuaW1wb3J0IGRvY3NVcmwgZnJvbSAnLi4vZG9jc1VybCc7XG5pbXBvcnQgaW5jbHVkZXMgZnJvbSAnYXJyYXktaW5jbHVkZXMnO1xuXG4vKlxuTm90ZXMgb24gVHlwZVNjcmlwdCBuYW1lc3BhY2VzIGFrYSBUU01vZHVsZURlY2xhcmF0aW9uOlxuXG5UaGVyZSBhcmUgdHdvIGZvcm1zOlxuLSBhY3RpdmUgbmFtZXNwYWNlczogbmFtZXNwYWNlIEZvbyB7fSAvIG1vZHVsZSBGb28ge31cbi0gYW1iaWVudCBtb2R1bGVzOyBkZWNsYXJlIG1vZHVsZSBcImVzbGludC1wbHVnaW4taW1wb3J0XCIge31cblxuYWN0aXZlIG5hbWVzcGFjZXM6XG4tIGNhbm5vdCBjb250YWluIGEgZGVmYXVsdCBleHBvcnRcbi0gY2Fubm90IGNvbnRhaW4gYW4gZXhwb3J0IGFsbFxuLSBjYW5ub3QgY29udGFpbiBhIG11bHRpIG5hbWUgZXhwb3J0IChleHBvcnQgeyBhLCBiIH0pXG4tIGNhbiBoYXZlIGFjdGl2ZSBuYW1lc3BhY2VzIG5lc3RlZCB3aXRoaW4gdGhlbVxuXG5hbWJpZW50IG5hbWVzcGFjZXM6XG4tIGNhbiBvbmx5IGJlIGRlZmluZWQgaW4gLmQudHMgZmlsZXNcbi0gY2Fubm90IGJlIG5lc3RlZCB3aXRoaW4gYWN0aXZlIG5hbWVzcGFjZXNcbi0gaGF2ZSBubyBvdGhlciByZXN0cmljdGlvbnNcbiovXG5cbmNvbnN0IHJvb3RQcm9ncmFtID0gJ3Jvb3QnO1xuY29uc3QgdHNUeXBlUHJlZml4ID0gJ3R5cGU6JztcblxuLyoqXG4gKiByZW1vdmUgZnVuY3Rpb24gb3ZlcmxvYWRzIGxpa2U6XG4gKiBgYGB0c1xuICogZXhwb3J0IGZ1bmN0aW9uIGZvbyhhOiBudW1iZXIpO1xuICogZXhwb3J0IGZ1bmN0aW9uIGZvbyhhOiBzdHJpbmcpO1xuICogYGBgXG4gKiBAcGFyYW0ge1NldDxPYmplY3Q+fSBub2Rlc1xuICovXG5mdW5jdGlvbiByZW1vdmVUeXBlc2NyaXB0RnVuY3Rpb25PdmVybG9hZHMobm9kZXMpIHtcbiAgbm9kZXMuZm9yRWFjaCgobm9kZSkgPT4ge1xuICAgIGNvbnN0IGRlY2xUeXBlID0gbm9kZS50eXBlID09PSAnRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uJyA/IG5vZGUuZGVjbGFyYXRpb24udHlwZSA6IG5vZGUucGFyZW50LnR5cGU7XG4gICAgaWYgKFxuICAgICAgLy8gZXNsaW50IDYrXG4gICAgICBkZWNsVHlwZSA9PT0gJ1RTRGVjbGFyZUZ1bmN0aW9uJ1xuICAgICAgLy8gZXNsaW50IDQtNVxuICAgICAgfHwgZGVjbFR5cGUgPT09ICdUU0VtcHR5Qm9keUZ1bmN0aW9uRGVjbGFyYXRpb24nXG4gICAgKSB7XG4gICAgICBub2Rlcy5kZWxldGUobm9kZSk7XG4gICAgfVxuICB9KTtcbn1cblxuLyoqXG4gKiBEZXRlY3QgbWVyZ2luZyBOYW1lc3BhY2VzIHdpdGggQ2xhc3NlcywgRnVuY3Rpb25zLCBvciBFbnVtcyBsaWtlOlxuICogYGBgdHNcbiAqIGV4cG9ydCBjbGFzcyBGb28geyB9XG4gKiBleHBvcnQgbmFtZXNwYWNlIEZvbyB7IH1cbiAqIGBgYFxuICogQHBhcmFtIHtTZXQ8T2JqZWN0Pn0gbm9kZXNcbiAqIEByZXR1cm5zIHtib29sZWFufVxuICovXG5mdW5jdGlvbiBpc1R5cGVzY3JpcHROYW1lc3BhY2VNZXJnaW5nKG5vZGVzKSB7XG4gIGNvbnN0IHR5cGVzID0gbmV3IFNldChBcnJheS5mcm9tKG5vZGVzLCAobm9kZSkgPT4gbm9kZS5wYXJlbnQudHlwZSkpO1xuICBjb25zdCBub05hbWVzcGFjZU5vZGVzID0gQXJyYXkuZnJvbShub2RlcykuZmlsdGVyKChub2RlKSA9PiBub2RlLnBhcmVudC50eXBlICE9PSAnVFNNb2R1bGVEZWNsYXJhdGlvbicpO1xuXG4gIHJldHVybiB0eXBlcy5oYXMoJ1RTTW9kdWxlRGVjbGFyYXRpb24nKVxuICAgICYmIChcbiAgICAgIHR5cGVzLnNpemUgPT09IDFcbiAgICAgIC8vIE1lcmdpbmcgd2l0aCBmdW5jdGlvbnNcbiAgICAgIHx8IHR5cGVzLnNpemUgPT09IDIgJiYgKHR5cGVzLmhhcygnRnVuY3Rpb25EZWNsYXJhdGlvbicpIHx8IHR5cGVzLmhhcygnVFNEZWNsYXJlRnVuY3Rpb24nKSlcbiAgICAgIHx8IHR5cGVzLnNpemUgPT09IDMgJiYgdHlwZXMuaGFzKCdGdW5jdGlvbkRlY2xhcmF0aW9uJykgJiYgdHlwZXMuaGFzKCdUU0RlY2xhcmVGdW5jdGlvbicpXG4gICAgICAvLyBNZXJnaW5nIHdpdGggY2xhc3NlcyBvciBlbnVtc1xuICAgICAgfHwgdHlwZXMuc2l6ZSA9PT0gMiAmJiAodHlwZXMuaGFzKCdDbGFzc0RlY2xhcmF0aW9uJykgfHwgdHlwZXMuaGFzKCdUU0VudW1EZWNsYXJhdGlvbicpKSAmJiBub05hbWVzcGFjZU5vZGVzLmxlbmd0aCA9PT0gMVxuICAgICk7XG59XG5cbi8qKlxuICogRGV0ZWN0IGlmIGEgdHlwZXNjcmlwdCBuYW1lc3BhY2Ugbm9kZSBzaG91bGQgYmUgcmVwb3J0ZWQgYXMgbXVsdGlwbGUgZXhwb3J0OlxuICogYGBgdHNcbiAqIGV4cG9ydCBjbGFzcyBGb28geyB9XG4gKiBleHBvcnQgZnVuY3Rpb24gRm9vKCk7XG4gKiBleHBvcnQgbmFtZXNwYWNlIEZvbyB7IH1cbiAqIGBgYFxuICogQHBhcmFtIHtPYmplY3R9IG5vZGVcbiAqIEBwYXJhbSB7U2V0PE9iamVjdD59IG5vZGVzXG4gKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAqL1xuZnVuY3Rpb24gc2hvdWxkU2tpcFR5cGVzY3JpcHROYW1lc3BhY2Uobm9kZSwgbm9kZXMpIHtcbiAgY29uc3QgdHlwZXMgPSBuZXcgU2V0KEFycmF5LmZyb20obm9kZXMsIChub2RlKSA9PiBub2RlLnBhcmVudC50eXBlKSk7XG5cbiAgcmV0dXJuICFpc1R5cGVzY3JpcHROYW1lc3BhY2VNZXJnaW5nKG5vZGVzKVxuICAgICYmIG5vZGUucGFyZW50LnR5cGUgPT09ICdUU01vZHVsZURlY2xhcmF0aW9uJ1xuICAgICYmIChcbiAgICAgIHR5cGVzLmhhcygnVFNFbnVtRGVjbGFyYXRpb24nKVxuICAgICAgfHwgdHlwZXMuaGFzKCdDbGFzc0RlY2xhcmF0aW9uJylcbiAgICAgIHx8IHR5cGVzLmhhcygnRnVuY3Rpb25EZWNsYXJhdGlvbicpXG4gICAgICB8fCB0eXBlcy5oYXMoJ1RTRGVjbGFyZUZ1bmN0aW9uJylcbiAgICApO1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdwcm9ibGVtJyxcbiAgICBkb2NzOiB7XG4gICAgICBjYXRlZ29yeTogJ0hlbHBmdWwgd2FybmluZ3MnLFxuICAgICAgZGVzY3JpcHRpb246ICdGb3JiaWQgYW55IGludmFsaWQgZXhwb3J0cywgaS5lLiByZS1leHBvcnQgb2YgdGhlIHNhbWUgbmFtZS4nLFxuICAgICAgdXJsOiBkb2NzVXJsKCdleHBvcnQnKSxcbiAgICB9LFxuICAgIHNjaGVtYTogW10sXG4gIH0sXG5cbiAgY3JlYXRlKGNvbnRleHQpIHtcbiAgICBjb25zdCBuYW1lc3BhY2UgPSBuZXcgTWFwKFtbcm9vdFByb2dyYW0sIG5ldyBNYXAoKV1dKTtcblxuICAgIGZ1bmN0aW9uIGFkZE5hbWVkKG5hbWUsIG5vZGUsIHBhcmVudCwgaXNUeXBlKSB7XG4gICAgICBpZiAoIW5hbWVzcGFjZS5oYXMocGFyZW50KSkge1xuICAgICAgICBuYW1lc3BhY2Uuc2V0KHBhcmVudCwgbmV3IE1hcCgpKTtcbiAgICAgIH1cbiAgICAgIGNvbnN0IG5hbWVkID0gbmFtZXNwYWNlLmdldChwYXJlbnQpO1xuXG4gICAgICBjb25zdCBrZXkgPSBpc1R5cGUgPyBgJHt0c1R5cGVQcmVmaXh9JHtuYW1lfWAgOiBuYW1lO1xuICAgICAgbGV0IG5vZGVzID0gbmFtZWQuZ2V0KGtleSk7XG5cbiAgICAgIGlmIChub2RlcyA9PSBudWxsKSB7XG4gICAgICAgIG5vZGVzID0gbmV3IFNldCgpO1xuICAgICAgICBuYW1lZC5zZXQoa2V5LCBub2Rlcyk7XG4gICAgICB9XG5cbiAgICAgIG5vZGVzLmFkZChub2RlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBnZXRQYXJlbnQobm9kZSkge1xuICAgICAgaWYgKG5vZGUucGFyZW50ICYmIG5vZGUucGFyZW50LnR5cGUgPT09ICdUU01vZHVsZUJsb2NrJykge1xuICAgICAgICByZXR1cm4gbm9kZS5wYXJlbnQucGFyZW50O1xuICAgICAgfVxuXG4gICAgICAvLyBqdXN0IGluIGNhc2Ugc29tZWhvdyBhIG5vbi10cyBuYW1lc3BhY2UgZXhwb3J0IGRlY2xhcmF0aW9uIGlzbid0IGRpcmVjdGx5XG4gICAgICAvLyBwYXJlbnRlZCB0byB0aGUgcm9vdCBQcm9ncmFtIG5vZGVcbiAgICAgIHJldHVybiByb290UHJvZ3JhbTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgYWRkTmFtZWQoJ2RlZmF1bHQnLCBub2RlLCBnZXRQYXJlbnQobm9kZSkpO1xuICAgICAgfSxcblxuICAgICAgRXhwb3J0U3BlY2lmaWVyKG5vZGUpIHtcbiAgICAgICAgYWRkTmFtZWQoXG4gICAgICAgICAgbm9kZS5leHBvcnRlZC5uYW1lIHx8IG5vZGUuZXhwb3J0ZWQudmFsdWUsXG4gICAgICAgICAgbm9kZS5leHBvcnRlZCxcbiAgICAgICAgICBnZXRQYXJlbnQobm9kZS5wYXJlbnQpLFxuICAgICAgICApO1xuICAgICAgfSxcblxuICAgICAgRXhwb3J0TmFtZWREZWNsYXJhdGlvbihub2RlKSB7XG4gICAgICAgIGlmIChub2RlLmRlY2xhcmF0aW9uID09IG51bGwpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgY29uc3QgcGFyZW50ID0gZ2V0UGFyZW50KG5vZGUpO1xuICAgICAgICAvLyBzdXBwb3J0IGZvciBvbGQgVHlwZVNjcmlwdCB2ZXJzaW9uc1xuICAgICAgICBjb25zdCBpc1R5cGVWYXJpYWJsZURlY2wgPSBub2RlLmRlY2xhcmF0aW9uLmtpbmQgPT09ICd0eXBlJztcblxuICAgICAgICBpZiAobm9kZS5kZWNsYXJhdGlvbi5pZCAhPSBudWxsKSB7XG4gICAgICAgICAgaWYgKGluY2x1ZGVzKFtcbiAgICAgICAgICAgICdUU1R5cGVBbGlhc0RlY2xhcmF0aW9uJyxcbiAgICAgICAgICAgICdUU0ludGVyZmFjZURlY2xhcmF0aW9uJyxcbiAgICAgICAgICBdLCBub2RlLmRlY2xhcmF0aW9uLnR5cGUpKSB7XG4gICAgICAgICAgICBhZGROYW1lZChub2RlLmRlY2xhcmF0aW9uLmlkLm5hbWUsIG5vZGUuZGVjbGFyYXRpb24uaWQsIHBhcmVudCwgdHJ1ZSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFkZE5hbWVkKG5vZGUuZGVjbGFyYXRpb24uaWQubmFtZSwgbm9kZS5kZWNsYXJhdGlvbi5pZCwgcGFyZW50LCBpc1R5cGVWYXJpYWJsZURlY2wpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChub2RlLmRlY2xhcmF0aW9uLmRlY2xhcmF0aW9ucyAhPSBudWxsKSB7XG4gICAgICAgICAgZm9yIChjb25zdCBkZWNsYXJhdGlvbiBvZiBub2RlLmRlY2xhcmF0aW9uLmRlY2xhcmF0aW9ucykge1xuICAgICAgICAgICAgcmVjdXJzaXZlUGF0dGVybkNhcHR1cmUoZGVjbGFyYXRpb24uaWQsICh2KSA9PiB7IGFkZE5hbWVkKHYubmFtZSwgdiwgcGFyZW50LCBpc1R5cGVWYXJpYWJsZURlY2wpOyB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgIEV4cG9ydEFsbERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUuc291cmNlID09IG51bGwpIHsgcmV0dXJuOyB9IC8vIG5vdCBzdXJlIGlmIHRoaXMgaXMgZXZlciB0cnVlXG5cbiAgICAgICAgLy8gYGV4cG9ydCAqIGFzIFggZnJvbSAncGF0aCdgIGRvZXMgbm90IGNvbmZsaWN0XG4gICAgICAgIGlmIChub2RlLmV4cG9ydGVkICYmIG5vZGUuZXhwb3J0ZWQubmFtZSkgeyByZXR1cm47IH1cblxuICAgICAgICBjb25zdCByZW1vdGVFeHBvcnRzID0gRXhwb3J0TWFwQnVpbGRlci5nZXQobm9kZS5zb3VyY2UudmFsdWUsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVtb3RlRXhwb3J0cyA9PSBudWxsKSB7IHJldHVybjsgfVxuXG4gICAgICAgIGlmIChyZW1vdGVFeHBvcnRzLmVycm9ycy5sZW5ndGgpIHtcbiAgICAgICAgICByZW1vdGVFeHBvcnRzLnJlcG9ydEVycm9ycyhjb250ZXh0LCBub2RlKTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXJlbnQgPSBnZXRQYXJlbnQobm9kZSk7XG5cbiAgICAgICAgbGV0IGFueSA9IGZhbHNlO1xuICAgICAgICByZW1vdGVFeHBvcnRzLmZvckVhY2goKHYsIG5hbWUpID0+IHtcbiAgICAgICAgICBpZiAobmFtZSAhPT0gJ2RlZmF1bHQnKSB7XG4gICAgICAgICAgICBhbnkgPSB0cnVlOyAvLyBwb29yIG1hbidzIGZpbHRlclxuICAgICAgICAgICAgYWRkTmFtZWQobmFtZSwgbm9kZSwgcGFyZW50KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmICghYW55KSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoXG4gICAgICAgICAgICBub2RlLnNvdXJjZSxcbiAgICAgICAgICAgIGBObyBuYW1lZCBleHBvcnRzIGZvdW5kIGluIG1vZHVsZSAnJHtub2RlLnNvdXJjZS52YWx1ZX0nLmAsXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgfSxcblxuICAgICAgJ1Byb2dyYW06ZXhpdCcoKSB7XG4gICAgICAgIGZvciAoY29uc3QgWywgbmFtZWRdIG9mIG5hbWVzcGFjZSkge1xuICAgICAgICAgIGZvciAoY29uc3QgW25hbWUsIG5vZGVzXSBvZiBuYW1lZCkge1xuICAgICAgICAgICAgcmVtb3ZlVHlwZXNjcmlwdEZ1bmN0aW9uT3ZlcmxvYWRzKG5vZGVzKTtcblxuICAgICAgICAgICAgaWYgKG5vZGVzLnNpemUgPD0gMSkgeyBjb250aW51ZTsgfVxuXG4gICAgICAgICAgICBpZiAoaXNUeXBlc2NyaXB0TmFtZXNwYWNlTWVyZ2luZyhub2RlcykpIHsgY29udGludWU7IH1cblxuICAgICAgICAgICAgZm9yIChjb25zdCBub2RlIG9mIG5vZGVzKSB7XG4gICAgICAgICAgICAgIGlmIChzaG91bGRTa2lwVHlwZXNjcmlwdE5hbWVzcGFjZShub2RlLCBub2RlcykpIHsgY29udGludWU7IH1cblxuICAgICAgICAgICAgICBpZiAobmFtZSA9PT0gJ2RlZmF1bHQnKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQobm9kZSwgJ011bHRpcGxlIGRlZmF1bHQgZXhwb3J0cy4nKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydChcbiAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICBgTXVsdGlwbGUgZXhwb3J0cyBvZiBuYW1lICcke25hbWUucmVwbGFjZSh0c1R5cGVQcmVmaXgsICcnKX0nLmAsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ==node_modules\eslint-plugin-import\lib\rules\dynamic-import-chunkname.js (Line 2:4 - Line 11:75), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 9:24)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Enforce a leading comment with the webpackChunkName for dynamic imports.'node_modules\eslint-plugin-import\lib\rules\default.js (Line 1:9 - Line 8:18), node_modules\eslint-plugin-import\lib\rules\no-relative-parent-imports.js (Line 6:12 - Line 9:19)
);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'problem',
docs: {
category: 'Static analysis'node_modules\eslint-plugin-import\lib\exportMap\index.js (Line 103:11 - Line 108:2), node_modules\eslint-plugin-import\lib\rules\first.js (Line 78:6 - Line 376:12)
;
}
}} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}}
}
return {node_modules\eslint\lib\shared\translate-cli-options.js (Line 216:5 - Line 223:2), node_modules\eslint\lib\shared\translate-cli-options.js (Line 143:2 - Line 150:2)
global.reduce((obj, name) => {
if (name.endsWith(":true")) {
obj[name.slice(0, -5)] = "writable";
} else {
obj[name] = "readonly";
}
return obj;
}, {}),node_modules\eslint\lib\shared\naming.js (Line 52:4 - Line 70:2), node_modules\@eslint\eslintrc\lib\shared\naming.js (Line 43:5 - Line 60:2)
);
}
} else if (!normalizedName.startsWith(`${prefix}-`)) {
normalizedName = `${prefix}-${normalizedName}`;
}
return normalizedName;
}
/**
* Removes the prefix from a fullname.
* @param {string} fullname The term which may have the prefix.
* @param {string} prefix The prefix to remove.
* @returns {string} The term without prefix.
*/
function getShorthandName(fullname, prefix) {
if (fullname[0] === "@") {
let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(
fullname,node_modules\eslint\lib\shared\naming.js (Line 79:3 - Line 105:7), node_modules\@eslint\eslintrc\lib\shared\naming.js (Line 66:9 - Line 92:7)
);
if (matchResult) {
return `${matchResult[1]}/${matchResult[2]}`;
}
} else if (fullname.startsWith(`${prefix}-`)) {
return fullname.slice(prefix.length + 1);
}
return fullname;
}
/**
* Gets the scope (namespace) of a term.
* @param {string} term The term which may have the namespace.
* @returns {string} The namespace of the term if it has one.
*/
function getNamespaceFromTerm(term) {
const match = term.match(NAMESPACE_REGEX);
return match ? match[0] : "";
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
modulenode_modules\eslint\lib\shared\deep-merge-arrays.js (Line 8:1 - Line 48:4), node_modules\@eslint\eslintrc\lib\shared\deep-merge-arrays.js (Line 6:1 - Line 46:4)
/**
* Check if the variable contains an object strictly rejecting arrays
* @param {unknown} value an object
* @returns {boolean} Whether value is an object
*/
function isObjectNotArray(value) {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
/**
* Deeply merges second on top of first, creating a new {} object if needed.
* @param {T} first Base, default value.
* @param {U} second User-specified value.
* @returns {T | U | (T & U)} Merged equivalent of second on top of first.
*/
function deepMergeObjects(first, second) {
if (second === void 0) {
return first;
}
if (!isObjectNotArray(first) || !isObjectNotArray(second)) {
return second;
}
const result = { ...first, ...second };
for (const key of Object.keys(second)) {
if (Object.prototype.propertyIsEnumerable.call(first, key)) {
result[key] = deepMergeObjects(first[key], second[key]);
}
}
return result;
}
/**
* Deeply merges second on top of first, creating a new [] array if needed.
* @param {T[]} first Base, default values.
* @param {U[]} second User-specified values.
* @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first.
*/node_modules\eslint\lib\rules\yoda.js (Line 212:5 - Line 235:7), node_modules\eslint\lib\rules\yoda.js (Line 185:6 - Line 205:7)
);
if (leftLiteral === null && rightLiteral === null) {
return false;
}
if (rightLiteral === null || leftLiteral === null) {
return true;
}
if (leftLiteral.value <= rightLiteral.value) {
return true;
}
}
return false;
}
/**
* Determines whether node is wrapped in parentheses.
* @returns {boolean} Whether node is preceded immediately by an open
* paren token and followed immediately by a close
* paren token.
*/node_modules\eslint\lib\rules\wrap-regex.js (Line 7:1 - Line 31:13), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "wrap-regex"node_modules\eslint\lib\rules\wrap-iife.js (Line 36:1 - Line 58:12), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 9:1 - Line 31:21)
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "wrap-iife"node_modules\eslint\lib\rules\template-tag-spacing.js (Line 7:1 - Line 31:23), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "template-tag-spacing"node_modules\eslint\lib\rules\template-curly-spacing.js (Line 13:2 - Line 37:25), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:13 - Line 31:21)
;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "template-curly-spacing"node_modules\eslint\lib\rules\switch-colon-spacing.js (Line 7:1 - Line 37:23), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "switch-colon-spacing"node_modules\eslint\lib\rules\spaced-comment.js (Line 136:4 - Line 161:17), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "spaced-comment"node_modules\eslint\lib\rules\space-unary-ops.js (Line 6:1 - Line 36:18), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-unary-ops"node_modules\eslint\lib\rules\space-infix-ops.js (Line 8:2 - Line 32:18), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 13:2 - Line 31:21)
= require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-infix-ops"node_modules\eslint\lib\rules\space-in-parens.js (Line 8:1 - Line 32:18), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 13:1 - Line 31:21)
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-in-parens"node_modules\eslint\lib\rules\space-before-function-paren.js (Line 6:1 - Line 36:30), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-before-function-paren"node_modules\eslint\lib\rules\space-before-blocks.js (Line 31:2 - Line 56:22), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "space-before-blocks"node_modules\eslint\lib\rules\semi.js (Line 12:2 - Line 37:7), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:13 - Line 31:21)
;
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "semi"node_modules\eslint\lib\rules\semi-style.js (Line 85:1 - Line 103:13), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 13:1 - Line 31:21)
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "semi-style"node_modules\eslint\lib\rules\semi-spacing.js (Line 7:1 - Line 33:15), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "semi-spacing"node_modules\eslint\lib\rules\rest-spread-spacing.js (Line 7:1 - Line 31:22), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "rest-spread-spacing"node_modules\eslint\lib\rules\quotes.js (Line 97:1 - Line 115:9), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 13:1 - Line 31:21)
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "quotes"node_modules\eslint\lib\rules\quote-props.js (Line 14:19 - Line 38:14), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 13:20 - Line 31:21)
);
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "quote-props"node_modules\eslint\lib\rules\prefer-named-capture-group.js (Line 174:4 - Line 187:6), node_modules\eslint\lib\rules\prefer-regex-literals.js (Line 402:4 - Line 415:3)
Program(node) {
const scope = sourceCode.getScope(node);
const tracker = new ReferenceTracker(scope);
const traceMap = {
RegExp: {
[CALL]: true,
[CONSTRUCT]: true,
},
};
for (const { node: refNode } of tracker.iterateGlobalReferences(
traceMap,
)) {
constnode_modules\eslint\lib\rules\padding-line-between-statements.js (Line 383:2 - Line 407:34), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:13 - Line 31:21)
;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "padding-line-between-statements"node_modules\eslint\lib\rules\padded-blocks.js (Line 7:1 - Line 37:16), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "padded-blocks"node_modules\eslint\lib\rules\operator-linebreak.js (Line 7:1 - Line 37:21), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "operator-linebreak"node_modules\eslint\lib\rules\one-var-declaration-per-line.js (Line 6:1 - Line 30:31), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "one-var-declaration-per-line"node_modules\eslint\lib\rules\object-property-newline.js (Line 7:1 - Line 31:26), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "object-property-newline"node_modules\eslint\lib\rules\object-curly-spacing.js (Line 6:1 - Line 32:23), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "object-curly-spacing"node_modules\eslint\lib\rules\object-curly-spacing.js (Line 342:5 - Line 357:77), node_modules\eslint\lib\rules\object-curly-spacing.js (Line 315:2 - Line 334:6)
first = sourceCode.getTokenBefore(firstSpecifier),
last = sourceCode.getTokenAfter(
lastSpecifier,
astUtils.isNotCommaToken,
),
second = sourceCode.getTokenAfter(first, {
includeComments: true,
}),
penultimate = sourceCode.getTokenBefore(last, {
includeComments: true,
});
validateBraceSpacing(node, first, second, penultimate, last);
}
//--------------------------------------------------------------------------node_modules\eslint\lib\rules\object-curly-newline.js (Line 151:2 - Line 176:23), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "object-curly-newline"node_modules\eslint\lib\rules\nonblock-statement-body-position.js (Line 14:1 - Line 32:35), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 13:1 - Line 31:21)
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "nonblock-statement-body-position"node_modules\eslint\lib\rules\no-whitespace-before-property.js (Line 6:1 - Line 36:32), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-whitespace-before-property"node_modules\eslint\lib\rules\no-useless-constructor.js (Line 131:1 - Line 150:4), node_modules\eslint-plugin-react\lib\rules\prefer-stateless-function.js (Line 159:5 - Line 179:8)
function isPassingThrough(ctorParams, superArgs) {
if (ctorParams.length !== superArgs.length) {
return false;
}
for (let i = 0; i < ctorParams.length; ++i) {
if (!isValidPair(ctorParams[i], superArgs[i])) {
return false;
}
}
return true;
}
/**
* Checks whether the constructor body is a redundant super call.
* @param {Array} body constructor body content.
* @param {Array} ctorParams The params to check against super call.
* @returns {boolean} true if the constructor body is redundant
*/node_modules\eslint\lib\rules\no-useless-constructor.js (Line 151:1 - Line 160:81), node_modules\eslint-plugin-react\lib\rules\prefer-stateless-function.js (Line 180:5 - Line 195:8)
function isRedundantSuperCall(body, ctorParams) {
return (
isSingleSuperCall(body) &&
ctorParams.every(isSimple) &&
(isSpreadArguments(body[0].expression.arguments) ||
isPassingThrough(ctorParams, body[0].expression.arguments))
);
}
//------------------------------------------------------------------------------node_modules\eslint\lib\rules\no-use-before-define.js (Line 247:2 - Line 265:81), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-use-before-define.js (Line 100:2 - Line 121:4)
||
variable.defs[0].node.decorators.length === 0
) {
return false;
}
for (const deco of variable.defs[0].node.decorators) {
if (
reference.identifier.range[0] >= deco.range[0] &&
reference.identifier.range[1] <= deco.range[1]
) {
return true;
}
}
return false;
}
//------------------------------------------------------------------------------node_modules\eslint\lib\rules\no-unreachable-loop.js (Line 123:4 - Line 144:2), node_modules\eslint\lib\rules\no-unreachable.js (Line 197:4 - Line 218:2)
onCodePathStart() {
codePathSegments.push(currentCodePathSegments);
currentCodePathSegments = new Set();
},
onCodePathEnd() {
currentCodePathSegments = codePathSegments.pop();
},
onUnreachableCodePathSegmentStart(segment) {
currentCodePathSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
currentCodePathSegments.delete(segment);
},
onCodePathSegmentEnd(segment) {
currentCodePathSegments.delete(segment);
},
onCodePathSegmentStart(segment,node_modules\eslint\lib\rules\no-trailing-spaces.js (Line 16:1 - Line 44:21), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 9:1 - Line 31:21)
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-trailing-spaces"node_modules\eslint\lib\rules\no-tabs.js (Line 18:1 - Line 38:10), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 11:1 - Line 31:21)
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-tabs"node_modules\eslint\lib\rules\no-shadow.js (Line 294:2 - Line 326:6), node_modules\eslint\lib\rules\no-use-before-define.js (Line 186:7 - Line 218:4)
;
while (node) {
if (node.type === "VariableDeclarator") {
if (isInRange(node.init, location)) {
return true;
}
if (
FOR_IN_OF_TYPE.test(node.parent.parent.type) &&
isInRange(node.parent.parent.right, location)
) {
return true;
}
break;
} else if (node.type === "AssignmentPattern") {
if (isInRange(node.right, location)) {
return true;
}
} else if (SENTINEL_TYPE.test(node.type)) {
break;
}
node = node.parent;
}
return false;
}
/**
* Check if variable name is allowed.
* @param {ASTNode} variable The variable to check.
* @returns {boolean} Whether or not the variable name is allowed.
*/node_modules\eslint\lib\rules\no-restricted-modules.js (Line 48:1 - Line 65:24), node_modules\eslint\lib\rules\no-sync.js (Line 13:1 - Line 30:10)
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-restricted-require"node_modules\eslint\lib\rules\no-restricted-imports.js (Line 17:2 - Line 32:12), node_modules\eslint\lib\rules\no-restricted-modules.js (Line 24:2 - Line 39:2)
;
const arrayOfStringsOrObjects = {
type: "array",
items: {
anyOf: [
{ type: "string" },
{
type: "object",
properties: {
name: { type: "string" },
message: {
type: "string",
minLength: 1,
},
importNamesnode_modules\eslint\lib\rules\no-restricted-imports.js (Line 237:3 - Line 246:23), node_modules\eslint\lib\rules\no-restricted-modules.js (Line 109:3 - Line 118:19)
const options = Array.isArray(context.options) ? context.options : [];
const isPathAndPatternsObject =
typeof options[0] === "object" &&
(Object.hasOwn(options[0], "paths") ||
Object.hasOwn(options[0], "patterns"));
const restrictedPaths =
(isPathAndPatternsObject ? options[0].paths : context.options) ||
[];
const groupedRestrictedPathsnode_modules\eslint\lib\rules\no-restricted-imports.js (Line 479:11 - Line 496:40), node_modules\eslint\lib\rules\no-restricted-imports.js (Line 353:7 - Line 371:30)
,
data: {
importSource,
customMessage,
},
});
return;
}
importNames.forEach((specifiers, importName) => {
if (importName === "*") {
const [specifier] = specifiers;
if (restrictedImportNames) {
context.report({
node,
messageId: customMessage
? "patternAndEverythingWithCustomMessage"node_modules\eslint\lib\rules\no-restricted-imports.js (Line 497:23 - Line 518:5), node_modules\eslint\lib\rules\no-restricted-imports.js (Line 372:13 - Line 395:7)
,
loc: specifier.loc,
data: {
importSource,
importNames: restrictedImportNames,
customMessage,
},
});
} else if (allowedImportNames) {
context.report({
node,
messageId: customMessage
? "everythingWithAllowImportNamesAndCustomMessage"
: "everythingWithAllowImportNames",
loc: specifier.loc,
data: {
importSource,
allowedImportNames,
customMessage,
},
});
} elsenode_modules\eslint\lib\rules\no-restricted-imports.js (Line 560:23 - Line 578:10), node_modules\eslint\lib\rules\no-restricted-imports.js (Line 407:13 - Line 425:4)
,
loc: specifier.loc,
data: {
importSource,
customMessage,
importName,
},
});
});
}
if (
allowedImportNames &&
!allowedImportNames.includes(importName)
) {
specifiers.forEach(specifier => {
context.report({
node,
messageIdnode_modules\eslint\lib\rules\no-process-exit.js (Line 6:1 - Line 29:18), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-process-exit"node_modules\eslint\lib\rules\no-process-env.js (Line 6:1 - Line 29:17), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-process-env"node_modules\eslint\lib\rules\no-path-concat.js (Line 6:1 - Line 29:17), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-path-concat"node_modules\eslint\lib\rules\no-new-require.js (Line 7:1 - Line 30:17), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-new-require"node_modules\eslint\lib\rules\no-new-native-nonconstructor.js (Line 46:19 - Line 60:22), node_modules\eslint\lib\rules\no-new-symbol.js (Line 52:9 - Line 66:14)
);
if (variable && variable.defs.length === 0) {
variable.references.forEach(ref => {
const idNode = ref.identifier;
const parent = idNode.parent;
if (
parent &&
parent.type === "NewExpression" &&
parent.callee === idNode
) {
context.report({
node: idNode,
messageId: "noNewNonconstructor"node_modules\eslint\lib\rules\no-multiple-empty-lines.js (Line 7:1 - Line 31:26), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-multiple-empty-lines"node_modules\eslint\lib\rules\no-multi-spaces.js (Line 7:1 - Line 33:18), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-multi-spaces"node_modules\eslint\lib\rules\no-mixed-spaces-and-tabs.js (Line 6:1 - Line 30:27), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-mixed-spaces-and-tabs"node_modules\eslint\lib\rules\no-mixed-requires.js (Line 7:1 - Line 30:20), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-mixed-requires"node_modules\eslint\lib\rules\no-mixed-operators.js (Line 79:5 - Line 104:21), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-mixed-operators"node_modules\eslint\lib\rules\no-loop-func.js (Line 121:3 - Line 143:6), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-loop-func.js (Line 74:9 - Line 90:12)
function getTopLoopNode(node, excludedNode) {
const border = excludedNode ? excludedNode.range[1] : 0;
let retv = node;
let containingLoopNode = node;
while (
containingLoopNode &&
containingLoopNode.range[0] >= border
) {
retv = containingLoopNode;
containingLoopNode = getContainingLoopNode(containingLoopNode);
}
return retv;
}
/**
* Checks whether a given reference which refers to an upper scope's variable is
* safe or not.
* @param {ASTNode} loopNode A containing loop node.
* @param {eslint-scope.Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is safe or not.
*/node_modules\eslint\lib\rules\no-global-assign.js (Line 48:8 - Line 71:28), node_modules\eslint\lib\rules\no-native-reassign.js (Line 63:11 - Line 86:17)
;
/**
* Reports write references.
* @param {Reference} reference A reference to check.
* @param {number} index The index of the reference in the references.
* @param {Reference[]} references The array that the reference belongs to.
* @returns {void}
*/
function checkReference(reference, index, references) {
const identifier = reference.identifier;
if (
reference.init === false &&
reference.isWrite() &&
/*
* Destructuring assignments can have multiple default value,
* so possibly there are multiple writeable references for the same identifier.
*/
(index === 0 || references[index - 1].identifier !== identifier)
) {
context.report({
node: identifier,
messageId: "globalShouldNotBeModified"node_modules\eslint\lib\rules\no-global-assign.js (Line 74:2 - Line 101:2), node_modules\eslint\lib\rules\no-native-reassign.js (Line 87:11 - Line 114:2)
,
});
}
}
/**
* Reports write references if a given variable is read-only builtin.
* @param {Variable} variable A variable to check.
* @returns {void}
*/
function checkVariable(variable) {
if (
variable.writeable === false &&
!exceptions.includes(variable.name)
) {
variable.references.forEach(checkReference);
}
}
return {
Program(node) {
const globalScope = sourceCode.getScope(node);
globalScope.variables.forEach(checkVariable);
},
};
},
};node_modules\eslint\lib\rules\no-floating-decimal.js (Line 7:1 - Line 37:22), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-floating-decimal"node_modules\eslint\lib\rules\no-fallthrough.js (Line 169:5 - Line 189:23), node_modules\eslint\lib\rules\no-unreachable-loop.js (Line 120:2 - Line 214:21)
;
return {
onCodePathStart() {
codePathSegments.push(currentCodePathSegments);
currentCodePathSegments = new Set();
},
onCodePathEnd() {
currentCodePathSegments = codePathSegments.pop();
},
onUnreachableCodePathSegmentStart(segment) {
currentCodePathSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
currentCodePathSegments.delete(segment);
},
onCodePathSegmentStartnode_modules\eslint\lib\rules\no-extra-semi.js (Line 7:1 - Line 38:16), node_modules\eslint\lib\rules\semi.js (Line 6:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const FixTracker = require("./utils/fix-tracker");
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-extra-semi"node_modules\eslint\lib\rules\no-const-assign.js (Line 39:26 - Line 57:8), node_modules\eslint\lib\rules\no-ex-assign.js (Line 28:44 - Line 46:13)
,
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Finds and reports references that are non initializer and writable.
* @param {Variable} variable A variable to check.
* @returns {void}
*/
function checkVariable(variable) {
astUtils
.getModifyingReferences(variable.references)
.forEach(reference => {
context.report({
node: reference.identifier,
messageId: "const"node_modules\eslint\lib\rules\no-confusing-arrow.js (Line 22:24 - Line 47:21), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-confusing-arrow"node_modules\eslint\lib\rules\no-class-assign.js (Line 28:25 - Line 46:8), node_modules\eslint\lib\rules\no-ex-assign.js (Line 28:44 - Line 46:13)
,
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Finds and reports references that are non initializer and writable.
* @param {Variable} variable A variable to check.
* @returns {void}
*/
function checkVariable(variable) {
astUtils
.getModifyingReferences(variable.references)
.forEach(reference => {
context.report({
node: reference.identifier,
messageId: "class"node_modules\eslint\lib\rules\no-buffer-constructor.js (Line 6:1 - Line 29:20), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-deprecated-api"node_modules\eslint\lib\rules\newline-per-chained-call.js (Line 8:1 - Line 34:27), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "newline-per-chained-call"node_modules\eslint\lib\rules\newline-after-var.js (Line 38:53 - Line 66:31), node_modules\eslint\lib\rules\newline-before-return.js (Line 26:44 - Line 54:77)
,
},
deprecated: {
message: "The rule was replaced with a more general rule.",
url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
deprecatedSince: "4.0.0",
availableUntil: null,
replacedBy: [
{
message: "The new rule moved to a plugin.",
url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "padding-line-between-statements",
url: "https://eslint.style/rules/padding-line-between-statements",
},
},
],
},
},
create(context) {
const sourceCode = context.sourceCode;
// Default `mode` to "always".node_modules\eslint\lib\rules\new-parens.js (Line 19:1 - Line 41:13), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 9:1 - Line 31:21)
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "new-parens"node_modules\eslint\lib\rules\multiline-ternary.js (Line 7:1 - Line 33:20), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "multiline-ternary"node_modules\eslint\lib\rules\max-statements-per-line.js (Line 6:1 - Line 36:26), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "max-statements-per-line"node_modules\eslint\lib\rules\max-params.js (Line 30:50 - Line 51:14), node_modules\eslint\lib\rules\max-statements.js (Line 28:54 - Line 49:2)
,
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
countVoidThisnode_modules\eslint\lib\rules\max-nested-callbacks.js (Line 20:60 - Line 46:2), node_modules\eslint\lib\rules\max-statements.js (Line 28:54 - Line 54:2)
,
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
},
additionalProperties: false,
},
],
},
]node_modules\eslint\lib\rules\max-len.js (Line 60:2 - Line 85:10), node_modules\eslint\lib\rules\padding-line-between-statements.js (Line 382:2 - Line 31:21)
,
};
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "max-len"node_modules\eslint\lib\rules\max-depth.js (Line 20:49 - Line 48:10), node_modules\eslint\lib\rules\max-statements.js (Line 28:54 - Line 48:7)
,
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
},
additionalProperties: false,
},
],
},
],
messages: {
tooDeeplynode_modules\eslint\lib\rules\lines-between-class-members.js (Line 26:2 - Line 51:30), node_modules\eslint\lib\rules\padding-line-between-statements.js (Line 382:2 - Line 31:21)
,
};
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "lines-between-class-members"node_modules\eslint\lib\rules\lines-between-class-members.js (Line 266:3 - Line 274:10), node_modules\eslint\lib\rules\padding-line-between-statements.js (Line 512:3 - Line 520:13)
function getPaddingType(prevNode, nextNode) {
for (let i = configureList.length - 1; i >= 0; --i) {
const configure = configureList[i];
const matched =
match(prevNode, configure.prev) &&
match(nextNode, configure.next);
if (matched) {
return configurenode_modules\eslint\lib\rules\lines-around-directive.js (Line 53:57 - Line 79:6), node_modules\eslint\lib\rules\newline-before-return.js (Line 26:44 - Line 54:77)
,
},
deprecated: {
message: "The rule was replaced with a more general rule.",
url: "https://eslint.org/blog/2017/06/eslint-v4.0.0-released/",
deprecatedSince: "4.0.0",
availableUntil: null,
replacedBy: [
{
message: "The new rule moved to a plugin.",
url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "padding-line-between-statements",
url: "https://eslint.style/rules/padding-line-between-statements",
},
},
],
},
},
create(context) {
const sourceCode = context.sourceCode;
constnode_modules\eslint\lib\rules\lines-around-comment.js (Line 49:6 - Line 74:23), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "lines-around-comment"node_modules\eslint\lib\rules\linebreak-style.js (Line 17:1 - Line 45:18), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 9:1 - Line 31:21)
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "linebreak-style"node_modules\eslint\lib\rules\line-comment-position.js (Line 6:1 - Line 32:24), node_modules\eslint\lib\rules\multiline-comment-style.js (Line 6:1 - Line 32:26)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "9.3.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "line-comment-position"node_modules\eslint\lib\rules\keyword-spacing.js (Line 71:6 - Line 96:18), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "keyword-spacing"node_modules\eslint\lib\rules\keyword-spacing.js (Line 185:20 - Line 195:11), node_modules\eslint\lib\rules\keyword-spacing.js (Line 156:18 - Line 166:2)
(token, pattern) {
const prevToken = sourceCode.getTokenBefore(token);
if (
prevToken &&
(CHECK_TYPE.test(prevToken.type) ||
pattern.test(prevToken.value)) &&
!isOpenParenOfTemplate(prevToken) &&
!tokensToIgnore.has(prevToken) &&
astUtils.isTokenOnSameLine(prevToken, token) &&
sourceCodenode_modules\eslint\lib\rules\keyword-spacing.js (Line 246:19 - Line 256:11), node_modules\eslint\lib\rules\keyword-spacing.js (Line 217:17 - Line 227:2)
(token, pattern) {
const nextToken = sourceCode.getTokenAfter(token);
if (
nextToken &&
(CHECK_TYPE.test(nextToken.type) ||
pattern.test(nextToken.value)) &&
!isCloseParenOfTemplate(nextToken) &&
!tokensToIgnore.has(nextToken) &&
astUtils.isTokenOnSameLine(token, nextToken) &&
sourceCodenode_modules\eslint\lib\rules\key-spacing.js (Line 140:10 - Line 165:14), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "key-spacing"node_modules\eslint\lib\rules\key-spacing.js (Line 264:15 - Line 289:2), node_modules\eslint\lib\rules\key-spacing.js (Line 200:8 - Line 225:2)
],
},
beforeColon: {
type: "boolean",
},
afterColon: {
type: "boolean",
},
},
additionalProperties: false,
},
],
},
mode: {
enum: ["strict", "minimum"],
},
beforeColon: {
type: "boolean",
},
afterColon: {
type: "boolean",
},
},
additionalProperties: false,
},
}node_modules\eslint\lib\rules\key-spacing.js (Line 287:6 - Line 313:5), node_modules\eslint\lib\rules\key-spacing.js (Line 220:10 - Line 246:6)
,
},
},
additionalProperties: false,
},
{
type: "object",
properties: {
singleLine: {
type: "object",
properties: {
mode: {
enum: ["strict", "minimum"],
},
beforeColon: {
type: "boolean",
},
afterColon: {
type: "boolean",
},
},
additionalProperties: false,
},
multiLine: {
type: "object",
properties: {
modenode_modules\eslint\lib\rules\key-spacing.js (Line 325:2 - Line 343:2), node_modules\eslint\lib\rules\key-spacing.js (Line 193:10 - Line 211:2)
{
type: "object",
properties: {
mode: {
enum: ["strict", "minimum"],
},
on: {
enum: ["colon", "value"],
},
beforeColon: {
type: "boolean",
},
afterColon: {
type: "boolean",
},
},
additionalProperties: false,
},
}node_modules\eslint\lib\rules\jsx-quotes.js (Line 33:2 - Line 58:13), node_modules\eslint\lib\rules\lines-between-class-members.js (Line 26:2 - Line 31:21)
},
};
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "jsx-quotes"node_modules\eslint\lib\rules\implicit-arrow-linebreak.js (Line 8:2 - Line 31:27), node_modules\eslint\lib\rules\space-infix-ops.js (Line 8:2 - Line 31:21)
} = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "implicit-arrow-linebreak"node_modules\eslint\lib\rules\id-match.js (Line 108:2 - Line 131:6), node_modules\eslint\lib\rules\valid-typeof.js (Line 70:12 - Line 92:6)
;
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Checks if a string matches the provided pattern
* @param {string} name The string to check.
* @returns {boolean} if the string is a match
* @private
*/node_modules\eslint\lib\rules\id-denylist.js (Line 130:3 - Line 150:6), node_modules\eslint\lib\rules\valid-typeof.js (Line 72:3 - Line 92:6)
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Determines whether the given node should be checked.
* @param {ASTNode} node `Identifier` node.
* @returns {boolean} `true` if the node should be checked.
*/node_modules\eslint\lib\rules\id-blacklist.js (Line 8:13 - Line 65:4), node_modules\eslint\lib\rules\id-denylist.js (Line 13:2 - Line 70:4)
;
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether the given node represents assignment target in a normal assignment or destructuring.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is assignment target.
*/
function isAssignmentTarget(node) {
const parent = node.parent;
return (
// normal assignment
(parent.type === "AssignmentExpression" && parent.left === node) ||
// destructuring
parent.type === "ArrayPattern" ||
parent.type === "RestElement" ||
(parent.type === "Property" &&
parent.value === node &&
parent.parent.type === "ObjectPattern") ||
(parent.type === "AssignmentPattern" && parent.left === node)
);
}
/**
* Checks whether the given node represents an imported name that is renamed in the same import/export specifier.
*
* Examples:
* import { a as b } from 'mod'; // node `a` is renamed import
* export { a as b } from 'mod'; // node `a` is renamed import
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a renamed import.
*/
function isRenamedImport(node) {
const parent = node.parent;
return (
(parent.type === "ImportSpecifier" &&
parent.imported !== parent.local &&
parent.imported === node) ||
(parent.type === "ExportSpecifier" &&
parent.parent.source && // re-export
parent.local !== parent.exported &&
parent.local === node)
);
}
/**
* Checks whether the given node is a renamed identifier node in an ObjectPattern destructuring.
*
* Examples:
* const { a : b } = foo; // node `a` is renamed node.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a renamed node in an ObjectPattern destructuring.
*/node_modules\eslint\lib\rules\id-blacklist.js (Line 131:39 - Line 174:6), node_modules\eslint\lib\rules\id-denylist.js (Line 109:40 - Line 152:96)
,
},
},
create(context) {
const denyList = new Set(context.options);
const reportedNodes = new Set();
const sourceCode = context.sourceCode;
let globalScope;
/**
* Checks whether the given name is restricted.
* @param {string} name The name to check.
* @returns {boolean} `true` if the name is restricted.
* @private
*/
function isRestricted(name) {
return denyList.has(name);
}
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Determines whether the given node should be checked.
* @param {ASTNode} node `Identifier` node.
* @returns {boolean} `true` if the node should be checked.
*/
function shouldCheck(node) {
constnode_modules\eslint\lib\rules\id-blacklist.js (Line 174:4 - Line 193:25), node_modules\eslint\lib\rules\id-denylist.js (Line 157:4 - Line 176:30)
const parent = node.parent;
/*
* Member access has special rules for checking property names.
* Read access to a property with a restricted name is allowed, because it can be on an object that user has no control over.
* Write access isn't allowed, because it potentially creates a new property with a restricted name.
*/
if (
parent.type === "MemberExpression" &&
parent.property === node &&
!parent.computed
) {
return isAssignmentTarget(parent);
}
return (
parent.type !== "CallExpression" &&
parent.type !== "NewExpression" &&
!isRenamedImport(node) &&
!isRenamedInDestructuringnode_modules\eslint\lib\rules\id-blacklist.js (Line 220:10 - Line 234:11), node_modules\eslint\lib\rules\id-denylist.js (Line 202:2 - Line 216:2)
: "restricted",
data: {
name: node.name,
},
});
reportedNodes.add(node.range.toString());
}
}
return {
Program(node) {
globalScope = sourceCode.getScope(node);
},
Identifiernode_modules\eslint\lib\rules\handle-callback-err.js (Line 7:1 - Line 30:22), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "handle-callback-err"node_modules\eslint\lib\rules\global-require.js (Line 21:1 - Line 38:21), node_modules\eslint\lib\rules\no-alert.js (Line 30:1 - Line 46:7)
/**
* Finds the eslint-scope reference in the given scope.
* @param {Object} scope The scope to search.
* @param {ASTNode} node The identifier node.
* @returns {Reference|null} Returns the found reference or null if none were found.
*/
function findReference(scope, node) {
const references = scope.references.filter(
reference =>
reference.identifier.range[0] === node.range[0] &&
reference.identifier.range[1] === node.range[1],
);
if (references.length === 1) {
return references[0];
}
/* c8 ignore next */node_modules\eslint\lib\rules\global-require.js (Line 56:1 - Line 73:17), node_modules\eslint\lib\rules\no-sync.js (Line 13:1 - Line 30:10)
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "global-require"node_modules\eslint\lib\rules\generator-star-spacing.js (Line 13:2 - Line 27:2), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 49:4 - Line 63:2)
{
oneOf: [
{
enum: ["before", "after", "both", "neither"],
},
{
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" },
},
additionalProperties: false,
},
],
};node_modules\eslint\lib\rules\generator-star-spacing.js (Line 27:1 - Line 47:25), node_modules\eslint\lib\rules\nonblock-statement-body-position.js (Line 12:2 - Line 31:21)
};
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "generator-star-spacing"node_modules\eslint\lib\rules\generator-star-spacing.js (Line 59:62 - Line 75:6), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 43:58 - Line 59:2)
,
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
enum: ["before", "after", "both", "neither"],
},
{
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" },
namednode_modules\eslint\lib\rules\generator-star-spacing.js (Line 94:2 - Line 99:2), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 78:2 - Line 83:2)
{
before: { before: true, after: false },
after: { before: false, after: true },
both: { before: true, after: true },
neither: { before: false, after: false },
};node_modules\eslint\lib\rules\generator-star-spacing.js (Line 184:5 - Line 207:6), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 117:5 - Line 140:6)
context.report({
node,
messageId,
fix(fixer) {
if (spaceRequired) {
if (after) {
return fixer.insertTextAfter(node, " ");
}
return fixer.insertTextBefore(node, " ");
}
return fixer.removeRange([
leftToken.range[1],
rightToken.range[0],
]);
},
});
}
}
/**
* Enforces the spacing around the star if node is a generator function.
* @param {ASTNode} node A function expression or declaration node.
* @returns {void}
*/node_modules\eslint\lib\rules\function-paren-newline.js (Line 6:1 - Line 36:25), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-paren-newline"node_modules\eslint\lib\rules\function-call-argument-newline.js (Line 7:1 - Line 31:33), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-call-argument-newline"node_modules\eslint\lib\rules\func-style.js (Line 192:2 - Line 205:7), node_modules\eslint\lib\rules\func-style.js (Line 143:2 - Line 156:5)
&&
(typeof exportFunctionStyle === "undefined" ||
node.parent.parent.parent.type !==
"ExportNamedDeclaration") &&
!(allowTypeAnnotation && node.parent.id.typeAnnotation)
) {
context.report({
node: node.parent,
messageId: "declaration",
});
}
if (
node.parent.parentnode_modules\eslint\lib\rules\func-style.js (Line 205:7 - Line 216:2), node_modules\eslint\lib\rules\func-style.js (Line 157:6 - Line 167:2)
node.parent.parent.parent.type ===
"ExportNamedDeclaration" &&
exportFunctionStyle === "declaration" &&
!(allowTypeAnnotation && node.parent.id.typeAnnotation)
) {
context.report({
node: node.parent,
messageId: "declaration",
});
}
}
}node_modules\eslint\lib\rules\func-name-matching.js (Line 308:9 - Line 319:11), node_modules\eslint\lib\rules\func-name-matching.js (Line 294:19 - Line 306:15)
,
node.parent.parent.parent.parent,
)
) {
propertyName = node.parent.parent.key.name;
if (
!node.parent.parent.computed &&
shouldWarn(propertyName, functionName)
) {
report(node, propertyName, functionName, true);
}
} else if (shouldWarnnode_modules\eslint\lib\rules\func-call-spacing.js (Line 7:1 - Line 37:24), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-call-spacing"node_modules\eslint\lib\rules\eol-last.js (Line 6:1 - Line 30:11), node_modules\eslint\lib\rules\yield-star-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "eol-last"node_modules\eslint\lib\rules\dot-location.js (Line 7:1 - Line 33:15), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "dot-location"node_modules\eslint\lib\rules\constructor-super.js (Line 311:4 - Line 335:2), node_modules\eslint\lib\rules\no-this-before-super.js (Line 274:4 - Line 298:30)
},
onUnreachableCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
onCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
/**
* Update information of the code path segment when a code path was
* looped.
* @param {CodePathSegment} fromSegment The code path segment of the
* end of a loop.
* @param {CodePathSegment} toSegment A code path segment of the head
* of a loop.
* @returns {void}
*/
onCodePathSegmentLoop(fromSegment, toSegment) {
if (!(node_modules\eslint\lib\rules\consistent-return.js (Line 158:4 - Line 178:58), node_modules\eslint\lib\rules\getter-return.js (Line 198:4 - Line 217:41)
onCodePathEnd() {
funcInfo = funcInfo.upper;
},
onUnreachableCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
onCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
// Reports a given return statement if it's inconsistent.node_modules\eslint\lib\rules\computed-property-spacing.js (Line 6:1 - Line 32:28), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "computed-property-spacing"node_modules\eslint\lib\rules\computed-property-spacing.js (Line 146:11 - Line 164:21), node_modules\eslint\lib\rules\object-curly-spacing.js (Line 168:6 - Line 186:21)
: token.value,
},
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
/**
* Reports that there should be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredEndingSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceBefore"node_modules\eslint\lib\rules\complexity.js (Line 33:50 - Line 54:8), node_modules\eslint\lib\rules\max-statements.js (Line 28:54 - Line 49:2)
,
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
variantnode_modules\eslint\lib\rules\comma-style.js (Line 7:1 - Line 33:14), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "comma-style"node_modules\eslint\lib\rules\comma-spacing.js (Line 6:1 - Line 32:16), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "comma-spacing"node_modules\eslint\lib\rules\comma-spacing.js (Line 43:53 - Line 66:8), node_modules\eslint\lib\rules\semi-spacing.js (Line 45:52 - Line 68:27)
,
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
before: {
type: "boolean",
default: false,
},
after: {
type: "boolean",
default: true,
},
},
additionalProperties: false,
},
],
messages: {
missingnode_modules\eslint\lib\rules\comma-dangle.js (Line 67:16 - Line 92:15), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "comma-dangle"node_modules\eslint\lib\rules\callback-return.js (Line 6:1 - Line 29:18), node_modules\eslint\lib\rules\no-sync.js (Line 7:1 - Line 30:10)
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: null,
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "callback-return"node_modules\eslint\lib\rules\brace-style.js (Line 7:1 - Line 33:14), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "brace-style"node_modules\eslint\lib\rules\block-spacing.js (Line 9:2 - Line 33:16), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 13:2 - Line 31:21)
= require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "block-spacing"node_modules\eslint\lib\rules\arrow-spacing.js (Line 6:1 - Line 36:16), node_modules\eslint\lib\rules\template-curly-spacing.js (Line 7:1 - Line 31:21)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "arrow-spacing"node_modules\eslint\lib\rules\arrow-parens.js (Line 24:17 - Line 49:15), node_modules\eslint\lib\rules\wrap-iife.js (Line 33:2 - Line 31:21)
;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "arrow-parens"node_modules\eslint\lib\rules\array-element-newline.js (Line 7:1 - Line 33:24), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-element-newline"node_modules\eslint\lib\rules\array-callback-return.js (Line 143:17 - Line 199:6), node_modules\eslint\lib\rules\no-promise-executor-return.js (Line 46:17 - Line 102:71)
(node) {
return node.type === "UnaryExpression" && node.operator === "void";
}
/**
* Fixes the linting error by prepending "void " to the given node
* @param {Object} sourceCode context given by context.sourceCode
* @param {ASTNode} node The node to fix.
* @param {Object} fixer The fixer object provided by ESLint.
* @returns {Array<Object>} - An array of fix objects to apply to the node.
*/
function voidPrependFixer(sourceCode, node, fixer) {
const requiresParens =
// prepending `void ` will fail if the node has a lower precedence than void
astUtils.getPrecedence(node) <
astUtils.getPrecedence({
type: "UnaryExpression",
operator: "void",
}) &&
// check if there are parentheses around the node to avoid redundant parentheses
!astUtils.isParenthesised(sourceCode, node);
// avoid parentheses issues
const returnOrArrowToken = sourceCode.getTokenBefore(
node,
node.parent.type === "ArrowFunctionExpression"
? astUtils.isArrowToken
: // isReturnToken
token => token.type === "Keyword" && token.value === "return",
);
const firstToken = sourceCode.getTokenAfter(returnOrArrowToken);
const prependSpace =
// is return token, as => allows void to be adjacent
returnOrArrowToken.value === "return" &&
// If two tokens (return and "(") are adjacent
returnOrArrowToken.range[1] === firstToken.range[0];
return [
fixer.insertTextBefore(
firstToken,
`${prependSpace ? " " : ""}void ${requiresParens ? "(" : ""}`,
),
fixer.insertTextAfter(node, requiresParens ? ")" : ""),
];
}
/**
* Fixes the linting error by `wrapping {}` around the given node's body.
* @param {Object} sourceCode context given by context.sourceCode
* @param {ASTNode} node The node to fix.
* @param {Object} fixer The fixer object provided by ESLint.
* @returns {Array<Object>} - An array of fix objects to apply to the node.
*/
function curlyWrapFixer(sourceCode, node, fixer) {
constnode_modules\eslint\lib\rules\array-callback-return.js (Line 199:2 - Line 223:14), node_modules\eslint\lib\rules\no-promise-executor-return.js (Line 103:2 - Line 127:10)
const arrowToken = sourceCode.getTokenBefore(
node.body,
astUtils.isArrowToken,
);
const firstToken = sourceCode.getTokenAfter(arrowToken);
const lastToken = sourceCode.getLastToken(node);
return [
fixer.insertTextBefore(firstToken, "{"),
fixer.insertTextAfter(lastToken, "}"),
];
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [
{
allowImplicitnode_modules\eslint\lib\rules\array-callback-return.js (Line 398:10 - Line 427:2), node_modules\eslint\lib\rules\getter-return.js (Line 191:2 - Line 219:9)
,
node,
currentSegments: new Set(),
};
},
// Pops this function's information.
onCodePathEnd() {
funcInfo = funcInfo.upper;
},
onUnreachableCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
onCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
// Checks the return statement is valid.
ReturnStatement(node) {
if (!node_modules\eslint\lib\rules\array-bracket-spacing.js (Line 6:1 - Line 32:24), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-bracket-spacing"node_modules\eslint\lib\rules\array-bracket-spacing.js (Line 75:47 - Line 97:23), node_modules\eslint\lib\rules\object-curly-spacing.js (Line 71:46 - Line 94:25)
,
},
},
create(context) {
const spaced = context.options[0] === "always",
sourceCode = context.sourceCode;
/**
* Determines whether an option is set, relative to the spacing option.
* If spaced is "always", then check whether option is set to false.
* If spaced is "never", then check whether option is set to true.
* @param {Object} option The option to exclude.
* @returns {boolean} Whether or not the property is excluded.
*/
function isOptionSet(option) {
return context.options[1]
? context.options[1][option] === !spaced
: false;
}
const options = {
spaced,
singleElementExceptionnode_modules\eslint\lib\rules\array-bracket-spacing.js (Line 120:11 - Line 138:11), node_modules\eslint\lib\rules\object-curly-spacing.js (Line 118:6 - Line 136:8)
: token.value,
},
fix(fixer) {
return fixer.removeRange([
token.range[1],
nextToken.range[0],
]);
},
});
}
/**
* Reports that there shouldn't be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoEndingSpace(node, token) {
const previousToken = sourceCodenode_modules\eslint\lib\rules\array-bracket-spacing.js (Line 145:11 - Line 166:20), node_modules\eslint\lib\rules\object-curly-spacing.js (Line 145:6 - Line 166:20)
: token.value,
},
fix(fixer) {
return fixer.removeRange([
previousToken.range[1],
token.range[0],
]);
},
});
}
/**
* Reports that there should be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredBeginningSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceAfter"node_modules\eslint\lib\rules\array-bracket-spacing.js (Line 149:14 - Line 200:6), node_modules\eslint\lib\rules\computed-property-spacing.js (Line 127:12 - Line 179:6)
.range[1],
token.range[0],
]);
},
});
}
/**
* Reports that there should be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredBeginningSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceAfter",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
/**
* Reports that there should be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredEndingSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceBefore",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextBefore(token, " ");
},
});
}
/**
* Determines if a node is an object type
* @param {ASTNode} node The node to check.
* @returns {boolean} Whether or not the node is an object type.
*/node_modules\eslint\lib\rules\array-bracket-newline.js (Line 7:1 - Line 33:24), node_modules\eslint\lib\rules\space-in-parens.js (Line 6:1 - Line 31:21)
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "10.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-bracket-newline"node_modules\eslint\lib\rules\array-bracket-newline.js (Line 51:4 - Line 71:2), node_modules\eslint\lib\rules\array-element-newline.js (Line 51:2 - Line 71:2)
{
oneOf: [
{
enum: ["always", "never", "consistent"],
},
{
type: "object",
properties: {
multiline: {
type: "boolean",
},
minItems: {
type: ["integer", "null"],
minimum: 0,
},
},
additionalProperties: false,
},
],
},
]node_modules\eslint\lib\rules\accessor-pairs.js (Line 6:1 - Line 97:4), node_modules\eslint\lib\rules\grouped-accessor-pairs.js (Line 6:1 - Line 90:81)
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/**
* Property name if it can be computed statically, otherwise the list of the tokens of the key node.
* @typedef {string|Token[]} Key
*/
/**
* Accessor nodes with the same key.
* @typedef {Object} AccessorData
* @property {Key} key Accessor's key
* @property {ASTNode[]} getters List of getter nodes.
* @property {ASTNode[]} setters List of setter nodes.
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not the given lists represent the equal tokens in the same order.
* Tokens are compared by their properties, not by instance.
* @param {Token[]} left First list of tokens.
* @param {Token[]} right Second list of tokens.
* @returns {boolean} `true` if the lists have same tokens.
*/
function areEqualTokenLists(left, right) {
if (left.length !== right.length) {
return false;
}
for (let i = 0; i < left.length; i++) {
const leftToken = left[i],
rightToken = right[i];
if (
leftToken.type !== rightToken.type ||
leftToken.value !== rightToken.value
) {
return false;
}
}
return true;
}
/**
* Checks whether or not the given keys are equal.
* @param {Key} left First key.
* @param {Key} right Second key.
* @returns {boolean} `true` if the keys are equal.
*/
function areEqualKeys(left, right) {
if (typeof left === "string" && typeof right === "string") {
// Statically computed names.
return left === right;
}
if (Array.isArray(left) && Array.isArray(right)) {
// Token lists.
return areEqualTokenLists(left, right);
}
return false;
}
/**
* Checks whether or not a given node is of an accessor kind ('get' or 'set').
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is of an accessor kind.
*/
function isAccessorKind(node) {
return node.kind === "get" || node.kind === "set";
}
/**
* Checks whether or not a given node is an argument of a specified method call.
* @param {ASTNode} node A node to check.
* @param {number} index An expected index of the node in arguments.
* @param {string} object An expected name of the object of the method.
* @param {string} property An expected name of the method.
* @returns {boolean} `true` if the node is an argument of the specified method call.
*/node_modules\eslint\lib\rules\accessor-pairs.js (Line 281:2 - Line 314:3), node_modules\eslint\lib\rules\grouped-accessor-pairs.js (Line 185:2 - Line 218:76)
isAccessorKind(node)) {
// Creates a new `AccessorData` object for the given getter or setter node.
const name = astUtils.getStaticPropertyName(node);
const key =
name !== null ? name : sourceCode.getTokens(node.key);
// Merges the given `AccessorData` object into the given accessors list.
for (let j = 0; j < accessors.length; j++) {
const accessor = accessors[j];
if (areEqualKeys(accessor.key, key)) {
accessor.getters.push(
...(node.kind === "get" ? [node] : []),
);
accessor.setters.push(
...(node.kind === "set" ? [node] : []),
);
found = true;
break;
}
}
if (!found) {
accessors.push({
key,
getters: node.kind === "get" ? [node] : [],
setters: node.kind === "set" ? [node] : [],
});
}
found = false;
}
}
for (const { getters, setters } of accessors) {
ifnode_modules\eslint\lib\config\flat-config-schema.js (Line 39:1 - Line 72:4), node_modules\eslint\lib\languages\js\validate-language-options.js (Line 29:1 - Line 56:80)
/**
* Check if a value is a non-null object.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is a non-null object.
*/
function isNonNullObject(value) {
return typeof value === "object" && value !== null;
}
/**
* Check if a value is a non-null non-array object.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is a non-null non-array object.
*/
function isNonArrayObject(value) {
return isNonNullObject(value) && !Array.isArray(value);
}
/**
* Check if a value is undefined.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is undefined.
*/
function isUndefined(value) {
return typeof value === "undefined";
}
/**
* Deeply merges two non-array objects.
* @param {Object} first The base object.
* @param {Object} second The overrides object.
* @param {Map<string, Map<string, Object>>} [mergeMap] Maps the combination of first and second arguments to a merged result.
* @returns {Object} An object with properties from both first and second.
*/node_modules\eslint\lib\config\config.js (Line 178:2 - Line 204:2), node_modules\@eslint\eslintrc\lib\shared\config-validator.js (Line 74:9 - Line 101:2)
if (!rule.meta) {
return { ...noOptionsSchema }; // default if `meta.schema` is not specified
}
const schema = rule.meta.schema;
if (typeof schema === "undefined") {
return { ...noOptionsSchema }; // default if `meta.schema` is not specified
}
// `schema:false` is an allowed explicit opt-out of options validation for the rule
if (schema === false) {
return null;
}
if (typeof schema !== "object" || schema === null) {
throw new TypeError("Rule's `meta.schema` must be an array or object");
}
// ESLint-specific array form needs to be converted into a valid JSON Schema definition
if (Array.isArray(schema)) {
if (schema.length) {
return {
type: "array",
items: schema,
minItems: 0,
maxItems: schema.length,node_modules\es-abstract\helpers\records\data-view-with-buffer-witness-record.js (Line 8:34 - Line 17:11), node_modules\es-abstract\helpers\records\typed-array-with-buffer-witness-record.js (Line 8:36 - Line 17:13)
(value) {
return !!value
&& typeof value === 'object'
&& hasOwn(value, '[[Object]]')
&& hasOwn(value, '[[CachedBufferByteLength]]')
&& (
(isInteger(value['[[CachedBufferByteLength]]']) && value['[[CachedBufferByteLength]]'] >= 0)
|| value['[[CachedBufferByteLength]]'] === 'DETACHED'
)
&& isDataViewnode_modules\es-abstract\2025\Number\signedRightShift.js (Line 11:23 - Line 21:3), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 11:25 - Line 21:4)
(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>node_modules\es-abstract\2025\Number\leftShift.js (Line 11:16 - Line 21:3), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 11:25 - Line 21:4)
(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum <<node_modules\es-abstract\2025\BigInt\index.js (Line 1:1 - Line 15:17), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 15:10)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var signedRightShiftnode_modules\es-abstract\2025\BigInt\index.js (Line 14:14 - Line 34:17), node_modules\es-abstract\2025\Number\index.js (Line 16:18 - Line 36:10)
);
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
signedRightShiftnode_modules\es-abstract\2024\tables\typed-array-objects.js (Line 5:1 - Line 18:14), node_modules\es-abstract\2025\tables\typed-array-objects.js (Line 5:1 - Line 18:14)
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'INT8',
$Uint8Array: 'UINT8',
$Uint8ClampedArray: 'UINT8C',
$Int16Array: 'INT16',
$Uint16Array: 'UINT16',
$Int32Array: 'INT32',
$Uint32Array: 'UINT32',
$BigInt64Array: 'BIGINT64',
$BigUint64Array: 'BIGUINT64',
$Float32Arraynode_modules\es-abstract\2024\tables\typed-array-objects.js (Line 17:12 - Line 32:8), node_modules\es-abstract\2025\tables\typed-array-objects.js (Line 18:10 - Line 33:8)
,
$Float32Array: 'FLOAT32',
$Float64Array: 'FLOAT64'
},
size: {
__proto__: null,
$INT8: 1,
$UINT8: 1,
$UINT8C: 1,
$INT16: 2,
$UINT16: 2,
$INT32: 4,
$UINT32: 4,
$BIGINT64: 8,
$BIGUINT64: 8,
$FLOAT32node_modules\es-abstract\2024\Number\unsignedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift
module.exports = function NumberUnsignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>> shiftCount;
};node_modules\es-abstract\2024\Number\unaryMinus.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\Number\unaryMinus.js (Line 1:1 - Line 17:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus
module.exports = function NumberUnaryMinus(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
if (isNaN(x)) {
return NaN;
}
return -x;
};node_modules\es-abstract\2024\Number\toString.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\toString.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $numberToString = callBound('Number.prototype.toString');
// https://262.ecma-international.org/14.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x, radix) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
if (!isInteger(radix) || radix < 2 || radix > 36) {
throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36');
}
return $numberToString(x, radix); // steps 1 - 12
};node_modules\es-abstract\2024\Number\subtract.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\Number\subtract.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberAdd = require('./add');
var NumberUnaryMinus = require('./unaryMinus');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract
module.exports = function NumberSubtract(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberAdd(x, NumberUnaryMinus(y));
};node_modules\es-abstract\2024\Number\signedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\signedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift
module.exports = function NumberSignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >> shiftCount;
};node_modules\es-abstract\2024\Number\sameValueZero.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\sameValueZero.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero
module.exports = function NumberSameValueZero(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN || yNaN) {
return xNaN === yNaN;
}
return x === y;
};node_modules\es-abstract\2024\Number\sameValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\sameValue.js (Line 1:1 - Line 18:2)
'use strict';
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $TypeError = require('es-errors/type');
var NumberSameValueZero = require('./sameValueZero');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue
module.exports = function NumberSameValue(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (x === 0 && y === 0) {
return !(isNegativeZero(x) ^ isNegativeZero(y));
}
return NumberSameValueZero(x, y);
};node_modules\es-abstract\2024\Number\remainder.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\Number\remainder.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var isFinite = require('math-intrinsics/isFinite');
var truncate = require('../truncate');
// https://262.ecma-international.org/14.0/#sec-numeric-types-number-remainder
module.exports = function NumberRemainder(n, d) {
if (typeof n !== 'number' || typeof d !== 'number') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers');
}
// If either operand is NaN, the result is NaN.
// If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) {
return NaN;
}
// If the dividend is finite and the divisor is an infinity, the result equals the dividend.
// If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
if (!isFinite(d) || n === 0) {
return n;
}
if (!isFinite(n) || !isFinite(d) || n === 0 || d === 0) {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be finite and nonzero');
}
var quotient = n / d;
var q = truncate(quotient);
var r = n - (d * q);
if (r === 0 && n < 0) {
return -0;
}
return r;
};node_modules\es-abstract\2024\Number\multiply.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\Number\multiply.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply
module.exports = function NumberMultiply(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) {
return NaN;
}
if (!isFinite(x) && !isFinite(y)) {
return x === y ? Infinity : -Infinity;
}
if (!isFinite(x) && y !== 0) {
return x > 0 ? Infinity : -Infinity;
}
if (!isFinite(y) && x !== 0) {
return y > 0 ? Infinity : -Infinity;
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2024\Number\lessThan.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\lessThan.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan
module.exports = function NumberLessThan(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
// If x is NaN, return undefined.
// If y is NaN, return undefined.
if (isNaN(x) || isNaN(y)) {
return void undefined;
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2024\Number\leftShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\leftShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum << shiftCount;
};node_modules\es-abstract\2024\Number\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2024\Number\exponentiate.js (Line 1:1 - Line 74:2), node_modules\es-abstract\2025\Number\exponentiate.js (Line 1:1 - Line 74:2)
'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};node_modules\es-abstract\2024\Number\equal.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\equal.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal
module.exports = function NumberEqual(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y)) {
return false;
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2024\Number\divide.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\divide.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide
module.exports = function NumberDivide(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) {
return NaN;
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2024\Number\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
module.exports = function NumberBitwiseXOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('^', x, y);
};node_modules\es-abstract\2024\Number\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR
module.exports = function NumberBitwiseOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('|', x, y);
};node_modules\es-abstract\2024\Number\bitwiseNOT.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\Number\bitwiseNOT.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT
module.exports = function NumberBitwiseNOT(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
var oldValue = ToInt32(x);
// Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer.
return ~oldValue;
};node_modules\es-abstract\2024\Number\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND
module.exports = function NumberBitwiseAND(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('&', x, y);
};node_modules\es-abstract\2024\Number\add.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\Number\add.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add
module.exports = function NumberAdd(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) {
return NaN;
}
if (!isFinite(x)) {
return x;
}
if (!isFinite(y)) {
return y;
}
if (x === y && x === 0) { // both zeroes
return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0;
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2024\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};node_modules\es-abstract\2024\BigInt\unaryMinus.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\BigInt\unaryMinus.js (Line 1:1 - Line 22:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};node_modules\es-abstract\2024\BigInt\toString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\BigInt\toString.js (Line 1:1 - Line 26:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $BigIntToString = callBound('BigInt.prototype.toString', true);
// https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x, radix) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
if (!isInteger(radix) || radix < 2 || radix > 36) {
throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36');
}
if (!$BigIntToString) {
throw new $SyntaxError('BigInt is not supported');
}
return $BigIntToString(x, radix); // steps 1 - 12
};node_modules\es-abstract\2024\BigInt\subtract.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\subtract.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};node_modules\es-abstract\2024\BigInt\signedRightShift.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\signedRightShift.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};node_modules\es-abstract\2024\BigInt\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\BigInt\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};node_modules\es-abstract\2024\BigInt\multiply.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\multiply.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2024\BigInt\lessThan.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\lessThan.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2024\BigInt\leftShift.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\leftShift.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};node_modules\es-abstract\2024\BigInt\index.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 39:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2024\BigInt\exponentiate.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\BigInt\exponentiate.js (Line 1:1 - Line 29:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};node_modules\es-abstract\2024\BigInt\equal.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\equal.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2024\BigInt\divide.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\BigInt\divide.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2024\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};node_modules\es-abstract\2024\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};node_modules\es-abstract\2024\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};node_modules\es-abstract\2024\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};node_modules\es-abstract\2024\BigInt\add.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\add.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2023\Number\unsignedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift
module.exports = function NumberUnsignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>> shiftCount;
};node_modules\es-abstract\2023\Number\unaryMinus.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\Number\unaryMinus.js (Line 1:1 - Line 17:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus
module.exports = function NumberUnaryMinus(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
if (isNaN(x)) {
return NaN;
}
return -x;
};node_modules\es-abstract\2023\Number\toString.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\toString.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $numberToString = callBound('Number.prototype.toString');
// https://262.ecma-international.org/14.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x, radix) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
if (!isInteger(radix) || radix < 2 || radix > 36) {
throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36');
}
return $numberToString(x, radix); // steps 1 - 12
};node_modules\es-abstract\2023\Number\subtract.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\Number\subtract.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberAdd = require('./add');
var NumberUnaryMinus = require('./unaryMinus');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract
module.exports = function NumberSubtract(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberAdd(x, NumberUnaryMinus(y));
};node_modules\es-abstract\2023\Number\signedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\signedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift
module.exports = function NumberSignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >> shiftCount;
};node_modules\es-abstract\2023\Number\sameValueZero.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\sameValueZero.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero
module.exports = function NumberSameValueZero(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN || yNaN) {
return xNaN === yNaN;
}
return x === y;
};node_modules\es-abstract\2023\Number\sameValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\sameValue.js (Line 1:1 - Line 18:2)
'use strict';
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $TypeError = require('es-errors/type');
var NumberSameValueZero = require('./sameValueZero');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue
module.exports = function NumberSameValue(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (x === 0 && y === 0) {
return !(isNegativeZero(x) ^ isNegativeZero(y));
}
return NumberSameValueZero(x, y);
};node_modules\es-abstract\2023\Number\remainder.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\Number\remainder.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var isFinite = require('math-intrinsics/isFinite');
var truncate = require('../truncate');
// https://262.ecma-international.org/14.0/#sec-numeric-types-number-remainder
module.exports = function NumberRemainder(n, d) {
if (typeof n !== 'number' || typeof d !== 'number') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers');
}
// If either operand is NaN, the result is NaN.
// If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) {
return NaN;
}
// If the dividend is finite and the divisor is an infinity, the result equals the dividend.
// If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
if (!isFinite(d) || n === 0) {
return n;
}
if (!isFinite(n) || !isFinite(d) || n === 0 || d === 0) {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be finite and nonzero');
}
var quotient = n / d;
var q = truncate(quotient);
var r = n - (d * q);
if (r === 0 && n < 0) {
return -0;
}
return r;
};node_modules\es-abstract\2023\Number\multiply.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\Number\multiply.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply
module.exports = function NumberMultiply(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) {
return NaN;
}
if (!isFinite(x) && !isFinite(y)) {
return x === y ? Infinity : -Infinity;
}
if (!isFinite(x) && y !== 0) {
return x > 0 ? Infinity : -Infinity;
}
if (!isFinite(y) && x !== 0) {
return y > 0 ? Infinity : -Infinity;
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2023\Number\lessThan.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\lessThan.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan
module.exports = function NumberLessThan(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
// If x is NaN, return undefined.
// If y is NaN, return undefined.
if (isNaN(x) || isNaN(y)) {
return void undefined;
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2023\Number\leftShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\leftShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum << shiftCount;
};node_modules\es-abstract\2023\Number\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2023\Number\exponentiate.js (Line 1:1 - Line 74:2), node_modules\es-abstract\2025\Number\exponentiate.js (Line 1:1 - Line 74:2)
'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};node_modules\es-abstract\2023\Number\equal.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\equal.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal
module.exports = function NumberEqual(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y)) {
return false;
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2023\Number\divide.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\divide.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide
module.exports = function NumberDivide(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) {
return NaN;
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2023\Number\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
module.exports = function NumberBitwiseXOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('^', x, y);
};node_modules\es-abstract\2023\Number\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR
module.exports = function NumberBitwiseOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('|', x, y);
};node_modules\es-abstract\2023\Number\bitwiseNOT.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\Number\bitwiseNOT.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT
module.exports = function NumberBitwiseNOT(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
var oldValue = ToInt32(x);
// Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer.
return ~oldValue;
};node_modules\es-abstract\2023\Number\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND
module.exports = function NumberBitwiseAND(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('&', x, y);
};node_modules\es-abstract\2023\Number\add.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\Number\add.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add
module.exports = function NumberAdd(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) {
return NaN;
}
if (!isFinite(x)) {
return x;
}
if (!isFinite(y)) {
return y;
}
if (x === y && x === 0) { // both zeroes
return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0;
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2023\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};node_modules\es-abstract\2023\BigInt\unaryMinus.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\BigInt\unaryMinus.js (Line 1:1 - Line 22:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};node_modules\es-abstract\2023\BigInt\toString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\BigInt\toString.js (Line 1:1 - Line 26:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $BigIntToString = callBound('BigInt.prototype.toString', true);
// https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x, radix) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
if (!isInteger(radix) || radix < 2 || radix > 36) {
throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36');
}
if (!$BigIntToString) {
throw new $SyntaxError('BigInt is not supported');
}
return $BigIntToString(x, radix); // steps 1 - 12
};node_modules\es-abstract\2023\BigInt\subtract.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\subtract.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};node_modules\es-abstract\2023\BigInt\signedRightShift.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\signedRightShift.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};node_modules\es-abstract\2023\BigInt\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\BigInt\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};node_modules\es-abstract\2023\BigInt\multiply.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\multiply.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2023\BigInt\lessThan.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\lessThan.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2023\BigInt\leftShift.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\leftShift.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};node_modules\es-abstract\2023\BigInt\index.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 39:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2023\BigInt\exponentiate.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\BigInt\exponentiate.js (Line 1:1 - Line 29:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};node_modules\es-abstract\2023\BigInt\equal.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\equal.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2023\BigInt\divide.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\BigInt\divide.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2023\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};node_modules\es-abstract\2023\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};node_modules\es-abstract\2023\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};node_modules\es-abstract\2023\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};node_modules\es-abstract\2023\BigInt\add.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\add.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2022\tables\typed-array-objects.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2023\tables\typed-array-objects.js (Line 1:1 - Line 36:2)
'use strict';
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$BigInt64Array: 'BigInt64',
$BigUint64Array: 'BigUint64',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$BigInt64: 8,
$BigUint64: 8,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'
};node_modules\es-abstract\2022\Number\unsignedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift
module.exports = function NumberUnsignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>> shiftCount;
};node_modules\es-abstract\2022\Number\unaryMinus.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\Number\unaryMinus.js (Line 1:1 - Line 17:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus
module.exports = function NumberUnaryMinus(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
if (isNaN(x)) {
return NaN;
}
return -x;
};node_modules\es-abstract\2022\Number\subtract.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\Number\subtract.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberAdd = require('./add');
var NumberUnaryMinus = require('./unaryMinus');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract
module.exports = function NumberSubtract(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberAdd(x, NumberUnaryMinus(y));
};node_modules\es-abstract\2022\Number\signedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\signedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift
module.exports = function NumberSignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >> shiftCount;
};node_modules\es-abstract\2022\Number\sameValueZero.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\sameValueZero.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero
module.exports = function NumberSameValueZero(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN || yNaN) {
return xNaN === yNaN;
}
return x === y;
};node_modules\es-abstract\2022\Number\sameValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\sameValue.js (Line 1:1 - Line 18:2)
'use strict';
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $TypeError = require('es-errors/type');
var NumberSameValueZero = require('./sameValueZero');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue
module.exports = function NumberSameValue(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (x === 0 && y === 0) {
return !(isNegativeZero(x) ^ isNegativeZero(y));
}
return NumberSameValueZero(x, y);
};node_modules\es-abstract\2022\Number\remainder.js (Line 9:1 - Line 26:87), node_modules\es-abstract\2025\Number\remainder.js (Line 11:1 - Line 28:3)
module.exports = function NumberRemainder(n, d) {
if (typeof n !== 'number' || typeof d !== 'number') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers');
}
// If either operand is NaN, the result is NaN.
// If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) {
return NaN;
}
// If the dividend is finite and the divisor is an infinity, the result equals the dividend.
// If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
if (!isFinite(d) || n === 0) {
return n;
}
// In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved…node_modules\es-abstract\2022\Number\multiply.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\Number\multiply.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply
module.exports = function NumberMultiply(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) {
return NaN;
}
if (!isFinite(x) && !isFinite(y)) {
return x === y ? Infinity : -Infinity;
}
if (!isFinite(x) && y !== 0) {
return x > 0 ? Infinity : -Infinity;
}
if (!isFinite(y) && x !== 0) {
return y > 0 ? Infinity : -Infinity;
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2022\Number\lessThan.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\lessThan.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan
module.exports = function NumberLessThan(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
// If x is NaN, return undefined.
// If y is NaN, return undefined.
if (isNaN(x) || isNaN(y)) {
return void undefined;
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2022\Number\leftShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\leftShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum << shiftCount;
};node_modules\es-abstract\2022\Number\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2022\Number\exponentiate.js (Line 1:1 - Line 74:2), node_modules\es-abstract\2025\Number\exponentiate.js (Line 1:1 - Line 74:2)
'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};node_modules\es-abstract\2022\Number\equal.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\equal.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal
module.exports = function NumberEqual(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y)) {
return false;
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2022\Number\divide.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\divide.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide
module.exports = function NumberDivide(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) {
return NaN;
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2022\Number\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
module.exports = function NumberBitwiseXOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('^', x, y);
};node_modules\es-abstract\2022\Number\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR
module.exports = function NumberBitwiseOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('|', x, y);
};node_modules\es-abstract\2022\Number\bitwiseNOT.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\Number\bitwiseNOT.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT
module.exports = function NumberBitwiseNOT(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
var oldValue = ToInt32(x);
// Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer.
return ~oldValue;
};node_modules\es-abstract\2022\Number\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND
module.exports = function NumberBitwiseAND(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('&', x, y);
};node_modules\es-abstract\2022\Number\add.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\Number\add.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add
module.exports = function NumberAdd(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) {
return NaN;
}
if (!isFinite(x)) {
return x;
}
if (!isFinite(y)) {
return y;
}
if (x === y && x === 0) { // both zeroes
return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0;
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2022\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};node_modules\es-abstract\2022\BigInt\unaryMinus.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\BigInt\unaryMinus.js (Line 1:1 - Line 22:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};node_modules\es-abstract\2022\BigInt\subtract.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\subtract.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};node_modules\es-abstract\2022\BigInt\signedRightShift.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\signedRightShift.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};node_modules\es-abstract\2022\BigInt\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\BigInt\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};node_modules\es-abstract\2022\BigInt\multiply.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\multiply.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2022\BigInt\lessThan.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\lessThan.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2022\BigInt\leftShift.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\leftShift.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};node_modules\es-abstract\2022\BigInt\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2022\BigInt\exponentiate.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\BigInt\exponentiate.js (Line 1:1 - Line 29:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};node_modules\es-abstract\2022\BigInt\equal.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\equal.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2022\BigInt\divide.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\BigInt\divide.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2022\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};node_modules\es-abstract\2022\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};node_modules\es-abstract\2022\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};node_modules\es-abstract\2022\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};node_modules\es-abstract\2022\BigInt\add.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\add.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2021\tables\typed-array-objects.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2023\tables\typed-array-objects.js (Line 1:1 - Line 36:2)
'use strict';
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$BigInt64Array: 'BigInt64',
$BigUint64Array: 'BigUint64',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$BigInt64: 8,
$BigUint64: 8,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'
};node_modules\es-abstract\2021\Number\unsignedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift
module.exports = function NumberUnsignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>> shiftCount;
};node_modules\es-abstract\2021\Number\unaryMinus.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\Number\unaryMinus.js (Line 1:1 - Line 17:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus
module.exports = function NumberUnaryMinus(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
if (isNaN(x)) {
return NaN;
}
return -x;
};node_modules\es-abstract\2021\Number\toString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\Number\toString.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
return $String(x);
};node_modules\es-abstract\2021\Number\subtract.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\Number\subtract.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberAdd = require('./add');
var NumberUnaryMinus = require('./unaryMinus');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract
module.exports = function NumberSubtract(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberAdd(x, NumberUnaryMinus(y));
};node_modules\es-abstract\2021\Number\signedRightShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\signedRightShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift
module.exports = function NumberSignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >> shiftCount;
};node_modules\es-abstract\2021\Number\sameValueZero.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\sameValueZero.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero
module.exports = function NumberSameValueZero(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN || yNaN) {
return xNaN === yNaN;
}
return x === y;
};node_modules\es-abstract\2021\Number\sameValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\sameValue.js (Line 1:1 - Line 18:2)
'use strict';
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $TypeError = require('es-errors/type');
var NumberSameValueZero = require('./sameValueZero');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue
module.exports = function NumberSameValue(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (x === 0 && y === 0) {
return !(isNegativeZero(x) ^ isNegativeZero(y));
}
return NumberSameValueZero(x, y);
};node_modules\es-abstract\2021\Number\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2022\Number\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder
module.exports = function NumberRemainder(n, d) {
if (typeof n !== 'number' || typeof d !== 'number') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers');
}
// If either operand is NaN, the result is NaN.
// If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) {
return NaN;
}
// If the dividend is finite and the divisor is an infinity, the result equals the dividend.
// If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
if (!isFinite(d) || n === 0) {
return n;
}
// In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved…
return n % d;
};node_modules\es-abstract\2021\Number\multiply.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\Number\multiply.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply
module.exports = function NumberMultiply(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) {
return NaN;
}
if (!isFinite(x) && !isFinite(y)) {
return x === y ? Infinity : -Infinity;
}
if (!isFinite(x) && y !== 0) {
return x > 0 ? Infinity : -Infinity;
}
if (!isFinite(y) && x !== 0) {
return y > 0 ? Infinity : -Infinity;
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2021\Number\lessThan.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\lessThan.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan
module.exports = function NumberLessThan(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
// If x is NaN, return undefined.
// If y is NaN, return undefined.
if (isNaN(x) || isNaN(y)) {
return void undefined;
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2021\Number\leftShift.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\leftShift.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum << shiftCount;
};node_modules\es-abstract\2021\Number\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2021\Number\exponentiate.js (Line 1:1 - Line 74:2), node_modules\es-abstract\2025\Number\exponentiate.js (Line 1:1 - Line 74:2)
'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};node_modules\es-abstract\2021\Number\equal.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\equal.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal
module.exports = function NumberEqual(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y)) {
return false;
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2021\Number\divide.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\divide.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide
module.exports = function NumberDivide(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) {
return NaN;
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2021\Number\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
module.exports = function NumberBitwiseXOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('^', x, y);
};node_modules\es-abstract\2021\Number\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR
module.exports = function NumberBitwiseOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('|', x, y);
};node_modules\es-abstract\2021\Number\bitwiseNOT.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\Number\bitwiseNOT.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT
module.exports = function NumberBitwiseNOT(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
var oldValue = ToInt32(x);
// Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer.
return ~oldValue;
};node_modules\es-abstract\2021\Number\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND
module.exports = function NumberBitwiseAND(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('&', x, y);
};node_modules\es-abstract\2021\Number\add.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\Number\add.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add
module.exports = function NumberAdd(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) {
return NaN;
}
if (!isFinite(x)) {
return x;
}
if (!isFinite(y)) {
return y;
}
if (x === y && x === 0) { // both zeroes
return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0;
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2021\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};node_modules\es-abstract\2021\BigInt\unaryMinus.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\BigInt\unaryMinus.js (Line 1:1 - Line 22:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};node_modules\es-abstract\2021\BigInt\toString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\BigInt\toString.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
return $String(x);
};node_modules\es-abstract\2021\BigInt\subtract.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\subtract.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};node_modules\es-abstract\2021\BigInt\signedRightShift.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\signedRightShift.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};node_modules\es-abstract\2021\BigInt\sameValueZero.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2022\BigInt\sameValueZero.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
module.exports = function BigIntSameValueZero(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};node_modules\es-abstract\2021\BigInt\sameValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2022\BigInt\sameValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
module.exports = function BigIntSameValue(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};node_modules\es-abstract\2021\BigInt\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\BigInt\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};node_modules\es-abstract\2021\BigInt\multiply.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\multiply.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2021\BigInt\lessThan.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\lessThan.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2021\BigInt\leftShift.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\leftShift.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};node_modules\es-abstract\2021\BigInt\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2021\BigInt\exponentiate.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\BigInt\exponentiate.js (Line 1:1 - Line 29:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};node_modules\es-abstract\2021\BigInt\equal.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\equal.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2021\BigInt\divide.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\BigInt\divide.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2021\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};node_modules\es-abstract\2021\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};node_modules\es-abstract\2021\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};node_modules\es-abstract\2021\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};node_modules\es-abstract\2021\BigInt\add.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\add.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2020\tables\typed-array-objects.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2023\tables\typed-array-objects.js (Line 1:1 - Line 36:2)
'use strict';
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$BigInt64Array: 'BigInt64',
$BigUint64Array: 'BigUint64',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$BigInt64: 8,
$BigUint64: 8,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'
};node_modules\es-abstract\2020\Number\unsignedRightShift.js (Line 10:1 - Line 18:5), node_modules\es-abstract\2025\Number\unsignedRightShift.js (Line 11:1 - Line 19:7)
module.exports = function NumberUnsignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnumnode_modules\es-abstract\2020\Number\unaryMinus.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\Number\unaryMinus.js (Line 1:1 - Line 17:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus
module.exports = function NumberUnaryMinus(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
if (isNaN(x)) {
return NaN;
}
return -x;
};node_modules\es-abstract\2020\Number\toString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\Number\toString.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
return $String(x);
};node_modules\es-abstract\2020\Number\signedRightShift.js (Line 10:1 - Line 18:5), node_modules\es-abstract\2025\Number\signedRightShift.js (Line 11:1 - Line 19:7)
module.exports = function NumberSignedRightShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnumnode_modules\es-abstract\2020\Number\signedRightShift.js (Line 10:23 - Line 20:3), node_modules\es-abstract\2020\Number\unsignedRightShift.js (Line 10:25 - Line 20:4)
(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnum & 0x1F;
return lnum >>node_modules\es-abstract\2020\Number\sameValueZero.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Number\sameValueZero.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero
module.exports = function NumberSameValueZero(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN || yNaN) {
return xNaN === yNaN;
}
return x === y;
};node_modules\es-abstract\2020\Number\sameValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\sameValue.js (Line 1:1 - Line 18:2)
'use strict';
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $TypeError = require('es-errors/type');
var NumberSameValueZero = require('./sameValueZero');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue
module.exports = function NumberSameValue(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (x === 0 && y === 0) {
return !(isNegativeZero(x) ^ isNegativeZero(y));
}
return NumberSameValueZero(x, y);
};node_modules\es-abstract\2020\Number\remainder.js (Line 9:1 - Line 22:2), node_modules\es-abstract\2025\Number\remainder.js (Line 11:1 - Line 24:2)
module.exports = function NumberRemainder(n, d) {
if (typeof n !== 'number' || typeof d !== 'number') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers');
}
// If either operand is NaN, the result is NaN.
// If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.
if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) {
return NaN;
}
// If the dividend is finite and the divisor is an infinity, the result equals the dividend.
// If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.
if (!isFinite(d) || (node_modules\es-abstract\2020\Number\multiply.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\Number\multiply.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply
module.exports = function NumberMultiply(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) {
return NaN;
}
if (!isFinite(x) && !isFinite(y)) {
return x === y ? Infinity : -Infinity;
}
if (!isFinite(x) && y !== 0) {
return x > 0 ? Infinity : -Infinity;
}
if (!isFinite(y) && x !== 0) {
return y > 0 ? Infinity : -Infinity;
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2020\Number\lessThan.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Number\lessThan.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan
module.exports = function NumberLessThan(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
// If x is NaN, return undefined.
// If y is NaN, return undefined.
if (isNaN(x) || isNaN(y)) {
return void undefined;
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2020\Number\leftShift.js (Line 10:1 - Line 18:5), node_modules\es-abstract\2025\Number\leftShift.js (Line 11:1 - Line 19:7)
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnumnode_modules\es-abstract\2020\Number\leftShift.js (Line 10:16 - Line 20:3), node_modules\es-abstract\2020\Number\unsignedRightShift.js (Line 10:25 - Line 20:4)
(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnum & 0x1F;
return lnum <<node_modules\es-abstract\2020\Number\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2020\Number\exponentiate.js (Line 1:1 - Line 74:2), node_modules\es-abstract\2025\Number\exponentiate.js (Line 1:1 - Line 74:2)
'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};node_modules\es-abstract\2020\Number\equal.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\equal.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNaN = require('../../helpers/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal
module.exports = function NumberEqual(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y)) {
return false;
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2020\Number\divide.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\Number\divide.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide
module.exports = function NumberDivide(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) {
return NaN;
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2020\Number\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
module.exports = function NumberBitwiseXOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('^', x, y);
};node_modules\es-abstract\2020\Number\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR
module.exports = function NumberBitwiseOR(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('|', x, y);
};node_modules\es-abstract\2020\Number\bitwiseNOT.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\Number\bitwiseNOT.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT
module.exports = function NumberBitwiseNOT(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` argument must be a Number');
}
var oldValue = ToInt32(x);
// Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer.
return ~oldValue;
};node_modules\es-abstract\2020\Number\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\Number\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var NumberBitwiseOp = require('../NumberBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND
module.exports = function NumberBitwiseAND(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return NumberBitwiseOp('&', x, y);
};node_modules\es-abstract\2020\Number\add.js (Line 9:1 - Line 18:2), node_modules\es-abstract\2025\Number\add.js (Line 9:1 - Line 18:2)
module.exports = function NumberAdd(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) {
return NaN;
}
if ((node_modules\es-abstract\2020\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\unsignedRightShift.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};node_modules\es-abstract\2020\BigInt\unaryMinus.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\BigInt\unaryMinus.js (Line 1:1 - Line 22:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};node_modules\es-abstract\2020\BigInt\toString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\BigInt\toString.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
return $String(x);
};node_modules\es-abstract\2020\BigInt\subtract.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\subtract.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};node_modules\es-abstract\2020\BigInt\signedRightShift.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\signedRightShift.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};node_modules\es-abstract\2020\BigInt\sameValueZero.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2022\BigInt\sameValueZero.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
module.exports = function BigIntSameValueZero(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};node_modules\es-abstract\2020\BigInt\sameValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2022\BigInt\sameValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
module.exports = function BigIntSameValue(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};node_modules\es-abstract\2020\BigInt\remainder.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\BigInt\remainder.js (Line 1:1 - Line 28:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};node_modules\es-abstract\2020\BigInt\multiply.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\multiply.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};node_modules\es-abstract\2020\BigInt\lessThan.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\lessThan.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};node_modules\es-abstract\2020\BigInt\leftShift.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\leftShift.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};node_modules\es-abstract\2020\BigInt\index.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\Number\index.js (Line 1:1 - Line 43:2)
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};node_modules\es-abstract\2020\BigInt\exponentiate.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\BigInt\exponentiate.js (Line 1:1 - Line 29:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};node_modules\es-abstract\2020\BigInt\equal.js (Line 1:1 - Line 13:2), node_modules\es-abstract\2025\BigInt\equal.js (Line 1:1 - Line 13:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};node_modules\es-abstract\2020\BigInt\divide.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\BigInt\divide.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};node_modules\es-abstract\2020\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseXOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};node_modules\es-abstract\2020\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseOR.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};node_modules\es-abstract\2020\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\BigInt\bitwiseNOT.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};node_modules\es-abstract\2020\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\bitwiseAND.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};node_modules\es-abstract\2020\BigInt\add.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\BigInt\add.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};node_modules\es-abstract\2018\tables\typed-array-objects.js (Line 5:1 - Line 32:2), node_modules\es-abstract\2019\tables\typed-array-objects.js (Line 5:1 - Line 32:2)
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'
};node_modules\es-abstract\2017\tables\typed-array-objects.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2018\tables\typed-array-objects.js (Line 1:1 - Line 32:2)
'use strict';
// https://262.ecma-international.org/8.0/#table-49
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'
};node_modules\es-abstract\2016\tables\typed-array-objects.js (Line 5:1 - Line 32:2), node_modules\es-abstract\2019\tables\typed-array-objects.js (Line 5:1 - Line 32:2)
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'
};node_modules\es-abstract\2015\tables\typed-array-objects.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2016\tables\typed-array-objects.js (Line 1:1 - Line 32:2)
'use strict';
// https://262.ecma-international.org/6.0/#table-49
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'
};node_modules\aria-query\lib\util\iteratorProxy.js (Line 1:1 - Line 32:8), node_modules\axobject-query\lib\util\iteratorProxy.js (Line 1:1 - Line 32:14)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// eslint-disable-next-line no-unused-vars
function iteratorProxy() {
var values = this;
var index = 0;
var iter = {
'@@iterator': function iterator() {
return iter;
},
next: function next() {
if (index < values.length) {
var value = values[index];
index = index + 1;
return {
done: false,
value: value
};
} else {
return {
done: true
};
}
}
};
return iter;
}
var _default = exportsnode_modules\aria-query\lib\util\iterationDecorator.js (Line 9:2 - Line 17:2), node_modules\axobject-query\lib\util\iterationDecorator.js (Line 9:4 - Line 17:2)
); }
function iterationDecorator(collection, entries) {
if (typeof Symbol === 'function' && _typeof(Symbol.iterator) === 'symbol') {
Object.defineProperty(collection, Symbol.iterator, {
value: _iteratorProxy.default.bind(entries)
});
}
return collection;
}node_modules\ajv\lib\dotjs\_limitLength.js (Line 2:22 - Line 23:12), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 23:16)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!($isData || typeof $schema == 'number')) {
throw new Error($keyword + ' must be number');
}
var $op = $keyword == 'maxLength'node_modules\ajv\lib\dotjs\_limitLength.js (Line 33:2 - Line 39:15), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 28:2 - Line 34:19)
+ ($op) + ' ' + ($schemaValue) + ') { ';
var $errorKeyword = $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || '_limitLength'node_modules\ajv\lib\dotjs\_limitLength.js (Line 53:17 - Line 85:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 48:17 - Line 80:2)
;
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += '} ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\_limitItems.js (Line 2:21 - Line 23:11), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 23:16)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!($isData || typeof $schema == 'number')) {
throw new Error($keyword + ' must be number');
}
var $op = $keyword == 'maxItems'node_modules\ajv\lib\dotjs\_limitItems.js (Line 28:2 - Line 34:14), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 28:2 - Line 34:19)
+ ($op) + ' ' + ($schemaValue) + ') { ';
var $errorKeyword = $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || '_limitItems'node_modules\ajv\lib\dotjs\_limitItems.js (Line 48:12 - Line 80:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 48:17 - Line 80:2)
;
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += '} ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\_limit.js (Line 2:16 - Line 20:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 20:3)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
varnode_modules\ajv\lib\dotjs\_limit.js (Line 53:2 - Line 71:16), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 57:2 - Line 75:5)
+ (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else if ( 'node_modules\ajv\lib\dotjs\_limit.js (Line 132:5 - Line 158:6), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 49:5 - Line 75:5)
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } 'node_modules\ajv\lib\dotjs\validate.js (Line 27:15 - Line 36:7), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 3:4 - Line 12:8)
;
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $validnode_modules\ajv\lib\dotjs\validate.js (Line 52:2 - Line 70:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 57:2 - Line 75:4)
+ (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
}node_modules\ajv\lib\dotjs\validate.js (Line 203:6 - Line 224:10), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 75:5)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } if ('node_modules\ajv\lib\dotjs\validate.js (Line 233:9 - Line 273:4), node_modules\ajv\lib\dotjs\validate.js (Line 185:9 - Line 70:5)
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
if ($typeIsArray) {
out += '' + ($typeSchema.join(","));
} else {
out += '' + ($typeSchema);
}
out += '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should be ';
if ($typeIsArray) {
out += '' + ($typeSchema.join(","));
} else {
out += '' + ($typeSchema);
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
}
outnode_modules\ajv\lib\dotjs\validate.js (Line 342:4 - Line 366:2), node_modules\ajv\lib\dotjs\validate.js (Line 311:2 - Line 334:5)
;
if (it.compositeRule) {
if (it.opts.strictDefaults) {
var $defaultMsg = 'default is ignored for: ' + $passData;
if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
else throw new Error($defaultMsg);
}
} else {
out += ' if (' + ($passData) + ' === undefined ';
if (it.opts.useDefaults == 'empty') {
out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
}
out += ' ) ' + ($passData) + ' = ';
if (it.opts.useDefaults == 'shared') {
out += ' ' + (it.useDefault($sch.default)) + ' ';
} else {
out += ' ' + (JSON.stringify($sch.default)) + ' ';
}
out += '; ';
}
}
}
}
}
}node_modules\ajv\lib\dotjs\validate.js (Line 393:8 - Line 434:2), node_modules\ajv\lib\dotjs\validate.js (Line 184:13 - Line 159:3)
;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
if ($typeIsArray) {
out += '' + ($typeSchema.join(","));
} else {
out += '' + ($typeSchema);
}
out += '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should be ';
if ($typeIsArray) {
out += '' + ($typeSchema.join(","));
} else {
out += '' + ($typeSchema);
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
}node_modules\ajv\lib\dotjs\uniqueItems.js (Line 2:21 - Line 10:6), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 10:14)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $datanode_modules\ajv\lib\dotjs\uniqueItems.js (Line 11:5 - Line 20:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 11:2 - Line 20:2)
;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if ((node_modules\ajv\lib\dotjs\uniqueItems.js (Line 49:104 - Line 80:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 48:17 - Line 162:7)
;
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
if ($breakOnError) {
out += ' else { ';
}
}node_modules\ajv\lib\dotjs\required.js (Line 2:18 - Line 20:9), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 20:7)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $vSchemanode_modules\ajv\lib\dotjs\required.js (Line 79:7 - Line 102:13), node_modules\ajv\lib\dotjs\validate.js (Line 201:2 - Line 75:5)
;
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { 'node_modules\ajv\lib\dotjs\required.js (Line 129:9 - Line 164:2), node_modules\ajv\lib\dotjs\required.js (Line 69:9 - Line 103:5)
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'';
if (it.opts._errorDataPathProperty) {
out += 'is a required property';
} else {
out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { ';
}
}node_modules\ajv\lib\dotjs\required.js (Line 165:7 - Line 175:3), node_modules\ajv\lib\dotjs\required.js (Line 46:7 - Line 56:4)
if ($loopRequired) {
if (!$isData) {
out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
}
var $i = 'i' + $lvl,
$propertyPath = 'schema' + $lvl + '[' + $i + ']',
$missingProperty = '\' + ' + $propertyPath + ' + \'';
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
}
ifnode_modules\ajv\lib\dotjs\required.js (Line 176:21 - Line 195:4), node_modules\ajv\lib\dotjs\required.js (Line 71:3 - Line 212:4)
; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'';
if (it.opts._errorDataPathProperty) {
out += 'is a required property';
} else {
out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
outnode_modules\ajv\lib\dotjs\required.js (Line 201:20 - Line 220:83), node_modules\ajv\lib\dotjs\required.js (Line 71:3 - Line 195:90)
; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'';
if (it.opts._errorDataPathProperty) {
out += 'is a required property';
} else {
out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } 'node_modules\ajv\lib\dotjs\required.js (Line 239:7 - Line 260:81), node_modules\ajv\lib\dotjs\required.js (Line 199:6 - Line 195:90)
;
}
out += ') { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'';
if (it.opts._errorDataPathProperty) {
out += 'is a required property';
} else {
out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } 'node_modules\ajv\lib\dotjs\ref.js (Line 35:2 - Line 53:3), node_modules\ajv\lib\dotjs\_limit.js (Line 53:12 - Line 75:4)
) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
ifnode_modules\ajv\lib\dotjs\propertyNames.js (Line 2:23 - Line 11:6), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 11:7)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $errsnode_modules\ajv\lib\dotjs\propertyNames.js (Line 54:21 - Line 63:79), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 195:90)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; 'node_modules\ajv\lib\dotjs\properties.js (Line 2:20 - Line 16:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 16:4)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
varnode_modules\ajv\lib\dotjs\properties.js (Line 45:5 - Line 50:3), node_modules\ajv\lib\dotjs\propertyNames.js (Line 33:5 - Line 38:4)
if ($ownProperties) {
out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
} else {
out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
}
ifnode_modules\ajv\lib\dotjs\properties.js (Line 107:6 - Line 128:15), node_modules\ajv\lib\dotjs\validate.js (Line 49:43 - Line 75:4)
;
}
if (it.opts.verbose) {
out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
$errSchemaPathnode_modules\ajv\lib\dotjs\properties.js (Line 143:5 - Line 151:4), node_modules\ajv\lib\dotjs\propertyNames.js (Line 41:5 - Line 49:3)
;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
outnode_modules\ajv\lib\dotjs\properties.js (Line 154:11 - Line 167:3), node_modules\ajv\lib\dotjs\properties.js (Line 138:11 - Line 49:3)
$it.schema = $aProperties;
$it.schemaPath = it.schemaPath + '.additionalProperties';
$it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
$it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
var $passData = $data + '[' + $key + ']';
$it.dataPathArr[$dataNxt] = $key;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
ifnode_modules\ajv\lib\dotjs\properties.js (Line 185:5 - Line 192:2), node_modules\ajv\lib\dotjs\validate.js (Line 303:15 - Line 310:5)
var arr3 = $schemaKeys;
if (arr3) {
var $propertyKey, i3 = -1,
l3 = arr3.length - 1;
while (i3 < l3) {
$propertyKey = arr3[i3 += 1];
var $sch = $schema[$propertyKey];
if ((node_modules\ajv\lib\dotjs\properties.js (Line 225:12 - Line 260:3), node_modules\ajv\lib\dotjs\required.js (Line 68:9 - Line 129:3)
;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'';
if (it.opts._errorDataPathProperty) {
out += 'is a required property';
} else {
out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
}
out += '\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
$errSchemaPath = $currErrSchemaPath;
itnode_modules\ajv\lib\dotjs\properties.js (Line 299:11 - Line 304:8), node_modules\ajv\lib\dotjs\propertyNames.js (Line 33:5 - Line 38:17)
if ($ownProperties) {
out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
} else {
out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
}
out += ' if ('node_modules\ajv\lib\dotjs\properties.js (Line 305:2 - Line 318:4), node_modules\ajv\lib\dotjs\properties.js (Line 141:2 - Line 170:2)
it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
var $passData = $data + '[' + $key + ']';
$it.dataPathArr[$dataNxt] = $key;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
if ($breakOnError) {
out += ' if (!' + ($nextValid) + ') break; ';
}
outnode_modules\ajv\lib\dotjs\pattern.js (Line 2:17 - Line 11:8), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 11:7)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $isDatanode_modules\ajv\lib\dotjs\pattern.js (Line 9:10 - Line 19:8), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 10:14 - Line 20:7)
;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $regexpnode_modules\ajv\lib\dotjs\pattern.js (Line 50:2 - Line 75:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 55:8 - Line 80:2)
);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += '} ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\oneOf.js (Line 2:15 - Line 12:6), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 12:8)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errsnode_modules\ajv\lib\dotjs\oneOf.js (Line 50:60 - Line 68:4), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 72:3)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError(vErrors); ';
} else {
out += ' validate.errors = vErrors; return false; ';
}
}
outnode_modules\ajv\lib\dotjs\not.js (Line 2:13 - Line 13:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 13:4)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
$itnode_modules\ajv\lib\dotjs\not.js (Line 14:6 - Line 19:4), node_modules\ajv\lib\dotjs\propertyNames.js (Line 16:13 - Line 21:4)
;
if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
outnode_modules\ajv\lib\dotjs\not.js (Line 39:39 - Line 60:23), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 75:5)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { errors = 'node_modules\ajv\lib\dotjs\not.js (Line 65:17 - Line 78:4), node_modules\ajv\lib\dotjs\not.js (Line 35:3 - Line 48:4)
; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should NOT be valid\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
outnode_modules\ajv\lib\dotjs\not.js (Line 69:39 - Line 79:14), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 64:2)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if ($breakOnErrornode_modules\ajv\lib\dotjs\multipleOf.js (Line 2:20 - Line 22:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 23:4)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!($isData || typeof $schema == 'number')) {
throw new Error($keyword + ' must be number');
}
outnode_modules\ajv\lib\dotjs\multipleOf.js (Line 43:39 - Line 80:2), node_modules\ajv\lib\dotjs\_limit.js (Line 126:4 - Line 80:2)
;
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
out += '' + ($schemaValue) + '\'';
}
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += '} ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\items.js (Line 2:15 - Line 17:5), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 17:15)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
var $idxnode_modules\ajv\lib\dotjs\items.js (Line 35:12 - Line 57:15), node_modules\ajv\lib\dotjs\validate.js (Line 49:43 - Line 159:3)
;
}
if (it.opts.verbose) {
out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
$errSchemaPathnode_modules\ajv\lib\dotjs\items.js (Line 63:5 - Line 70:4), node_modules\ajv\lib\dotjs\oneOf.js (Line 23:3 - Line 193:4)
var arr1 = $schema;
if (arr1) {
var $sch, $i = -1,
l1 = arr1.length - 1;
while ($i < l1) {
$sch = arr1[$i += 1];
if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
outnode_modules\ajv\lib\dotjs\items.js (Line 76:3 - Line 84:7), node_modules\ajv\lib\dotjs\propertyNames.js (Line 41:5 - Line 151:9)
;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
out += ' } 'node_modules\ajv\lib\dotjs\items.js (Line 99:5 - Line 110:9), node_modules\ajv\lib\dotjs\propertyNames.js (Line 41:5 - Line 318:6)
;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
if ($breakOnError) {
out += ' if (!' + ($nextValid) + ') break; ';
}
out += ' } } 'node_modules\ajv\lib\dotjs\items.js (Line 120:2 - Line 134:5), node_modules\ajv\lib\dotjs\items.js (Line 96:7 - Line 318:6)
) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
$it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
var $passData = $data + '[' + $idx + ']';
$it.dataPathArr[$dataNxt] = $idx;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
if ($breakOnError) {
out += ' if (!' + ($nextValid) + ') break; ';
}
out += ' }'node_modules\ajv\lib\dotjs\if.js (Line 2:12 - Line 14:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 14:4)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
$itnode_modules\ajv\lib\dotjs\if.js (Line 59:8 - Line 65:16), node_modules\ajv\lib\dotjs\if.js (Line 39:8 - Line 45:16)
;
out += ' ' + (it.validate($it)) + ' ';
$it.baseId = $currentBaseId;
out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
if ($thenPresent && $elsePresent) {
$ifClause = 'ifClause' + $lvl;
out += ' var ' + ($ifClause) + ' = \'else\'; 'node_modules\ajv\lib\dotjs\if.js (Line 75:19 - Line 93:8), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 68:22)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError(vErrors); ';
} else {
out += ' validate.errors = vErrors; return false; ';
}
}
out += ' } 'node_modules\ajv\lib\dotjs\format.js (Line 2:16 - Line 11:3), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 11:4)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
ifnode_modules\ajv\lib\dotjs\format.js (Line 17:3 - Line 25:16), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 12:3 - Line 20:7)
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $unknownFormatsnode_modules\ajv\lib\dotjs\format.js (Line 104:25 - Line 112:38), node_modules\ajv\lib\dotjs\pattern.js (Line 29:26 - Line 37:39)
;
if ($isData) {
out += '' + ($schemaValue);
} else {
out += '' + (it.util.toQuotedString($schema));
}
out += ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should match format "'node_modules\ajv\lib\dotjs\format.js (Line 112:38 - Line 150:2), node_modules\ajv\lib\dotjs\pattern.js (Line 37:39 - Line 163:2)
;
if ($isData) {
out += '\' + ' + ($schemaValue) + ' + \'';
} else {
out += '' + (it.util.escapeQuotes($schema));
}
out += '"\' ';
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + (it.util.toQuotedString($schema));
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\enum.js (Line 2:14 - Line 20:3), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 20:7)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $inode_modules\ajv\lib\dotjs\enum.js (Line 29:20 - Line 38:7), node_modules\ajv\lib\dotjs\uniqueItems.js (Line 38:6 - Line 47:14)
;
if ($isData) {
out += ' } ';
}
out += ' if (!' + ($valid) + ') { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('enum'node_modules\ajv\lib\dotjs\enum.js (Line 40:64 - Line 61:5), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 75:5)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }'node_modules\ajv\lib\dotjs\dependencies.js (Line 2:22 - Line 16:12), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 16:5)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
var $schemaDepsnode_modules\ajv\lib\dotjs\dependencies.js (Line 42:5 - Line 55:9), node_modules\ajv\lib\dotjs\required.js (Line 110:5 - Line 123:8)
[$i += 1];
if ($i) {
out += ' || ';
}
var $prop = it.util.getProperty($propertyKey),
$useData = $data + $prop;
out += ' ( ( ' + ($useData) + ' === undefined ';
if ($ownProperties) {
out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
}
out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
}
}
out += ')) { 'node_modules\ajv\lib\dotjs\dependencies.js (Line 55:9 - Line 65:15), node_modules\ajv\lib\dotjs\required.js (Line 123:8 - Line 133:11)
;
var $propertyPath = 'missing' + $lvl,
$missingProperty = '\' + ' + $propertyPath + ' + \'';
if (it.opts._errorDataPathProperty) {
it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
}
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('dependencies'node_modules\ajv\lib\dotjs\dependencies.js (Line 73:17 - Line 95:4), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 71:3)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
} else {
outnode_modules\ajv\lib\dotjs\dependencies.js (Line 101:2 - Line 114:15), node_modules\ajv\lib\dotjs\required.js (Line 230:2 - Line 243:11)
+= 1];
var $prop = it.util.getProperty($propertyKey),
$missingProperty = it.util.escapeQuotes($propertyKey),
$useData = $data + $prop;
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
}
out += ' if ( ' + ($useData) + ' === undefined ';
if ($ownProperties) {
out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
}
out += ') { var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('dependencies'node_modules\ajv\lib\dotjs\dependencies.js (Line 112:20 - Line 131:4), node_modules\ajv\lib\dotjs\dependencies.js (Line 63:3 - Line 82:4)
; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should have ';
if ($deps.length == 1) {
out += 'property ' + (it.util.escapeQuotes($deps[0]));
} else {
out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
}
out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
outnode_modules\ajv\lib\dotjs\dependencies.js (Line 122:17 - Line 135:4), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 264:2)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
}
}
}
outnode_modules\ajv\lib\dotjs\custom.js (Line 2:16 - Line 13:4), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 37:3)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
varnode_modules\ajv\lib\dotjs\custom.js (Line 13:2 - Line 22:6), node_modules\ajv\lib\dotjs\uniqueItems.js (Line 11:2 - Line 20:7)
+ $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $rulenode_modules\ajv\lib\dotjs\custom.js (Line 90:24 - Line 96:18), node_modules\ajv\lib\dotjs\ref.js (Line 90:23 - Line 96:16)
;
if (it.errorPath != '""') {
out += ' + ' + (it.errorPath);
}
var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
$parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) 'node_modules\ajv\lib\dotjs\custom.js (Line 145:26 - Line 166:4), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 75:4)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
varnode_modules\ajv\lib\dotjs\custom.js (Line 189:18 - Line 202:4), node_modules\ajv\lib\dotjs\custom.js (Line 141:3 - Line 154:4)
; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
outnode_modules\ajv\lib\dotjs\custom.js (Line 193:26 - Line 211:2), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 72:3)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError(vErrors); ';
} else {
out += ' validate.errors = vErrors; return false; ';
}
}
}node_modules\ajv\lib\dotjs\contains.js (Line 2:18 - Line 20:2), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 20:2)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
var $idx = 'i' + $lvl,
$dataNxt = $it.dataLevel = it.dataLevel + 1,
$nextData = 'data' + $dataNxt,
$currentBaseId = it.baseId,node_modules\ajv\lib\dotjs\contains.js (Line 29:2 - Line 40:8), node_modules\ajv\lib\dotjs\items.js (Line 96:2 - Line 151:9)
+ ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
$it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
var $passData = $data + '[' + $idx + ']';
$it.dataPathArr[$dataNxt] = $idx;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
out += ' if ('node_modules\ajv\lib\dotjs\contains.js (Line 52:47 - Line 74:3), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 103:2)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { ';
ifnode_modules\ajv\lib\dotjs\const.js (Line 2:15 - Line 20:8), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 20:2)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!$isDatanode_modules\ajv\lib\dotjs\const.js (Line 30:47 - Line 56:2), node_modules\ajv\lib\dotjs\_limit.js (Line 50:24 - Line 66:2)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }';
if ($breakOnError) {
out += ' else { ';
}
return out;
}node_modules\ajv\lib\dotjs\anyOf.js (Line 2:15 - Line 17:15), node_modules\ajv\lib\dotjs\_limitProperties.js (Line 2:26 - Line 17:15)
(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
var $noEmptySchemanode_modules\ajv\lib\dotjs\anyOf.js (Line 22:14 - Line 31:4), node_modules\ajv\lib\dotjs\oneOf.js (Line 20:12 - Line 29:3)
;
var $wasComposite = it.compositeRule;
it.compositeRule = $it.compositeRule = true;
var arr1 = $schema;
if (arr1) {
var $sch, $i = -1,
l1 = arr1.length - 1;
while ($i < l1) {
$sch = arr1[$i += 1];
$itnode_modules\ajv\lib\dotjs\anyOf.js (Line 45:53 - Line 63:23), node_modules\ajv\lib\dotjs\required.js (Line 186:6 - Line 68:22)
;
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError(vErrors); ';
} else {
out += ' validate.errors = vErrors; return false; ';
}
}
out += ' } else { errors = 'node_modules\ajv\lib\dotjs\allOf.js (Line 13:2 - Line 21:17), node_modules\ajv\lib\dotjs\oneOf.js (Line 22:2 - Line 193:4)
= true;
var arr1 = $schema;
if (arr1) {
var $sch, $i = -1,
l1 = arr1.length - 1;
while ($i < l1) {
$sch = arr1[$i += 1];
if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
$allSchemasEmptynode_modules\ajv\lib\dotjs\allOf.js (Line 21:6 - Line 27:3), node_modules\ajv\lib\dotjs\anyOf.js (Line 30:2 - Line 36:4)
;
$it.schema = $sch;
$it.schemaPath = $schemaPath + '[' + $i + ']';
$it.errSchemaPath = $errSchemaPath + '/' + $i;
out += ' ' + (it.validate($it)) + ' ';
$it.baseId = $currentBaseId;
ifnode_modules\@typescript-eslint\visitor-keys\dist\visitor-keys.js (Line 1:1 - Line 36:12), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.visitorKeysnode_modules\@typescript-eslint\utils\dist\index.js (Line 1:1 - Line 39:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSUtilsnode_modules\@typescript-eslint\typescript-estree\dist\version-check.js (Line 1:1 - Line 36:27), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.typescriptVersionIsAtLeastnode_modules\@typescript-eslint\typescript-estree\dist\useProgramFromProjectService.js (Line 1:1 - Line 39:29), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useProgramFromProjectServicenode_modules\@typescript-eslint\typescript-estree\dist\use-at-your-own-risk.js (Line 1:1 - Line 17:21), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCanonicalFileNamenode_modules\@typescript-eslint\typescript-estree\dist\source-files.js (Line 1:1 - Line 36:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSourceFilenode_modules\@typescript-eslint\typescript-estree\dist\parser.js (Line 1:1 - Line 6:18), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearProgramCachenode_modules\@typescript-eslint\typescript-estree\dist\node-utils.js (Line 1:1 - Line 36:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSErrornode_modules\@typescript-eslint\typescript-estree\dist\index.js (Line 1:1 - Line 17:28), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.withoutProjectParserOptionsnode_modules\@typescript-eslint\typescript-estree\dist\getModifiers.js (Line 1:1 - Line 36:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getModifiersnode_modules\@typescript-eslint\typescript-estree\dist\convert-comments.js (Line 1:1 - Line 36:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertCommentsnode_modules\@typescript-eslint\types\dist\ts-estree.js (Line 1:1 - Line 36:9), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSESTreenode_modules\@typescript-eslint\types\dist\index.js (Line 1:1 - Line 17:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST_TOKEN_TYPESnode_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.js (Line 1:1 - Line 36:26), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.valueMatchesSomeSpecifiernode_modules\@typescript-eslint\type-utils\dist\typeFlagUtils.js (Line 1:1 - Line 36:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeFlagsnode_modules\@typescript-eslint\type-utils\dist\requiresQuoting.js (Line 1:1 - Line 36:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.requiresQuotingnode_modules\@typescript-eslint\type-utils\dist\predicates.js (Line 1:1 - Line 39:15), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 39:30)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNullableTypenode_modules\@typescript-eslint\type-utils\dist\isUnsafeAssignment.js (Line 1:1 - Line 36:19), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUnsafeAssignmentnode_modules\@typescript-eslint\type-utils\dist\isTypeReadonly.js (Line 1:1 - Line 36:28), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.readonlynessOptionsDefaultsnode_modules\@typescript-eslint\type-utils\dist\index.js (Line 1:1 - Line 17:27), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typescriptVersionIsAtLeastnode_modules\@typescript-eslint\type-utils\dist\getTypeName.js (Line 1:1 - Line 36:12), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeNamenode_modules\@typescript-eslint\type-utils\dist\getSourceFileOfNode.js (Line 1:1 - Line 36:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSourceFileOfNodenode_modules\@typescript-eslint\type-utils\dist\getContextualType.js (Line 1:1 - Line 36:18), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getContextualTypenode_modules\@typescript-eslint\type-utils\dist\discriminateAnyType.js (Line 1:1 - Line 36:8), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnyTypenode_modules\@typescript-eslint\type-utils\dist\containsAllTypesByName.js (Line 1:1 - Line 36:23), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.containsAllTypesByNamenode_modules\@typescript-eslint\type-utils\dist\builtinSymbolLikes.js (Line 1:1 - Line 36:14), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPromiseLikenode_modules\@typescript-eslint\tsconfig-utils\dist\index.js (Line 1:1 - Line 17:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./compilerOptions"node_modules\@typescript-eslint\tsconfig-utils\dist\getParsedConfigFile.js (Line 1:1 - Line 36:20), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 36:18)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParsedConfigFilenode_modules\@typescript-eslint\scope-manager\dist\index.js (Line 1:1 - Line 17:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:9)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManagernode_modules\@typescript-eslint\project-service\dist\index.js (Line 1:1 - Line 17:25), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 17:17)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./createProjectService"node_modules\@typescript-eslint\project-service\dist\createProjectService.js (Line 1:1 - Line 6:21), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProjectServicenode_modules\@typescript-eslint\parser\dist\parser.js (Line 1:1 - Line 6:6), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsenode_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.js (Line 1:1 - Line 38:6), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 1:1 - Line 38:7)
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
constnode_modules\@stomp\stompjs\esm6\stomp-handler.js (Line 381:5 - Line 390:7), node_modules\@stomp\stompjs\esm6\stomp-handler.js (Line 370:4 - Line 379:5)
(messageId, subscriptionId, headers = {}) {
headers = Object.assign({}, headers);
if (this._connectedVersion === Versions.V1_2) {
headers.id = messageId;
}
else {
headers['message-id'] = messageId;
}
headers.subscription = subscriptionId;
returnnode_modules\@rolldown\pluginutils\dist\index.cjs (Line 2:1 - Line 251:8), node_modules\@rolldown\pluginutils\dist\index.js (Line 1:1 - Line 250:7)
//#region src/utils.ts
const postfixRE = /[?#].*$/;
function cleanUrl(url) {
return url.replace(postfixRE, "");
}
function extractQueryWithoutFragment(url) {
const questionMarkIndex = url.indexOf("?");
if (questionMarkIndex === -1) return "";
const fragmentIndex = url.indexOf("#", questionMarkIndex);
if (fragmentIndex === -1) return url.substring(questionMarkIndex);
else return url.substring(questionMarkIndex, fragmentIndex);
}
//#endregion
//#region src/composable-filters.ts
var And = class {
kind;
args;
constructor(...args) {
if (args.length === 0) throw new Error("`And` expects at least one operand");
this.args = args;
this.kind = "and";
}
};
var Or = class {
kind;
args;
constructor(...args) {
if (args.length === 0) throw new Error("`Or` expects at least one operand");
this.args = args;
this.kind = "or";
}
};
var Not = class {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = "not";
}
};
var Id = class {
kind;
pattern;
params;
constructor(pattern, params) {
this.pattern = pattern;
this.kind = "id";
this.params = params ?? { cleanUrl: false };
}
};
var ModuleType = class {
kind;
pattern;
constructor(pattern) {
this.pattern = pattern;
this.kind = "moduleType";
}
};
var Code = class {
kind;
pattern;
constructor(expr) {
this.pattern = expr;
this.kind = "code";
}
};
var Query = class {
kind;
key;
pattern;
constructor(key, pattern) {
this.pattern = pattern;
this.key = key;
this.kind = "query";
}
};
var Include = class {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = "include";
}
};
var Exclude = class {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = "exclude";
}
};
function and(...args) {
return new And(...args);
}
function or(...args) {
return new Or(...args);
}
function not(expr) {
return new Not(expr);
}
function id(pattern, params) {
return new Id(pattern, params);
}
function moduleType(pattern) {
return new ModuleType(pattern);
}
function code(pattern) {
return new Code(pattern);
}
function query(key, pattern) {
return new Query(key, pattern);
}
function include(expr) {
return new Include(expr);
}
function exclude(expr) {
return new Exclude(expr);
}
/**
* convert a queryObject to FilterExpression like
* ```js
* and(query(k1, v1), query(k2, v2))
* ```
* @param queryFilterObject The query filter object needs to be matched.
* @returns a `And` FilterExpression
*/
function queries(queryFilter) {
let arr = Object.entries(queryFilter).map(([key, value]) => {
return new Query(key, value);
});
return and(...arr);
}
function interpreter(exprs, code$1, id$1, moduleType$1) {
let arr = [];
if (Array.isArray(exprs)) arr = exprs;
else arr = [exprs];
return interpreterImpl(arr, code$1, id$1, moduleType$1);
}
function interpreterImpl(expr, code$1, id$1, moduleType$1, ctx = {}) {
let hasInclude = false;
for (const e of expr) switch (e.kind) {
case "include":
hasInclude = true;
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, ctx)) return true;
break;
case "exclude":
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1)) return false;
break;
}
return !hasInclude;
}
function exprInterpreter(expr, code$1, id$1, moduleType$1, ctx = {}) {
switch (expr.kind) {
case "and": return expr.args.every((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
case "or": return expr.args.some((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, ctx);
case "id":
if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
if (expr.params.cleanUrl) id$1 = cleanUrl(id$1);
return typeof expr.pattern === "string" ? id$1 === expr.pattern : expr.pattern.test(id$1);
case "moduleType":
if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
return moduleType$1 === expr.pattern;
case "code":
if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
case "query": {
if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");
if (!ctx.urlSearchParamsCache) {
let queryString = extractQueryWithoutFragment(id$1);
ctx.urlSearchParamsCache = new URLSearchParams(queryString);
}
let urlParams = ctx.urlSearchParamsCache;
if (typeof expr.pattern === "boolean") if (expr.pattern) return urlParams.has(expr.key);
else return !urlParams.has(expr.key);
else if (typeof expr.pattern === "string") return urlParams.get(expr.key) === expr.pattern;
else return expr.pattern.test(urlParams.get(expr.key) ?? "");
}
default: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
}
}
//#endregion
//#region src/simple-filters.ts
/**
* Constructs a RegExp that matches the exact string specified.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { exactRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: exactRegex('foo') },
* handler(id) {} // will only be called for `foo`
* }
* }
* ```
*/
function exactRegex(str, flags) {
return new RegExp(`^${escapeRegex(str)}$`, flags);
}
/**
* Constructs a RegExp that matches a value that has the specified prefix.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { prefixRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: prefixRegex('foo') },
* handler(id) {} // will only be called for IDs starting with `foo`
* }
* }
* ```
*/
function prefixRegex(str, flags) {
return new RegExp(`^${escapeRegex(str)}`, flags);
}
const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
function escapeRegex(str) {
return str.replace(escapeRegexRE, "\\$&");
}
function makeIdFiltersToMatchWithQuery(input) {
if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
return input.map((i) => makeIdFilterToMatchWithQuery(i));
}
function makeIdFilterToMatchWithQuery(input) {
if (typeof input === "string") return `${input}{?*,}`;
return makeRegexIdFilterToMatchWithQuery(input);
}
function makeRegexIdFilterToMatchWithQuery(input) {
return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
}
//#endregion
exportsnode_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 19:1 - Line 25:10), node_modules\vite\dist\node\chunks\dep-lCKrEJQm.js (Line 4:1 - Line 10:2)
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __requirenode_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 36:2 - Line 41:71), node_modules\vite\node_modules\fdir\dist\index.cjs (Line 12:2 - Line 18:11)
, enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESMnode_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 450:4 - Line 455:6), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 206:2 - Line 211:3)
;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
constnode_modules\@jridgewell\trace-mapping\dist\trace-mapping.mjs (Line 5:26 - Line 18:11), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 89:2 - Line 102:2)
;
// src/strip-filename.ts
function stripFilename(path) {
if (!path) return "";
const index = path.lastIndexOf("/");
return path.slice(0, index + 1);
}
// src/resolve.ts
function resolver(mapUrl, sourceRoot) {
const from = stripFilename(mapUrl);
const prefix = sourceRoot ? sourceRoot + "/" : "";
return (source) => resolveUrinode_modules\@jridgewell\trace-mapping\dist\trace-mapping.mjs (Line 18:11 - Line 311:7), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 102:2 - Line 395:2)
(prefix + (source || ""), from);
}
// src/sourcemap-segment.ts
var COLUMN = 0;
var SOURCES_INDEX = 1;
var SOURCE_LINE = 2;
var SOURCE_COLUMN = 3;
var NAMES_INDEX = 4;
var REV_GENERATED_LINE = 1;
var REV_GENERATED_COLUMN = 2;
// src/sort.ts
function maybeSort(mappings, owned) {
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
if (unsortedIndex === mappings.length) return mappings;
if (!owned) mappings = mappings.slice();
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
mappings[i] = sortSegments(mappings[i], owned);
}
return mappings;
}
function nextUnsortedSegmentLine(mappings, start) {
for (let i = start; i < mappings.length; i++) {
if (!isSorted(mappings[i])) return i;
}
return mappings.length;
}
function isSorted(line) {
for (let j = 1; j < line.length; j++) {
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
return false;
}
}
return true;
}
function sortSegments(line, owned) {
if (!owned) line = line.slice();
return line.sort(sortComparator);
}
function sortComparator(a, b) {
return a[COLUMN] - b[COLUMN];
}
// src/binary-search.ts
var found = false;
function binarySearch(haystack, needle, low, high) {
while (low <= high) {
const mid = low + (high - low >> 1);
const cmp = haystack[mid][COLUMN] - needle;
if (cmp === 0) {
found = true;
return mid;
}
if (cmp < 0) {
low = mid + 1;
} else {
high = mid - 1;
}
}
found = false;
return low - 1;
}
function upperBound(haystack, needle, index) {
for (let i = index + 1; i < haystack.length; index = i++) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
function lowerBound(haystack, needle, index) {
for (let i = index - 1; i >= 0; index = i--) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
function memoizedState() {
return {
lastKey: -1,
lastNeedle: -1,
lastIndex: -1
};
}
function memoizedBinarySearch(haystack, needle, state, key) {
const { lastKey, lastNeedle, lastIndex } = state;
let low = 0;
let high = haystack.length - 1;
if (key === lastKey) {
if (needle === lastNeedle) {
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
return lastIndex;
}
if (needle >= lastNeedle) {
low = lastIndex === -1 ? 0 : lastIndex;
} else {
high = lastIndex;
}
}
state.lastKey = key;
state.lastNeedle = needle;
return state.lastIndex = binarySearch(haystack, needle, low, high);
}
// src/by-source.ts
function buildBySources(decoded, memos) {
const sources = memos.map(buildNullArray);
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
if (seg.length === 1) continue;
const sourceIndex2 = seg[SOURCES_INDEX];
const sourceLine = seg[SOURCE_LINE];
const sourceColumn = seg[SOURCE_COLUMN];
const originalSource = sources[sourceIndex2];
const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []);
const memo = memos[sourceIndex2];
let index = upperBound(
originalLine,
sourceColumn,
memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)
);
memo.lastIndex = ++index;
insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);
}
}
return sources;
}
function insert(array, index, value) {
for (let i = array.length; i > index; i--) {
array[i] = array[i - 1];
}
array[index] = value;
}
function buildNullArray() {
return { __proto__: null };
}
// src/types.ts
function parse(map) {
return typeof map === "string" ? JSON.parse(map) : map;
}
// src/flatten-map.ts
var FlattenMap = function(map, mapUrl) {
const parsed = parse(map);
if (!("sections" in parsed)) {
return new TraceMap(parsed, mapUrl);
}
const mappings = [];
const sources = [];
const sourcesContent = [];
const names = [];
const ignoreList = [];
recurse(
parsed,
mapUrl,
mappings,
sources,
sourcesContent,
names,
ignoreList,
0,
0,
Infinity,
Infinity
);
const joined = {
version: 3,
file: parsed.file,
names,
sources,
sourcesContent,
mappings,
ignoreList
};
return presortedDecodedMap(joined);
};
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const { sections } = input;
for (let i = 0; i < sections.length; i++) {
const { map, offset } = sections[i];
let sl = stopLine;
let sc = stopColumn;
if (i + 1 < sections.length) {
const nextOffset = sections[i + 1].offset;
sl = Math.min(stopLine, lineOffset + nextOffset.line);
if (sl === stopLine) {
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
} else if (sl < stopLine) {
sc = columnOffset + nextOffset.column;
}
}
addSection(
map,
mapUrl,
mappings,
sources,
sourcesContent,
names,
ignoreList,
lineOffset + offset.line,
columnOffset + offset.column,
sl,
sc
);
}
}
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const parsed = parse(input);
if ("sections" in parsed) return recurse(...arguments);
const map = new TraceMap(parsed, mapUrl);
const sourcesOffset = sources.length;
const namesOffset = names.length;
const decoded = decodedMappings(map);
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
append(sources, resolvedSources);
append(names, map.names);
if (contents) append(sourcesContent, contents);
else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
for (let i = 0; i < decoded.length; i++) {
const lineI = lineOffset + i;
if (lineI > stopLine) return;
const out = getLine(mappings, lineI);
const cOffset = i === 0 ? columnOffset : 0;
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const column = cOffset + seg[COLUMN];
if (lineI === stopLine && column >= stopColumn) return;
if (seg.length === 1) {
out.push([column]);
continue;
}
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
const sourceLine = seg[SOURCE_LINE];
const sourceColumn = seg[SOURCE_COLUMN];
out.push(
seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
);
}
}
}
function append(arr, other) {
for (let i = 0; i < other.length; i++) arr.push(other[i]);
}
function getLine(arr, index) {
for (let i = arr.length; i <= index; i++) arr[i] = [];
return arr[index];
}
// src/trace-mapping.ts
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
var LEAST_UPPER_BOUND = -1;
var GREATEST_LOWER_BOUND = 1;
var TraceMap = class {
constructor(map, mapUrl) {
const isString = typeof map === "string";
if (!isString && map._decodedMemo) return map;
const parsed = parse(map);
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
this.version = version;
this.file = file;
this.names = names || [];
this.sourceRoot = sourceRoot;
this.sources = sources;
this.sourcesContent = sourcesContent;
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
const resolve = resolver(mapUrl, sourceRoot);
this.resolvedSources = sources.map(resolve);
const { mappings } = parsed;
if (typeof mappings === "string") {
this._encoded = mappings;
this._decoded = void 0;
} else if (Array.isArray(mappings)) {
this._encoded = void 0;
this._decoded = maybeSort(mappings, isString);
} else if (parsed.sections) {
throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
} else {
throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
}
this._decodedMemo = memoizedState();
this._bySources = void 0;
this._bySourceMemos = void 0;
}
};
function cast(map) {
return map;
}
function encodedMappings(map) {
var _a, _b;
return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encodenode_modules\@jridgewell\trace-mapping\dist\trace-mapping.mjs (Line 315:7 - Line 485:7), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 399:2 - Line 569:2)
(cast(map)._encoded));
}
function traceSegment(map, line, column) {
const decoded = decodedMappings(map);
if (line >= decoded.length) return null;
const segments = decoded[line];
const index = traceSegmentInternal(
segments,
cast(map)._decodedMemo,
line,
column,
GREATEST_LOWER_BOUND
);
return index === -1 ? null : segments[index];
}
function originalPositionFor(map, needle) {
let { line, column, bias } = needle;
line--;
if (line < 0) throw new Error(LINE_GTR_ZERO);
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
const decoded = decodedMappings(map);
if (line >= decoded.length) return OMapping(null, null, null, null);
const segments = decoded[line];
const index = traceSegmentInternal(
segments,
cast(map)._decodedMemo,
line,
column,
bias || GREATEST_LOWER_BOUND
);
if (index === -1) return OMapping(null, null, null, null);
const segment = segments[index];
if (segment.length === 1) return OMapping(null, null, null, null);
const { names, resolvedSources } = map;
return OMapping(
resolvedSources[segment[SOURCES_INDEX]],
segment[SOURCE_LINE] + 1,
segment[SOURCE_COLUMN],
segment.length === 5 ? names[segment[NAMES_INDEX]] : null
);
}
function generatedPositionFor(map, needle) {
const { source, line, column, bias } = needle;
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
}
function allGeneratedPositionsFor(map, needle) {
const { source, line, column, bias } = needle;
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
}
function eachMapping(map, cb) {
const decoded = decodedMappings(map);
const { names, resolvedSources } = map;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const generatedLine = i + 1;
const generatedColumn = seg[0];
let source = null;
let originalLine = null;
let originalColumn = null;
let name = null;
if (seg.length !== 1) {
source = resolvedSources[seg[1]];
originalLine = seg[2] + 1;
originalColumn = seg[3];
}
if (seg.length === 5) name = names[seg[4]];
cb({
generatedLine,
generatedColumn,
source,
originalLine,
originalColumn,
name
});
}
}
}
function sourceIndex(map, source) {
const { sources, resolvedSources } = map;
let index = sources.indexOf(source);
if (index === -1) index = resolvedSources.indexOf(source);
return index;
}
function sourceContentFor(map, source) {
const { sourcesContent } = map;
if (sourcesContent == null) return null;
const index = sourceIndex(map, source);
return index === -1 ? null : sourcesContent[index];
}
function isIgnored(map, source) {
const { ignoreList } = map;
if (ignoreList == null) return false;
const index = sourceIndex(map, source);
return index === -1 ? false : ignoreList.includes(index);
}
function presortedDecodedMap(map, mapUrl) {
const tracer = new TraceMap(clone(map, []), mapUrl);
cast(tracer)._decoded = map.mappings;
return tracer;
}
function decodedMap(map) {
return clone(map, decodedMappings(map));
}
function encodedMap(map) {
return clone(map, encodedMappings(map));
}
function clone(map, mappings) {
return {
version: map.version,
file: map.file,
names: map.names,
sourceRoot: map.sourceRoot,
sources: map.sources,
sourcesContent: map.sourcesContent,
mappings,
ignoreList: map.ignoreList || map.x_google_ignoreList
};
}
function OMapping(source, line, column, name) {
return { source, line, column, name };
}
function GMapping(line, column) {
return { line, column };
}
function traceSegmentInternal(segments, memo, line, column, bias) {
let index = memoizedBinarySearch(segments, column, memo, line);
if (found) {
index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
} else if (bias === LEAST_UPPER_BOUND) index++;
if (index === -1 || index === segments.length) return -1;
return index;
}
function sliceGeneratedPositions(segments, memo, line, column, bias) {
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
if (!found && bias === LEAST_UPPER_BOUND) min++;
if (min === -1 || min === segments.length) return [];
const matchedColumn = found ? column : segments[min][COLUMN];
if (!found) min = lowerBound(segments, matchedColumn, min);
const max = upperBound(segments, matchedColumn, min);
const result = [];
for (; min <= max; min++) {
const segment = segments[min];
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
}
return result;
}
function generatedPosition(map, source, line, column, bias, all) {
var _a;
line--;
if (line < 0) throw new Error(LINE_GTR_ZERO);
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
const { sources, resolvedSources } = map;
let sourceIndex2 = sources.indexOf(source);
if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
const generated = (_a = cast(map))._bySources || (_a._bySources = buildBySources(
decodedMappings(map),
cast(map)._bySourceMemos = sources.map(memoizedState)
));
const segments = generated[sourceIndex2][line];
if (segments == null) return all ? [] : GMapping(null, null);
const memo = cast(map)._bySourceMemos[sourceIndex2];
if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
const index = traceSegmentInternal(segments, memo, line, column, bias);
if (index === -1) return GMapping(null, null);
const segment = segments[index];
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
}
exportnode_modules\@jridgewell\sourcemap-codec\dist\sourcemap-codec.umd.js (Line 22:15 - Line 35:13), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 27:2 - Line 40:8)
;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJSnode_modules\@jridgewell\sourcemap-codec\dist\sourcemap-codec.mjs (Line 1:1 - Line 415:7), node_modules\@jridgewell\sourcemap-codec\dist\sourcemap-codec.umd.js (Line 49:1 - Line 463:2)
// src/vlq.ts
var comma = ",".charCodeAt(0);
var semicolon = ";".charCodeAt(0);
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var intToChar = new Uint8Array(64);
var charToInt = new Uint8Array(128);
for (let i = 0; i < chars.length; i++) {
const c = chars.charCodeAt(i);
intToChar[i] = c;
charToInt[c] = i;
}
function decodeInteger(reader, relative) {
let value = 0;
let shift = 0;
let integer = 0;
do {
const c = reader.next();
integer = charToInt[c];
value |= (integer & 31) << shift;
shift += 5;
} while (integer & 32);
const shouldNegate = value & 1;
value >>>= 1;
if (shouldNegate) {
value = -2147483648 | -value;
}
return relative + value;
}
function encodeInteger(builder, num, relative) {
let delta = num - relative;
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
do {
let clamped = delta & 31;
delta >>>= 5;
if (delta > 0) clamped |= 32;
builder.write(intToChar[clamped]);
} while (delta > 0);
return num;
}
function hasMoreVlq(reader, max) {
if (reader.pos >= max) return false;
return reader.peek() !== comma;
}
// src/strings.ts
var bufLength = 1024 * 16;
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
decode(buf) {
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
return out.toString();
}
} : {
decode(buf) {
let out = "";
for (let i = 0; i < buf.length; i++) {
out += String.fromCharCode(buf[i]);
}
return out;
}
};
var StringWriter = class {
constructor() {
this.pos = 0;
this.out = "";
this.buffer = new Uint8Array(bufLength);
}
write(v) {
const { buffer } = this;
buffer[this.pos++] = v;
if (this.pos === bufLength) {
this.out += td.decode(buffer);
this.pos = 0;
}
}
flush() {
const { buffer, out, pos } = this;
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
}
};
var StringReader = class {
constructor(buffer) {
this.pos = 0;
this.buffer = buffer;
}
next() {
return this.buffer.charCodeAt(this.pos++);
}
peek() {
return this.buffer.charCodeAt(this.pos);
}
indexOf(char) {
const { buffer, pos } = this;
const idx = buffer.indexOf(char, pos);
return idx === -1 ? buffer.length : idx;
}
};
// src/scopes.ts
var EMPTY = [];
function decodeOriginalScopes(input) {
const { length } = input;
const reader = new StringReader(input);
const scopes = [];
const stack = [];
let line = 0;
for (; reader.pos < length; reader.pos++) {
line = decodeInteger(reader, line);
const column = decodeInteger(reader, 0);
if (!hasMoreVlq(reader, length)) {
const last = stack.pop();
last[2] = line;
last[3] = column;
continue;
}
const kind = decodeInteger(reader, 0);
const fields = decodeInteger(reader, 0);
const hasName = fields & 1;
const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
let vars = EMPTY;
if (hasMoreVlq(reader, length)) {
vars = [];
do {
const varsIndex = decodeInteger(reader, 0);
vars.push(varsIndex);
} while (hasMoreVlq(reader, length));
}
scope.vars = vars;
scopes.push(scope);
stack.push(scope);
}
return scopes;
}
function encodeOriginalScopes(scopes) {
const writer = new StringWriter();
for (let i = 0; i < scopes.length; ) {
i = _encodeOriginalScopes(scopes, i, writer, [0]);
}
return writer.flush();
}
function _encodeOriginalScopes(scopes, index, writer, state) {
const scope = scopes[index];
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
if (index > 0) writer.write(comma);
state[0] = encodeInteger(writer, startLine, state[0]);
encodeInteger(writer, startColumn, 0);
encodeInteger(writer, kind, 0);
const fields = scope.length === 6 ? 1 : 0;
encodeInteger(writer, fields, 0);
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
for (const v of vars) {
encodeInteger(writer, v, 0);
}
for (index++; index < scopes.length; ) {
const next = scopes[index];
const { 0: l, 1: c } = next;
if (l > endLine || l === endLine && c >= endColumn) {
break;
}
index = _encodeOriginalScopes(scopes, index, writer, state);
}
writer.write(comma);
state[0] = encodeInteger(writer, endLine, state[0]);
encodeInteger(writer, endColumn, 0);
return index;
}
function decodeGeneratedRanges(input) {
const { length } = input;
const reader = new StringReader(input);
const ranges = [];
const stack = [];
let genLine = 0;
let definitionSourcesIndex = 0;
let definitionScopeIndex = 0;
let callsiteSourcesIndex = 0;
let callsiteLine = 0;
let callsiteColumn = 0;
let bindingLine = 0;
let bindingColumn = 0;
do {
const semi = reader.indexOf(";");
let genColumn = 0;
for (; reader.pos < semi; reader.pos++) {
genColumn = decodeInteger(reader, genColumn);
if (!hasMoreVlq(reader, semi)) {
const last = stack.pop();
last[2] = genLine;
last[3] = genColumn;
continue;
}
const fields = decodeInteger(reader, 0);
const hasDefinition = fields & 1;
const hasCallsite = fields & 2;
const hasScope = fields & 4;
let callsite = null;
let bindings = EMPTY;
let range;
if (hasDefinition) {
const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
definitionScopeIndex = decodeInteger(
reader,
definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
);
definitionSourcesIndex = defSourcesIndex;
range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
} else {
range = [genLine, genColumn, 0, 0];
}
range.isScope = !!hasScope;
if (hasCallsite) {
const prevCsi = callsiteSourcesIndex;
const prevLine = callsiteLine;
callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
const sameSource = prevCsi === callsiteSourcesIndex;
callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
callsiteColumn = decodeInteger(
reader,
sameSource && prevLine === callsiteLine ? callsiteColumn : 0
);
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
}
range.callsite = callsite;
if (hasMoreVlq(reader, semi)) {
bindings = [];
do {
bindingLine = genLine;
bindingColumn = genColumn;
const expressionsCount = decodeInteger(reader, 0);
let expressionRanges;
if (expressionsCount < -1) {
expressionRanges = [[decodeInteger(reader, 0)]];
for (let i = -1; i > expressionsCount; i--) {
const prevBl = bindingLine;
bindingLine = decodeInteger(reader, bindingLine);
bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
const expression = decodeInteger(reader, 0);
expressionRanges.push([expression, bindingLine, bindingColumn]);
}
} else {
expressionRanges = [[expressionsCount]];
}
bindings.push(expressionRanges);
} while (hasMoreVlq(reader, semi));
}
range.bindings = bindings;
ranges.push(range);
stack.push(range);
}
genLine++;
reader.pos = semi + 1;
} while (reader.pos < length);
return ranges;
}
function encodeGeneratedRanges(ranges) {
if (ranges.length === 0) return "";
const writer = new StringWriter();
for (let i = 0; i < ranges.length; ) {
i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
}
return writer.flush();
}
function _encodeGeneratedRanges(ranges, index, writer, state) {
const range = ranges[index];
const {
0: startLine,
1: startColumn,
2: endLine,
3: endColumn,
isScope,
callsite,
bindings
} = range;
if (state[0] < startLine) {
catchupLine(writer, state[0], startLine);
state[0] = startLine;
state[1] = 0;
} else if (index > 0) {
writer.write(comma);
}
state[1] = encodeInteger(writer, range[1], state[1]);
const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
encodeInteger(writer, fields, 0);
if (range.length === 6) {
const { 4: sourcesIndex, 5: scopesIndex } = range;
if (sourcesIndex !== state[2]) {
state[3] = 0;
}
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
state[3] = encodeInteger(writer, scopesIndex, state[3]);
}
if (callsite) {
const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
if (sourcesIndex !== state[4]) {
state[5] = 0;
state[6] = 0;
} else if (callLine !== state[5]) {
state[6] = 0;
}
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
state[5] = encodeInteger(writer, callLine, state[5]);
state[6] = encodeInteger(writer, callColumn, state[6]);
}
if (bindings) {
for (const binding of bindings) {
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
const expression = binding[0][0];
encodeInteger(writer, expression, 0);
let bindingStartLine = startLine;
let bindingStartColumn = startColumn;
for (let i = 1; i < binding.length; i++) {
const expRange = binding[i];
bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
encodeInteger(writer, expRange[0], 0);
}
}
}
for (index++; index < ranges.length; ) {
const next = ranges[index];
const { 0: l, 1: c } = next;
if (l > endLine || l === endLine && c >= endColumn) {
break;
}
index = _encodeGeneratedRanges(ranges, index, writer, state);
}
if (state[0] < endLine) {
catchupLine(writer, state[0], endLine);
state[0] = endLine;
state[1] = 0;
} else {
writer.write(comma);
}
state[1] = encodeInteger(writer, endColumn, state[1]);
return index;
}
function catchupLine(writer, lastLine, line) {
do {
writer.write(semicolon);
} while (++lastLine < line);
}
// src/sourcemap-codec.ts
function decode(mappings) {
const { length } = mappings;
const reader = new StringReader(mappings);
const decoded = [];
let genColumn = 0;
let sourcesIndex = 0;
let sourceLine = 0;
let sourceColumn = 0;
let namesIndex = 0;
do {
const semi = reader.indexOf(";");
const line = [];
let sorted = true;
let lastCol = 0;
genColumn = 0;
while (reader.pos < semi) {
let seg;
genColumn = decodeInteger(reader, genColumn);
if (genColumn < lastCol) sorted = false;
lastCol = genColumn;
if (hasMoreVlq(reader, semi)) {
sourcesIndex = decodeInteger(reader, sourcesIndex);
sourceLine = decodeInteger(reader, sourceLine);
sourceColumn = decodeInteger(reader, sourceColumn);
if (hasMoreVlq(reader, semi)) {
namesIndex = decodeInteger(reader, namesIndex);
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
} else {
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
}
} else {
seg = [genColumn];
}
line.push(seg);
reader.pos++;
}
if (!sorted) sort(line);
decoded.push(line);
reader.pos = semi + 1;
} while (reader.pos <= length);
return decoded;
}
function sort(line) {
line.sort(sortComparator);
}
function sortComparator(a, b) {
return a[0] - b[0];
}
function encode(decoded) {
const writer = new StringWriter();
let sourcesIndex = 0;
let sourceLine = 0;
let sourceColumn = 0;
let namesIndex = 0;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
if (i > 0) writer.write(semicolon);
if (line.length === 0) continue;
let genColumn = 0;
for (let j = 0; j < line.length; j++) {
const segment = line[j];
if (j > 0) writer.write(comma);
genColumn = encodeInteger(writer, segment[0], genColumn);
if (segment.length === 1) continue;
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
sourceLine = encodeInteger(writer, segment[2], sourceLine);
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
if (segment.length === 4) continue;
namesIndex = encodeInteger(writer, segment[4], namesIndex);
}
}
return writer.flush();
}
exportnode_modules\@jridgewell\resolve-uri\dist\resolve-uri.mjs (Line 23:1 - Line 113:4), node_modules\@jridgewell\resolve-uri\dist\resolve-uri.umd.js (Line 29:5 - Line 119:8)
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
function isAbsoluteUrl(input) {
return schemeRegex.test(input);
}
function isSchemeRelativeUrl(input) {
return input.startsWith('//');
}
function isAbsolutePath(input) {
return input.startsWith('/');
}
function isFileUrl(input) {
return input.startsWith('file:');
}
function isRelative(input) {
return /^[.?#]/.test(input);
}
function parseAbsoluteUrl(input) {
const match = urlRegex.exec(input);
return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
}
function parseFileUrl(input) {
const match = fileRegex.exec(input);
const path = match[2];
return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
}
function makeUrl(scheme, user, host, port, path, query, hash) {
return {
scheme,
user,
host,
port,
path,
query,
hash,
type: 7 /* Absolute */,
};
}
function parseUrl(input) {
if (isSchemeRelativeUrl(input)) {
const url = parseAbsoluteUrl('http:' + input);
url.scheme = '';
url.type = 6 /* SchemeRelative */;
return url;
}
if (isAbsolutePath(input)) {
const url = parseAbsoluteUrl('http://foo.com' + input);
url.scheme = '';
url.host = '';
url.type = 5 /* AbsolutePath */;
return url;
}
if (isFileUrl(input))
return parseFileUrl(input);
if (isAbsoluteUrl(input))
return parseAbsoluteUrl(input);
const url = parseAbsoluteUrl('http://foo.com/' + input);
url.scheme = '';
url.host = '';
url.type = input
? input.startsWith('?')
? 3 /* Query */
: input.startsWith('#')
? 2 /* Hash */
: 4 /* RelativePath */
: 1 /* Empty */;
return url;
}
function stripPathFilename(path) {
// If a path ends with a parent directory "..", then it's a relative path with excess parent
// paths. It's not a file, so we can't strip it.
if (path.endsWith('/..'))
return path;
const index = path.lastIndexOf('/');
return path.slice(0, index + 1);
}
function mergePaths(url, base) {
normalizePath(base, base.type);
// If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
// path).
if (url.path === '/') {
url.path = base.path;
}
else {
// Resolution happens relative to the base path's directory, not the file.
url.path = stripPathFilename(base.path) + url.path;
}
}
/**
* The path can have empty directories "//", unneeded parents "foo/..", or current directory
* "foo/.". We need to normalize to a standard representation.
*/node_modules\@jridgewell\resolve-uri\dist\resolve-uri.mjs (Line 114:1 - Line 170:4), node_modules\@jridgewell\resolve-uri\dist\resolve-uri.umd.js (Line 120:5 - Line 176:8)
function normalizePath(url, type) {
const rel = type <= 4 /* RelativePath */;
const pieces = url.path.split('/');
// We need to preserve the first piece always, so that we output a leading slash. The item at
// pieces[0] is an empty string.
let pointer = 1;
// Positive is the number of real directories we've output, used for popping a parent directory.
// Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
let positive = 0;
// We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
// generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
// real directory, we won't need to append, unless the other conditions happen again.
let addTrailingSlash = false;
for (let i = 1; i < pieces.length; i++) {
const piece = pieces[i];
// An empty directory, could be a trailing slash, or just a double "//" in the path.
if (!piece) {
addTrailingSlash = true;
continue;
}
// If we encounter a real directory, then we don't need to append anymore.
addTrailingSlash = false;
// A current directory, which we can always drop.
if (piece === '.')
continue;
// A parent directory, we need to see if there are any real directories we can pop. Else, we
// have an excess of parents, and we'll need to keep the "..".
if (piece === '..') {
if (positive) {
addTrailingSlash = true;
positive--;
pointer--;
}
else if (rel) {
// If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
// URL, protocol relative URL, or an absolute path, we don't need to keep excess.
pieces[pointer++] = piece;
}
continue;
}
// We've encountered a real directory. Move it to the next insertion pointer, which accounts for
// any popped or dropped directories.
pieces[pointer++] = piece;
positive++;
}
let path = '';
for (let i = 1; i < pointer; i++) {
path += '/' + pieces[i];
}
if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
path += '/';
}
url.path = path;
}
/**
* Attempts to resolve `input` URL/path relative to `base`.
*/node_modules\@jridgewell\resolve-uri\dist\resolve-uri.mjs (Line 171:1 - Line 231:7), node_modules\@jridgewell\resolve-uri\dist\resolve-uri.umd.js (Line 177:5 - Line 237:7)
function resolve(input, base) {
if (!input && !base)
return '';
const url = parseUrl(input);
let inputType = url.type;
if (base && inputType !== 7 /* Absolute */) {
const baseUrl = parseUrl(base);
const baseType = baseUrl.type;
switch (inputType) {
case 1 /* Empty */:
url.hash = baseUrl.hash;
// fall through
case 2 /* Hash */:
url.query = baseUrl.query;
// fall through
case 3 /* Query */:
case 4 /* RelativePath */:
mergePaths(url, baseUrl);
// fall through
case 5 /* AbsolutePath */:
// The host, user, and port are joined, you can't copy one without the others.
url.user = baseUrl.user;
url.host = baseUrl.host;
url.port = baseUrl.port;
// fall through
case 6 /* SchemeRelative */:
// The input doesn't have a schema at least, so we need to copy at least that over.
url.scheme = baseUrl.scheme;
}
if (baseType > inputType)
inputType = baseType;
}
normalizePath(url, inputType);
const queryHash = url.query + url.hash;
switch (inputType) {
// This is impossible, because of the empty checks at the start of the function.
// case UrlType.Empty:
case 2 /* Hash */:
case 3 /* Query */:
return queryHash;
case 4 /* RelativePath */: {
// The first char is always a "/", and we need it to be relative.
const path = url.path.slice(1);
if (!path)
return queryHash || '.';
if (isRelative(base || input) && !isRelative(path)) {
// If base started with a leading ".", or there is no base and input started with a ".",
// then we need to ensure that the relative path starts with a ".". We don't know if
// relative starts with a "..", though, so check before prepending.
return './' + path + queryHash;
}
return path + queryHash;
}
case 5 /* AbsolutePath */:
return url.path + queryHash;
default:
return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
}
}
exportnode_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 17:21 - Line 57:33), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 17:23 - Line 57:31)
) {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// umd:@jridgewell/sourcemap-codec
var require_sourcemap_codec = __commonJS({
"umd:@jridgewell/sourcemap-codec"(exports, module2) {
module2.exports = require_sourcemapCodec;
}
});
// umd:@jridgewell/trace-mappingnode_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 299:6 - Line 307:22), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 227:8 - Line 235:15)
;
}
function insert(array, index, value) {
for (let i = array.length; i > index; i--) {
array[i] = array[i - 1];
}
array[index] = value;
}
function removeEmptyFinalLinesnode_modules\@jridgewell\gen-mapping\dist\gen-mapping.mjs (Line 1:1 - Line 35:7), node_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 81:1 - Line 115:4)
// src/set-array.ts
var SetArray = class {
constructor() {
this._indexes = { __proto__: null };
this.array = [];
}
};
function cast(set) {
return set;
}
function get(setarr, key) {
return cast(setarr)._indexes[key];
}
function put(setarr, key) {
const index = get(setarr, key);
if (index !== void 0) return index;
const { array, _indexes: indexes } = cast(setarr);
const length = array.push(key);
return indexes[key] = length - 1;
}
function remove(setarr, key) {
const index = get(setarr, key);
if (index === void 0) return;
const { array, _indexes: indexes } = cast(setarr);
for (let i = index + 1; i < array.length; i++) {
const k = array[i];
array[i - 1] = k;
indexes[k]--;
}
indexes[key] = void 0;
array.pop();
}
// src/gen-mapping.ts
importnode_modules\@jridgewell\gen-mapping\dist\gen-mapping.mjs (Line 38:28 - Line 145:7), node_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 116:2 - Line 223:2)
;
// src/sourcemap-segment.ts
var COLUMN = 0;
var SOURCES_INDEX = 1;
var SOURCE_LINE = 2;
var SOURCE_COLUMN = 3;
var NAMES_INDEX = 4;
// src/gen-mapping.ts
var NO_NAME = -1;
var GenMapping = class {
constructor({ file, sourceRoot } = {}) {
this._names = new SetArray();
this._sources = new SetArray();
this._sourcesContent = [];
this._mappings = [];
this.file = file;
this.sourceRoot = sourceRoot;
this._ignoreList = new SetArray();
}
};
function cast2(map) {
return map;
}
function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
return addSegmentInternal(
false,
map,
genLine,
genColumn,
source,
sourceLine,
sourceColumn,
name,
content
);
}
function addMapping(map, mapping) {
return addMappingInternal(false, map, mapping);
}
var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
return addSegmentInternal(
true,
map,
genLine,
genColumn,
source,
sourceLine,
sourceColumn,
name,
content
);
};
var maybeAddMapping = (map, mapping) => {
return addMappingInternal(true, map, mapping);
};
function setSourceContent(map, source, content) {
const {
_sources: sources,
_sourcesContent: sourcesContent
// _originalScopes: originalScopes,
} = cast2(map);
const index = put(sources, source);
sourcesContent[index] = content;
}
function setIgnore(map, source, ignore = true) {
const {
_sources: sources,
_sourcesContent: sourcesContent,
_ignoreList: ignoreList
// _originalScopes: originalScopes,
} = cast2(map);
const index = put(sources, source);
if (index === sourcesContent.length) sourcesContent[index] = null;
if (ignore) put(ignoreList, index);
else remove(ignoreList, index);
}
function toDecodedMap(map) {
const {
_mappings: mappings,
_sources: sources,
_sourcesContent: sourcesContent,
_names: names,
_ignoreList: ignoreList
// _originalScopes: originalScopes,
// _generatedRanges: generatedRanges,
} = cast2(map);
removeEmptyFinalLines(mappings);
return {
version: 3,
file: map.file || void 0,
names: names.array,
sourceRoot: map.sourceRoot || void 0,
sources: sources.array,
sourcesContent,
mappings,
// originalScopes,
// generatedRanges,
ignoreList: ignoreList.array
};
}
function toEncodedMap(map) {
const decoded = toDecodedMap(map);
return Object.assign({}, decoded, {
// originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
// generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
mappings: encodenode_modules\@jridgewell\gen-mapping\dist\gen-mapping.mjs (Line 149:2 - Line 154:16), node_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 227:2 - Line 232:2)
TraceMap(input);
const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
putAll(cast2(gen)._names, map.names);
putAll(cast2(gen)._sources, map.sources);
cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
cast2(gen)._mappings = decodedMappingsnode_modules\@jridgewell\gen-mapping\dist\gen-mapping.mjs (Line 154:16 - Line 279:7), node_modules\@jridgewell\gen-mapping\dist\gen-mapping.umd.js (Line 232:2 - Line 357:2)
(map);
if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList);
return gen;
}
function allMappings(map) {
const out = [];
const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
for (let i = 0; i < mappings.length; i++) {
const line = mappings[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const generated = { line: i + 1, column: seg[COLUMN] };
let source = void 0;
let original = void 0;
let name = void 0;
if (seg.length !== 1) {
source = sources.array[seg[SOURCES_INDEX]];
original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];
}
out.push({ generated, source, original, name });
}
}
return out;
}
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
const {
_mappings: mappings,
_sources: sources,
_sourcesContent: sourcesContent,
_names: names
// _originalScopes: originalScopes,
} = cast2(map);
const line = getIndex(mappings, genLine);
const index = getColumnIndex(line, genColumn);
if (!source) {
if (skipable && skipSourceless(line, index)) return;
return insert(line, index, [genColumn]);
}
assert(sourceLine);
assert(sourceColumn);
const sourcesIndex = put(sources, source);
const namesIndex = name ? put(names, name) : NO_NAME;
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
return;
}
return insert(
line,
index,
name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
);
}
function assert(_val) {
}
function getIndex(arr, index) {
for (let i = arr.length; i <= index; i++) {
arr[i] = [];
}
return arr[index];
}
function getColumnIndex(line, genColumn) {
let index = line.length;
for (let i = index - 1; i >= 0; index = i--) {
const current = line[i];
if (genColumn >= current[COLUMN]) break;
}
return index;
}
function insert(array, index, value) {
for (let i = array.length; i > index; i--) {
array[i] = array[i - 1];
}
array[index] = value;
}
function removeEmptyFinalLines(mappings) {
const { length } = mappings;
let len = length;
for (let i = len - 1; i >= 0; len = i, i--) {
if (mappings[i].length > 0) break;
}
if (len < length) mappings.length = len;
}
function putAll(setarr, array) {
for (let i = 0; i < array.length; i++) put(setarr, array[i]);
}
function skipSourceless(line, index) {
if (index === 0) return true;
const prev = line[index - 1];
return prev.length === 1;
}
function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
if (index === 0) return false;
const prev = line[index - 1];
if (prev.length === 1) return false;
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
}
function addMappingInternal(skipable, map, mapping) {
const { generated, source, original, name, content } = mapping;
if (!source) {
return addSegmentInternal(
skipable,
map,
generated.line - 1,
generated.column,
null,
null,
null,
null,
null
);
}
assert(original);
return addSegmentInternal(
skipable,
map,
generated.line - 1,
generated.column,
source,
original.line - 1,
original.column,
name,
content
);
}
exportnode_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 30:1 - Line 77:4), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 18:1 - Line 65:4)
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* Creates a new promise with resolve and reject functions.
* @returns {{promise:Promise<any>, resolve:(value:any) => any, reject: (value:any) => any}} A new promise.
*/node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 94:2 - Line 192:10), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 59:8 - Line 157:7)
;
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#retryingnode_modules\@humanwhocodes\retry\dist\retrier.js (Line 2:1 - Line 477:2), node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 1:1 - Line 476:2)
/**
* @fileoverview A utility for retrying failed async method calls.
*/
/* global setTimeout, clearTimeout */
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const MAX_TASK_TIMEOUT = 60000;
const MAX_TASK_DELAY = 100;
const MAX_CONCURRENCY = 1000;
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* Logs a message to the console if the DEBUG environment variable is set.
* @param {string} message The message to log.
* @returns {void}
*/
function debug(message) {
if (globalThis?.process?.env.DEBUG === "@hwc/retry") {
console.debug(message);
}
}
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* Creates a new promise with resolve and reject functions.
* @returns {{promise:Promise<any>, resolve:(value:any) => any, reject: (value:any) => any}} A new promise.
*/
function createPromise() {
if (Promise.withResolvers) {
return Promise.withResolvers();
}
let resolve, reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
if (resolve === undefined || reject === undefined) {
throw new Error("Promise executor did not initialize resolve or reject.");
}
return { promise, resolve, reject };
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#retrying = [];
/**
* Represents the queue for pending tasks.
* @type {Array<Function>}
*/
#pending = [];
/**
* The number of tasks currently being processed.
* @type {number}
*/
#working = 0;
/**
* The timeout for the queue.
* @type {number}
*/
#timeout;
/**
* The maximum delay for the queue.
* @type {number}
*/
#maxDelay;
/**
* The setTimeout() timer ID.
* @type {NodeJS.Timeout|undefined}
*/
#timerId;
/**
* The function to call.
* @type {Function}
*/
#check;
/**
* The maximum number of concurrent tasks.
* @type {number}
*/
#concurrency;
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
* @param {number} [options.concurrency] The maximum number of concurrent tasks.
*/
constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) {
if (typeof check !== "function") {
throw new Error("Missing function to check errors");
}
this.#check = check;
this.#timeout = timeout;
this.#maxDelay = maxDelay;
this.#concurrency = concurrency;
}
/**
* Gets the number of tasks waiting to be retried.
* @returns {number} The number of tasks in the retry queue.
*/
get retrying() {
return this.#retrying.length;
}
/**
* Gets the number of tasks waiting to be processed in the pending queue.
* @returns {number} The number of tasks in the pending queue.
*/
get pending() {
return this.#pending.length;
}
/**
* Gets the number of tasks currently being processed.
* @returns {number} The number of tasks currently being processed.
*/
get working() {
return this.#working;
}
/**
* Calls the function and retries if it fails.
* @param {Function} fn The function to call.
* @param {Object} options The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @param {Promise<any>} options.promise The promise to return when the function settles.
* @param {Function} options.resolve The resolve function for the promise.
* @param {Function} options.reject The reject function for the promise.
* @returns {Promise<any>} A promise that resolves when the function is
* called successfully.
*/
#call(fn, { signal, promise, resolve, reject }) {
let result;
try {
result = fn();
} catch (/** @type {any} */ error) {
reject(new Error(`Synchronous error: ${error.message}`, { cause: error }));
return promise;
}
// if the result is not a promise then reject an error
if (!result || typeof result.then !== "function") {
reject(new Error("Result is not a promise."));
return promise;
}
this.#working++;
promise.finally(() => {
this.#working--;
this.#processPending();
})
// `promise.finally` creates a new promise that may be rejected, so it must be handled.
.catch(() => { });
// call the original function and catch any ENFILE or EMFILE errors
Promise.resolve(result)
.then(value => {
debug("Function called successfully without retry.");
resolve(value);
})
.catch(error => {
if (!this.#check(error)) {
reject(error);
return;
}
const task = new RetryTask(fn, error, resolve, reject, signal);
debug(`Function failed, queuing for retry with task ${task.id}.`);
this.#retrying.push(task);
signal?.addEventListener("abort", () => {
debug(`Task ${task.id} was aborted due to AbortSignal.`);
reject(signal.reason);
});
this.#processQueue();
});
return promise;
}
/**
* Adds a new retry job to the queue.
* @template {(...args: unknown[]) => Promise<unknown>} Func
* @template {Awaited<ReturnType<Func>>} RetVal
* @param {Func} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<RetVal>} A promise that resolves when the queue is processed.
*/
retry(fn, { signal } = {}) {
signal?.throwIfAborted();
const { promise, resolve, reject } = createPromise();
this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject }));
this.#processPending();
return promise;
}
/**
* Processes the pending queue and the retry queue.
* @returns {void}
*/
#processAll() {
if (this.pending) {
this.#processPending();
}
if (this.retrying) {
this.#processQueue();
}
}
/**
* Processes the pending queue to see which tasks can be started.
* @returns {void}
*/
#processPending() {
debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`);
const available = this.#concurrency - this.working;
if (available <= 0) {
return;
}
const count = Math.min(this.pending, available);
for (let i = 0; i < count; i++) {
const task = this.#pending.shift();
task?.();
}
debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`);
}
/**
* Processes the queue.
* @returns {void}
*/
#processQueue() {
// clear any timer because we're going to check right now
clearTimeout(this.#timerId);
this.#timerId = undefined;
debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`);
const processAgain = () => {
this.#timerId = setTimeout(() => this.#processAll(), 0);
};
// if there's nothing in the queue, we're done
const task = this.#retrying.shift();
if (!task) {
debug("Queue is empty, exiting.");
if (this.pending) {
processAgain();
}
return;
}
// if it's time to bail, then bail
if (isTimeToBail(task, this.#timeout)) {
debug(`Task ${task.id} was abandoned due to timeout.`);
task.reject(task.error);
processAgain();
return;
}
// if it's not time to retry, then wait and try again
if (!isTimeToRetry(task, this.#maxDelay)) {
debug(`Task ${task.id} is not ready to retry, skipping.`);
this.#retrying.push(task);
processAgain();
return;
}
// otherwise, try again
task.lastAttempt = Date.now();
// Promise.resolve needed in case it's a thenable but not a Promise
Promise.resolve(task.fn())
// @ts-ignore because we know it's any
.then(result => {
debug(`Task ${task.id} succeeded after ${task.age}ms.`);
task.resolve(result);
})
// @ts-ignore because we know it's any
.catch(error => {
if (!this.#check(error)) {
debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`);
task.reject(error);
return;
}
// update the task timestamp and push to back of queue to try again
task.lastAttempt = Date.now();
this.#retrying.push(task);
debug(`Task ${task.id} failed, requeueing to try again.`);
})
.finally(() => {
this.#processAll();
});
}
}
export { Retrier };node_modules\@humanwhocodes\retry\dist\retrier.cjs (Line 3:1 - Line 478:8), node_modules\@humanwhocodes\retry\dist\retrier.mjs (Line 1:1 - Line 476:7)
/**
* @fileoverview A utility for retrying failed async method calls.
*/
/* global setTimeout, clearTimeout */
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const MAX_TASK_TIMEOUT = 60000;
const MAX_TASK_DELAY = 100;
const MAX_CONCURRENCY = 1000;
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* Logs a message to the console if the DEBUG environment variable is set.
* @param {string} message The message to log.
* @returns {void}
*/
function debug(message) {
if (globalThis?.process?.env.DEBUG === "@hwc/retry") {
console.debug(message);
}
}
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* Creates a new promise with resolve and reject functions.
* @returns {{promise:Promise<any>, resolve:(value:any) => any, reject: (value:any) => any}} A new promise.
*/
function createPromise() {
if (Promise.withResolvers) {
return Promise.withResolvers();
}
let resolve, reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
if (resolve === undefined || reject === undefined) {
throw new Error("Promise executor did not initialize resolve or reject.");
}
return { promise, resolve, reject };
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#retrying = [];
/**
* Represents the queue for pending tasks.
* @type {Array<Function>}
*/
#pending = [];
/**
* The number of tasks currently being processed.
* @type {number}
*/
#working = 0;
/**
* The timeout for the queue.
* @type {number}
*/
#timeout;
/**
* The maximum delay for the queue.
* @type {number}
*/
#maxDelay;
/**
* The setTimeout() timer ID.
* @type {NodeJS.Timeout|undefined}
*/
#timerId;
/**
* The function to call.
* @type {Function}
*/
#check;
/**
* The maximum number of concurrent tasks.
* @type {number}
*/
#concurrency;
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
* @param {number} [options.concurrency] The maximum number of concurrent tasks.
*/
constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) {
if (typeof check !== "function") {
throw new Error("Missing function to check errors");
}
this.#check = check;
this.#timeout = timeout;
this.#maxDelay = maxDelay;
this.#concurrency = concurrency;
}
/**
* Gets the number of tasks waiting to be retried.
* @returns {number} The number of tasks in the retry queue.
*/
get retrying() {
return this.#retrying.length;
}
/**
* Gets the number of tasks waiting to be processed in the pending queue.
* @returns {number} The number of tasks in the pending queue.
*/
get pending() {
return this.#pending.length;
}
/**
* Gets the number of tasks currently being processed.
* @returns {number} The number of tasks currently being processed.
*/
get working() {
return this.#working;
}
/**
* Calls the function and retries if it fails.
* @param {Function} fn The function to call.
* @param {Object} options The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @param {Promise<any>} options.promise The promise to return when the function settles.
* @param {Function} options.resolve The resolve function for the promise.
* @param {Function} options.reject The reject function for the promise.
* @returns {Promise<any>} A promise that resolves when the function is
* called successfully.
*/
#call(fn, { signal, promise, resolve, reject }) {
let result;
try {
result = fn();
} catch (/** @type {any} */ error) {
reject(new Error(`Synchronous error: ${error.message}`, { cause: error }));
return promise;
}
// if the result is not a promise then reject an error
if (!result || typeof result.then !== "function") {
reject(new Error("Result is not a promise."));
return promise;
}
this.#working++;
promise.finally(() => {
this.#working--;
this.#processPending();
})
// `promise.finally` creates a new promise that may be rejected, so it must be handled.
.catch(() => { });
// call the original function and catch any ENFILE or EMFILE errors
Promise.resolve(result)
.then(value => {
debug("Function called successfully without retry.");
resolve(value);
})
.catch(error => {
if (!this.#check(error)) {
reject(error);
return;
}
const task = new RetryTask(fn, error, resolve, reject, signal);
debug(`Function failed, queuing for retry with task ${task.id}.`);
this.#retrying.push(task);
signal?.addEventListener("abort", () => {
debug(`Task ${task.id} was aborted due to AbortSignal.`);
reject(signal.reason);
});
this.#processQueue();
});
return promise;
}
/**
* Adds a new retry job to the queue.
* @template {(...args: unknown[]) => Promise<unknown>} Func
* @template {Awaited<ReturnType<Func>>} RetVal
* @param {Func} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<RetVal>} A promise that resolves when the queue is processed.
*/
retry(fn, { signal } = {}) {
signal?.throwIfAborted();
const { promise, resolve, reject } = createPromise();
this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject }));
this.#processPending();
return promise;
}
/**
* Processes the pending queue and the retry queue.
* @returns {void}
*/
#processAll() {
if (this.pending) {
this.#processPending();
}
if (this.retrying) {
this.#processQueue();
}
}
/**
* Processes the pending queue to see which tasks can be started.
* @returns {void}
*/
#processPending() {
debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`);
const available = this.#concurrency - this.working;
if (available <= 0) {
return;
}
const count = Math.min(this.pending, available);
for (let i = 0; i < count; i++) {
const task = this.#pending.shift();
task?.();
}
debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`);
}
/**
* Processes the queue.
* @returns {void}
*/
#processQueue() {
// clear any timer because we're going to check right now
clearTimeout(this.#timerId);
this.#timerId = undefined;
debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`);
const processAgain = () => {
this.#timerId = setTimeout(() => this.#processAll(), 0);
};
// if there's nothing in the queue, we're done
const task = this.#retrying.shift();
if (!task) {
debug("Queue is empty, exiting.");
if (this.pending) {
processAgain();
}
return;
}
// if it's time to bail, then bail
if (isTimeToBail(task, this.#timeout)) {
debug(`Task ${task.id} was abandoned due to timeout.`);
task.reject(task.error);
processAgain();
return;
}
// if it's not time to retry, then wait and try again
if (!isTimeToRetry(task, this.#maxDelay)) {
debug(`Task ${task.id} is not ready to retry, skipping.`);
this.#retrying.push(task);
processAgain();
return;
}
// otherwise, try again
task.lastAttempt = Date.now();
// Promise.resolve needed in case it's a thenable but not a Promise
Promise.resolve(task.fn())
// @ts-ignore because we know it's any
.then(result => {
debug(`Task ${task.id} succeeded after ${task.age}ms.`);
task.resolve(result);
})
// @ts-ignore because we know it's any
.catch(error => {
if (!this.#check(error)) {
debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`);
task.reject(error);
return;
}
// update the task timestamp and push to back of queue to try again
task.lastAttempt = Date.now();
this.#retrying.push(task);
debug(`Task ${task.id} failed, requeueing to try again.`);
})
.finally(() => {
this.#processAll();
});
}
}
exportsnode_modules\@humanfs\node\src\node-hfs.js (Line 176:11 - Line 188:11), node_modules\@humanfs\node\src\node-hfs.js (Line 143:10 - Line 155:10)
(filePath, value))
.catch(error => {
// the directory may not exist, so create it
if (error.code === "ENOENT") {
const dirPath = path.dirname(
filePath instanceof URL
? fileURLToPath(filePath)
: filePath,
);
return this.#fsp
.mkdir(dirPath, { recursive: true })
.then(() => this.#fsp.appendFilenode_modules\@babel\runtime\helpers\wrapRegExp.js (Line 7:8 - Line 52:7), node_modules\@babel\runtime\helpers\esm\wrapRegExp.js (Line 7:2 - Line 52:7)
;
var e = RegExp.prototype,
r = new WeakMap();
function BabelRegExp(e, t, p) {
var o = RegExp(e, t);
return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype);
}
function buildGroups(e, t) {
var p = r.get(t);
return Object.keys(p).reduce(function (r, t) {
var o = p[t];
if ("number" == typeof o) r[t] = e[o];else {
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++;
r[t] = e[o[i]];
}
return r;
}, Object.create(null));
}
return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) {
var t = e.exec.call(this, r);
if (t) {
t.groups = buildGroups(t, this);
var p = t.indices;
p && (p.groups = buildGroups(p, this));
}
return t;
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) {
if ("string" == typeof p) {
var o = r.get(this);
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) {
if ("" === t) return e;
var p = o[r];
return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : "";
}));
}
if ("function" == typeof p) {
var i = this;
return e[Symbol.replace].call(this, t, function () {
var e = arguments;
return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e);
});
}
return e[Symbol.replace].call(this, t, p);
}, _wrapRegExp.apply(this, arguments);
}
modulenode_modules\@babel\runtime\helpers\wrapNativeSuper.js (Line 7:2 - Line 25:7), node_modules\@babel\runtime\helpers\esm\wrapNativeSuper.js (Line 7:2 - Line 25:17)
_wrapNativeSuper = function _wrapNativeSuper(t) {
if (null === t || !isNativeFunction(t)) return t;
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
if (void 0 !== r) {
if (r.has(t)) return r.get(t);
r.set(t, Wrapper);
}
function Wrapper() {
return construct(t, arguments, getPrototypeOf(this).constructor);
}
return Wrapper.prototype = Object.create(t.prototype, {
constructor: {
value: Wrapper,
enumerable: !1,
writable: !0,
configurable: !0
}
}), setPrototypeOf(Wrapper, t);
}, modulenode_modules\@babel\runtime\helpers\wrapAsyncGenerator.js (Line 1:2 - Line 69:7), node_modules\@babel\runtime\helpers\esm\wrapAsyncGenerator.js (Line 1:21 - Line 69:7)
;
function _wrapAsyncGenerator(e) {
return function () {
return new AsyncGenerator(e.apply(this, arguments));
};
}
function AsyncGenerator(e) {
var r, t;
function resume(r, t) {
try {
var n = e[r](t),
o = n.value,
u = o instanceof OverloadYield;
Promise.resolve(u ? o.v : o).then(function (t) {
if (u) {
var i = "return" === r ? "return" : "next";
if (!o.k || t.done) return resume(i, t);
t = e[i](t).value;
}
settle(n.done ? "return" : "normal", t);
}, function (e) {
resume("throw", e);
});
} catch (e) {
settle("throw", e);
}
}
function settle(e, n) {
switch (e) {
case "return":
r.resolve({
value: n,
done: !0
});
break;
case "throw":
r.reject(n);
break;
default:
r.resolve({
value: n,
done: !1
});
}
(r = r.next) ? resume(r.key, r.arg) : t = null;
}
this._invoke = function (e, n) {
return new Promise(function (o, u) {
var i = {
key: e,
arg: n,
resolve: o,
reject: u,
next: null
};
t ? t = t.next = i : (r = t = i, resume(e, n));
});
}, "function" != typeof e["return"] && (this["return"] = void 0);
}
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
return this;
}, AsyncGenerator.prototype.next = function (e) {
return this._invoke("next", e);
}, AsyncGenerator.prototype["throw"] = function (e) {
return this._invoke("throw", e);
}, AsyncGenerator.prototype["return"] = function (e) {
return this._invoke("return", e);
};
modulenode_modules\@babel\runtime\helpers\usingCtx.js (Line 1:1 - Line 59:7), node_modules\@babel\runtime\helpers\esm\usingCtx.js (Line 1:1 - Line 59:7)
function _usingCtx() {
var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) {
var n = Error();
return n.name = "SuppressedError", n.error = r, n.suppressed = e, n;
},
e = {},
n = [];
function using(r, e) {
if (null != e) {
if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o;
if ("function" != typeof o) throw new TypeError("Object is not disposable.");
t && (o = function o() {
try {
t.call(e);
} catch (r) {
return Promise.reject(r);
}
}), n.push({
v: e,
d: o,
a: r
});
} else r && n.push({
d: e,
a: r
});
return e;
}
return {
e: e,
u: using.bind(null, !1),
a: using.bind(null, !0),
d: function d() {
var o,
t = this.e,
s = 0;
function next() {
for (; o = n.pop();) try {
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
if (o.d) {
var r = o.d.call(o.v);
if (o.a) return s |= 2, Promise.resolve(r).then(next, err);
} else s |= 1;
} catch (r) {
return err(r);
}
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
if (t !== e) throw t;
}
function err(n) {
return t = t !== e ? new r(n, t) : n, next();
}
return next();
}
};
}
modulenode_modules\@babel\runtime\helpers\using.js (Line 1:1 - Line 12:7), node_modules\@babel\runtime\helpers\esm\using.js (Line 1:1 - Line 12:7)
function _using(o, n, e) {
if (null == n) return n;
if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function.");
return o.push({
v: n,
d: r,
a: e
}), n;
}
modulenode_modules\@babel\runtime\helpers\unsupportedIterableToArray.js (Line 1:2 - Line 9:7), node_modules\@babel\runtime\helpers\esm\unsupportedIterableToArray.js (Line 1:24 - Line 9:7)
;
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
}
}
modulenode_modules\@babel\runtime\helpers\tsRewriteRelativeImportExtensions.js (Line 1:1 - Line 6:7), node_modules\@babel\runtime\helpers\esm\tsRewriteRelativeImportExtensions.js (Line 1:1 - Line 6:7)
function tsRewriteRelativeImportExtensions(t, e) {
return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) {
return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t;
}) : t;
}
modulenode_modules\@babel\runtime\helpers\toSetter.js (Line 1:1 - Line 10:7), node_modules\@babel\runtime\helpers\esm\toSetter.js (Line 1:1 - Line 10:7)
function _toSetter(t, e, n) {
e || (e = []);
var r = e.length++;
return Object.defineProperty({}, "_", {
set: function set(o) {
e[r] = o, t.apply(n, e);
}
});
}
modulenode_modules\@babel\runtime\helpers\toPrimitive.js (Line 1:2 - Line 12:7), node_modules\@babel\runtime\helpers\esm\toPrimitive.js (Line 1:14 - Line 12:7)
;
function toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
modulenode_modules\@babel\runtime\helpers\taggedTemplateLiteral.js (Line 1:1 - Line 8:7), node_modules\@babel\runtime\helpers\esm\taggedTemplateLiteral.js (Line 1:1 - Line 8:7)
function _taggedTemplateLiteral(e, t) {
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
raw: {
value: Object.freeze(t)
}
}));
}
modulenode_modules\@babel\runtime\helpers\superPropGet.js (Line 2:2 - Line 9:7), node_modules\@babel\runtime\helpers\esm\superPropGet.js (Line 2:22 - Line 9:7)
;
function _superPropGet(t, o, e, r) {
var p = get(getPrototypeOf(1 & r ? t.prototype : t), o, e);
return 2 & r && "function" == typeof p ? function (t) {
return p.apply(e, t);
} : p;
}
modulenode_modules\@babel\runtime\helpers\setFunctionName.js (Line 1:2 - Line 12:7), node_modules\@babel\runtime\helpers\esm\setFunctionName.js (Line 1:14 - Line 12:7)
;
function setFunctionName(e, t, n) {
"symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : "");
try {
Object.defineProperty(e, "name", {
configurable: !0,
value: n ? n + " " + t : t
});
} catch (e) {}
return e;
}
modulenode_modules\@babel\runtime\helpers\set.js (Line 2:2 - Line 22:7), node_modules\@babel\runtime\helpers\esm\set.js (Line 2:22 - Line 22:7)
;
function set(e, r, t, o) {
return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) {
var f,
i = superPropBase(e, r);
if (i) {
if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0;
if (!f.writable) return !1;
}
if (f = Object.getOwnPropertyDescriptor(o, r)) {
if (!f.writable) return !1;
f.value = t, Object.defineProperty(o, r, f);
} else defineProperty(o, r, t);
return !0;
}, set(e, r, t, o);
}
function _set(e, r, t, o, f) {
if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property");
return t;
}
modulenode_modules\@babel\runtime\helpers\regeneratorValues.js (Line 1:2 - Line 19:7), node_modules\@babel\runtime\helpers\esm\regeneratorValues.js (Line 1:14 - Line 19:7)
;
function _regeneratorValues(e) {
if (null != e) {
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
r = 0;
if (t) return t.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) return {
next: function next() {
return e && r >= e.length && (e = void 0), {
value: e && e[r++],
done: !e
};
}
};
}
throw new TypeError(_typeof(e) + " is not iterable");
}
modulenode_modules\@babel\runtime\helpers\regeneratorRuntime.js (Line 7:2 - Line 58:7), node_modules\@babel\runtime\helpers\esm\regeneratorRuntime.js (Line 7:25 - Line 58:20)
;
function _regeneratorRuntime() {
"use strict";
var r = regenerator(),
e = r.m(_regeneratorRuntime),
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
function n(r) {
var e = "function" == typeof r && r.constructor;
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
}
var o = {
"throw": 1,
"return": 2,
"break": 3,
"continue": 3
};
function a(r) {
var e, t;
return function (n) {
e || (e = {
stop: function stop() {
return t(n.a, 2);
},
"catch": function _catch() {
return n.v;
},
abrupt: function abrupt(r, e) {
return t(n.a, o[r], e);
},
delegateYield: function delegateYield(r, o, a) {
return e.resultName = o, t(n.d, regeneratorValues(r), a);
},
finish: function finish(r) {
return t(n.f, r);
}
}, t = function t(r, _t, o) {
n.p = e.prev, n.n = e.next;
try {
return r(_t, o);
} finally {
e.next = n.n;
}
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
try {
return r.call(this, e);
} finally {
n.p = e.prev, n.n = e.next;
}
};
}
return (modulenode_modules\@babel\runtime\helpers\regeneratorRuntime.js (Line 58:2 - Line 75:2), node_modules\@babel\runtime\helpers\esm\regeneratorRuntime.js (Line 58:2 - Line 75:2)
_regeneratorRuntime = function _regeneratorRuntime() {
return {
wrap: function wrap(e, t, n, o) {
return r.w(a(e), t, n, o && o.reverse());
},
isGeneratorFunction: n,
mark: r.m,
awrap: function awrap(r, e) {
return new OverloadYield(r, e);
},
AsyncIterator: regeneratorAsyncIterator,
async: function async(r, e, t, o, u) {
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
},
keys: regeneratorKeys,
values: regeneratorValues
};
},node_modules\@babel\runtime\helpers\regeneratorKeys.js (Line 1:1 - Line 10:7), node_modules\@babel\runtime\helpers\esm\regeneratorKeys.js (Line 1:1 - Line 10:7)
function _regeneratorKeys(e) {
var n = Object(e),
r = [];
for (var t in n) r.unshift(t);
return function e() {
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
return e.done = !0, e;
};
}
modulenode_modules\@babel\runtime\helpers\regeneratorDefine.js (Line 8:2 - Line 20:7), node_modules\@babel\runtime\helpers\esm\regeneratorDefine.js (Line 8:3 - Line 20:19)
_regeneratorDefine = function regeneratorDefine(e, r, n, t) {
function o(r, n) {
_regeneratorDefine(e, r, function (e) {
return this._invoke(r, n, e);
});
}
r ? i ? i(e, r, {
value: n,
enumerable: !t,
configurable: !t,
writable: !t
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
}, modulenode_modules\@babel\runtime\helpers\regeneratorAsyncIterator.js (Line 2:2 - Line 33:7), node_modules\@babel\runtime\helpers\esm\regeneratorAsyncIterator.js (Line 2:25 - Line 33:7)
;
function AsyncIterator(t, e) {
function n(r, o, i, f) {
try {
var c = t[r](o),
u = c.value;
return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
n("next", t, i, f);
}, function (t) {
n("throw", t, i, f);
}) : e.resolve(u).then(function (t) {
c.value = t, i(c);
}, function (t) {
return n("throw", t, i, f);
});
} catch (t) {
f(t);
}
}
var r;
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
return this;
})), regeneratorDefine(this, "_invoke", function (t, o, i) {
function f() {
return new e(function (e, r) {
n(t, i, e, r);
});
}
return r = r ? r.then(f, f) : f();
}, !0);
}
modulenode_modules\@babel\runtime\helpers\regeneratorAsync.js (Line 1:2 - Line 8:7), node_modules\@babel\runtime\helpers\esm\regeneratorAsync.js (Line 1:27 - Line 8:7)
;
function _regeneratorAsync(n, e, r, t, o) {
var a = regeneratorAsyncGen(n, e, r, t, o);
return a.next().then(function (n) {
return n.done ? n.value : a.next();
});
}
modulenode_modules\@babel\runtime\helpers\regenerator.js (Line 1:2 - Line 82:7), node_modules\@babel\runtime\helpers\esm\regenerator.js (Line 1:25 - Line 82:13)
;
function _regenerator() {
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,
t,
r = "function" == typeof Symbol ? Symbol : {},
n = r.iterator || "@@iterator",
o = r.toStringTag || "@@toStringTag";
function i(r, n, o, i) {
var c = n && n.prototype instanceof Generator ? n : Generator,
u = Object.create(c.prototype);
return regeneratorDefine(u, "_invoke", function (r, n, o) {
var i,
c,
u,
f = 0,
p = o || [],
y = !1,
G = {
p: 0,
n: 0,
v: e,
a: d,
f: d.bind(e, 4),
d: function d(t, r) {
return i = t, c = 0, u = e, G.n = r, a;
}
};
function d(r, n) {
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
var o,
i = p[t],
d = G.p,
l = i[2];
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
}
if (o || r > 1) return a;
throw y = !0, n;
}
return function (o, p, l) {
if (f > 1) throw TypeError("Generator is already running");
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
try {
if (f = 2, i) {
if (c || (o = "next"), t = i[o]) {
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
if (!t.done) return t;
u = t.value, c < 2 && (c = 0);
} else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
i = e;
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
} catch (t) {
i = e, c = 1, u = t;
} finally {
f = 1;
}
}
return {
value: t,
done: y
};
};
}(r, o, i), !0), u;
}
var a = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
t = Object.getPrototypeOf;
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
return this;
}), t),
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
function f(e) {
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
}
return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
return this;
}), regeneratorDefine(u, "toString", function () {
return "[object Generator]";
}), (modulenode_modules\@babel\runtime\helpers\possibleConstructorReturn.js (Line 2:2 - Line 8:7), node_modules\@babel\runtime\helpers\esm\possibleConstructorReturn.js (Line 2:29 - Line 8:7)
;
function _possibleConstructorReturn(t, e) {
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
return assertThisInitialized(t);
}
modulenode_modules\@babel\runtime\helpers\objectWithoutPropertiesLoose.js (Line 1:1 - Line 10:7), node_modules\@babel\runtime\helpers\esm\objectWithoutPropertiesLoose.js (Line 1:1 - Line 10:7)
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
modulenode_modules\@babel\runtime\helpers\objectWithoutProperties.js (Line 1:2 - Line 13:7), node_modules\@babel\runtime\helpers\esm\objectWithoutProperties.js (Line 1:36 - Line 13:7)
;
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o,
r,
i = objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
modulenode_modules\@babel\runtime\helpers\objectSpread2.js (Line 1:22 - Line 23:7), node_modules\eslint-plugin-jsx-a11y\lib\rules\mouse-events-have-key-events.js (Line 9:18 - Line 23:7)
);
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
modulenode_modules\@babel\runtime\helpers\objectSpread.js (Line 1:2 - Line 14:7), node_modules\@babel\runtime\helpers\esm\objectSpread.js (Line 1:22 - Line 14:7)
;
function _objectSpread(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? Object(arguments[r]) : {},
o = Object.keys(t);
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) {
return Object.getOwnPropertyDescriptor(t, e).enumerable;
})), o.forEach(function (r) {
defineProperty(e, r, t[r]);
});
}
return e;
}
modulenode_modules\@babel\runtime\helpers\maybeArrayLike.js (Line 1:2 - Line 9:7), node_modules\@babel\runtime\helpers\esm\maybeArrayLike.js (Line 1:24 - Line 9:7)
;
function _maybeArrayLike(r, a, e) {
if (a && !Array.isArray(a) && "number" == typeof a.length) {
var y = a.length;
return arrayLikeToArray(a, void 0 !== e && e < y ? e : y);
}
return r(a, e);
}
modulenode_modules\@babel\runtime\helpers\jsx.js (Line 1:1 - Line 22:7), node_modules\@babel\runtime\helpers\esm\jsx.js (Line 1:1 - Line 22:7)
var REACT_ELEMENT_TYPE;
function _createRawReactElement(e, r, E, l) {
REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103);
var o = e && e.defaultProps,
n = arguments.length - 3;
if (r || 0 === n || (r = {
children: void 0
}), 1 === n) r.children = l;else if (n > 1) {
for (var t = Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3];
r.children = t;
}
if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {});
return {
$$typeof: REACT_ELEMENT_TYPE,
type: e,
key: void 0 === E ? null : "" + E,
ref: null,
props: r,
_owner: null
};
}
modulenode_modules\@babel\runtime\helpers\iterableToArrayLimit.js (Line 1:1 - Line 28:7), node_modules\@babel\runtime\helpers\esm\iterableToArrayLimit.js (Line 1:1 - Line 28:7)
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
modulenode_modules\@babel\runtime\helpers\interopRequireWildcard.js (Line 5:2 - Line 20:2), node_modules\@babel\runtime\helpers\esm\interopRequireWildcard.js (Line 5:2 - Line 20:2)
_interopRequireWildcard = function _interopRequireWildcard(e, t) {
if (!t && e && e.__esModule) return e;
var o,
i,
f = {
__proto__: null,
"default": e
};
if (null === e || "object" != _typeof(e) && "function" != typeof e) return f;
if (o = t ? n : r) {
if (o.has(e)) return o.get(e);
o.set(e, f);
}
for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]);
return f;
},node_modules\@babel\runtime\helpers\initializerDefineProperty.js (Line 1:1 - Line 9:7), node_modules\@babel\runtime\helpers\esm\initializerDefineProperty.js (Line 1:1 - Line 9:7)
function _initializerDefineProperty(e, i, r, l) {
r && Object.defineProperty(e, i, {
enumerable: r.enumerable,
configurable: r.configurable,
writable: r.writable,
value: r.initializer ? r.initializer.call(l) : void 0
});
}
modulenode_modules\@babel\runtime\helpers\inherits.js (Line 1:2 - Line 14:7), node_modules\@babel\runtime\helpers\esm\inherits.js (Line 1:22 - Line 14:7)
;
function _inherits(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}), Object.defineProperty(t, "prototype", {
writable: !1
}), e && setPrototypeOf(t, e);
}
modulenode_modules\@babel\runtime\helpers\importDeferProxy.js (Line 1:1 - Line 27:7), node_modules\@babel\runtime\helpers\esm\importDeferProxy.js (Line 1:1 - Line 27:7)
function _importDeferProxy(e) {
var t = null,
constValue = function constValue(e) {
return function () {
return e;
};
},
proxy = function proxy(r) {
return function (n, o, f) {
return null === t && (t = e()), r(t, o, f);
};
};
return new Proxy({}, {
defineProperty: constValue(!1),
deleteProperty: constValue(!1),
get: proxy(Reflect.get),
getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),
getPrototypeOf: constValue(null),
isExtensible: constValue(!1),
has: proxy(Reflect.has),
ownKeys: proxy(Reflect.ownKeys),
preventExtensions: constValue(!0),
set: constValue(!1),
setPrototypeOf: constValue(!1)
});
}
modulenode_modules\@babel\runtime\helpers\get.js (Line 3:2 - Line 9:7), node_modules\@babel\runtime\helpers\esm\get.js (Line 3:2 - Line 9:5)
_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
var p = superPropBase(e, t);
if (p) {
var n = Object.getOwnPropertyDescriptor(p, t);
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
}
}, modulenode_modules\@babel\runtime\helpers\extends.js (Line 2:2 - Line 8:7), node_modules\@babel\runtime\helpers\esm\extends.js (Line 2:2 - Line 8:9)
_extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, modulenode_modules\@babel\runtime\helpers\dispose.js (Line 1:1 - Line 28:7), node_modules\@babel\runtime\helpers\esm\dispose.js (Line 1:1 - Line 28:7)
function dispose_SuppressedError(r, e) {
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) {
this.suppressed = e, this.error = r, this.stack = Error().stack;
}, dispose_SuppressedError.prototype = Object.create(Error.prototype, {
constructor: {
value: dispose_SuppressedError,
writable: !0,
configurable: !0
}
})), new dispose_SuppressedError(r, e);
}
function _dispose(r, e, s) {
function next() {
for (; r.length > 0;) try {
var o = r.pop(),
p = o.d.call(o.v);
if (o.a) return Promise.resolve(p).then(next, err);
} catch (r) {
return err(r);
}
if (s) throw e;
}
function err(r) {
return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next();
}
return next();
}
modulenode_modules\@babel\runtime\helpers\defineProperty.js (Line 1:2 - Line 10:7), node_modules\@babel\runtime\helpers\esm\defineProperty.js (Line 1:21 - Line 10:7)
;
function _defineProperty(e, r, t) {
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
modulenode_modules\@babel\runtime\helpers\defineEnumerableProperties.js (Line 1:1 - Line 12:7), node_modules\@babel\runtime\helpers\esm\defineEnumerableProperties.js (Line 1:1 - Line 12:7)
function _defineEnumerableProperties(e, r) {
for (var t in r) {
var n = r[t];
n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n);
}
if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) {
var i = a[b];
(n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n);
}
return e;
}
modulenode_modules\@babel\runtime\helpers\defaults.js (Line 1:1 - Line 9:7), node_modules\@babel\runtime\helpers\esm\defaults.js (Line 1:1 - Line 9:7)
function _defaults(e, r) {
for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) {
var n = t[o],
a = Object.getOwnPropertyDescriptor(r, n);
a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a);
}
return e;
}
modulenode_modules\@babel\runtime\helpers\decorate.js (Line 2:2 - Line 250:7), node_modules\@babel\runtime\helpers\esm\decorate.js (Line 2:21 - Line 250:7)
;
function _decorate(e, r, t, i) {
var o = _getDecoratorsApi();
if (i) for (var n = 0; n < i.length; n++) o = i[n](o);
var s = r(function (e) {
o.initializeInstanceElements(e, a.elements);
}, t),
a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e);
return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers);
}
function _getDecoratorsApi() {
_getDecoratorsApi = function _getDecoratorsApi() {
return e;
};
var e = {
elementsDefinitionOrder: [["method"], ["field"]],
initializeInstanceElements: function initializeInstanceElements(e, r) {
["method", "field"].forEach(function (t) {
r.forEach(function (r) {
r.kind === t && "own" === r.placement && this.defineClassElement(e, r);
}, this);
}, this);
},
initializeClassElements: function initializeClassElements(e, r) {
var t = e.prototype;
["method", "field"].forEach(function (i) {
r.forEach(function (r) {
var o = r.placement;
if (r.kind === i && ("static" === o || "prototype" === o)) {
var n = "static" === o ? e : t;
this.defineClassElement(n, r);
}
}, this);
}, this);
},
defineClassElement: function defineClassElement(e, r) {
var t = r.descriptor;
if ("field" === r.kind) {
var i = r.initializer;
t = {
enumerable: t.enumerable,
writable: t.writable,
configurable: t.configurable,
value: void 0 === i ? void 0 : i.call(e)
};
}
Object.defineProperty(e, r.key, t);
},
decorateClass: function decorateClass(e, r) {
var t = [],
i = [],
o = {
"static": [],
prototype: [],
own: []
};
if (e.forEach(function (e) {
this.addElementPlacement(e, o);
}, this), e.forEach(function (e) {
if (!_hasDecorators(e)) return t.push(e);
var r = this.decorateElement(e, o);
t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers);
}, this), !r) return {
elements: t,
finishers: i
};
var n = this.decorateConstructor(t, r);
return i.push.apply(i, n.finishers), n.finishers = i, n;
},
addElementPlacement: function addElementPlacement(e, r, t) {
var i = r[e.placement];
if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")");
i.push(e.key);
},
decorateElement: function decorateElement(e, r) {
for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) {
var s = r[e.placement];
s.splice(s.indexOf(e.key), 1);
var a = this.fromElementDescriptor(e),
l = this.toElementFinisherExtras((0, o[n])(a) || a);
e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher);
var c = l.extras;
if (c) {
for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r);
t.push.apply(t, c);
}
}
return {
element: e,
finishers: i,
extras: t
};
},
decorateConstructor: function decorateConstructor(e, r) {
for (var t = [], i = r.length - 1; i >= 0; i--) {
var o = this.fromClassDescriptor(e),
n = this.toClassDescriptor((0, r[i])(o) || o);
if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) {
e = n.elements;
for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")");
}
}
return {
elements: e,
finishers: t
};
},
fromElementDescriptor: function fromElementDescriptor(e) {
var r = {
kind: e.kind,
key: e.key,
placement: e.placement,
descriptor: e.descriptor
};
return Object.defineProperty(r, Symbol.toStringTag, {
value: "Descriptor",
configurable: !0
}), "field" === e.kind && (r.initializer = e.initializer), r;
},
toElementDescriptors: function toElementDescriptors(e) {
if (void 0 !== e) return toArray(e).map(function (e) {
var r = this.toElementDescriptor(e);
return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r;
}, this);
},
toElementDescriptor: function toElementDescriptor(e) {
var r = e.kind + "";
if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"');
var t = toPropertyKey(e.key),
i = e.placement + "";
if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"');
var o = e.descriptor;
this.disallowProperty(e, "elements", "An element descriptor");
var n = {
kind: r,
key: t,
placement: i,
descriptor: Object.assign({}, o)
};
return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n;
},
toElementFinisherExtras: function toElementFinisherExtras(e) {
return {
element: this.toElementDescriptor(e),
finisher: _optionalCallableProperty(e, "finisher"),
extras: this.toElementDescriptors(e.extras)
};
},
fromClassDescriptor: function fromClassDescriptor(e) {
var r = {
kind: "class",
elements: e.map(this.fromElementDescriptor, this)
};
return Object.defineProperty(r, Symbol.toStringTag, {
value: "Descriptor",
configurable: !0
}), r;
},
toClassDescriptor: function toClassDescriptor(e) {
var r = e.kind + "";
if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"');
this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor");
var t = _optionalCallableProperty(e, "finisher");
return {
elements: this.toElementDescriptors(e.elements),
finisher: t
};
},
runClassFinishers: function runClassFinishers(e, r) {
for (var t = 0; t < r.length; t++) {
var i = (0, r[t])(e);
if (void 0 !== i) {
if ("function" != typeof i) throw new TypeError("Finishers must return a constructor.");
e = i;
}
}
return e;
},
disallowProperty: function disallowProperty(e, r, t) {
if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property.");
}
};
return e;
}
function _createElementDescriptor(e) {
var r,
t = toPropertyKey(e.key);
"method" === e.kind ? r = {
value: e.value,
writable: !0,
configurable: !0,
enumerable: !1
} : "get" === e.kind ? r = {
get: e.value,
configurable: !0,
enumerable: !1
} : "set" === e.kind ? r = {
set: e.value,
configurable: !0,
enumerable: !1
} : "field" === e.kind && (r = {
configurable: !0,
writable: !0,
enumerable: !0
});
var i = {
kind: "field" === e.kind ? "field" : "method",
key: t,
placement: e["static"] ? "static" : "field" === e.kind ? "own" : "prototype",
descriptor: r
};
return e.decorators && (i.decorators = e.decorators), "field" === e.kind && (i.initializer = e.value), i;
}
function _coalesceGetterSetter(e, r) {
void 0 !== e.descriptor.get ? r.descriptor.get = e.descriptor.get : r.descriptor.set = e.descriptor.set;
}
function _coalesceClassElements(e) {
for (var r = [], isSameElement = function isSameElement(e) {
return "method" === e.kind && e.key === o.key && e.placement === o.placement;
}, t = 0; t < e.length; t++) {
var i,
o = e[t];
if ("method" === o.kind && (i = r.find(isSameElement))) {
if (_isDataDescriptor(o.descriptor) || _isDataDescriptor(i.descriptor)) {
if (_hasDecorators(o) || _hasDecorators(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated.");
i.descriptor = o.descriptor;
} else {
if (_hasDecorators(o)) {
if (_hasDecorators(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ").");
i.decorators = o.decorators;
}
_coalesceGetterSetter(o, i);
}
} else r.push(o);
}
return r;
}
function _hasDecorators(e) {
return e.decorators && e.decorators.length;
}
function _isDataDescriptor(e) {
return void 0 !== e && !(void 0 === e.value && void 0 === e.writable);
}
function _optionalCallableProperty(e, r) {
var t = e[r];
if (void 0 !== t && "function" != typeof t) throw new TypeError("Expected '" + r + "' to be a function");
return t;
}
modulenode_modules\@babel\runtime\helpers\createSuper.js (Line 3:2 - Line 16:7), node_modules\@babel\runtime\helpers\esm\createSuper.js (Line 3:33 - Line 16:7)
;
function _createSuper(t) {
var r = isNativeReflectConstruct();
return function () {
var e,
o = getPrototypeOf(t);
if (r) {
var s = getPrototypeOf(this).constructor;
e = Reflect.construct(o, arguments, s);
} else e = o.apply(this, arguments);
return possibleConstructorReturn(this, e);
};
}
modulenode_modules\@babel\runtime\helpers\createForOfIteratorHelperLoose.js (Line 1:2 - Line 19:7), node_modules\@babel\runtime\helpers\esm\createForOfIteratorHelperLoose.js (Line 1:34 - Line 19:7)
;
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
modulenode_modules\@babel\runtime\helpers\createForOfIteratorHelper.js (Line 1:2 - Line 50:7), node_modules\@babel\runtime\helpers\esm\createForOfIteratorHelper.js (Line 1:34 - Line 50:7)
;
function _createForOfIteratorHelper(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (!t) {
if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
t && (r = t);
var _n = 0,
F = function F() {};
return {
s: F,
n: function n() {
return _n >= r.length ? {
done: !0
} : {
done: !1,
value: r[_n++]
};
},
e: function e(r) {
throw r;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var o,
a = !0,
u = !1;
return {
s: function s() {
t = t.call(r);
},
n: function n() {
var r = t.next();
return a = r.done, r;
},
e: function e(r) {
u = !0, o = r;
},
f: function f() {
try {
a || null == t["return"] || t["return"]();
} finally {
if (u) throw o;
}
}
};
}
modulenode_modules\@babel\runtime\helpers\createClass.js (Line 1:2 - Line 13:7), node_modules\@babel\runtime\helpers\esm\createClass.js (Line 1:21 - Line 13:7)
;
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
modulenode_modules\@babel\runtime\helpers\construct.js (Line 2:2 - Line 10:7), node_modules\@babel\runtime\helpers\esm\construct.js (Line 2:22 - Line 10:7)
;
function _construct(t, e, r) {
if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
var o = [null];
o.push.apply(o, e);
var p = new (t.bind.apply(t, o))();
return r && setPrototypeOf(p, r.prototype), p;
}
modulenode_modules\@babel\runtime\helpers\classApplyDescriptorSet.js (Line 1:1 - Line 7:7), node_modules\@babel\runtime\helpers\esm\classApplyDescriptorSet.js (Line 1:1 - Line 7:7)
function _classApplyDescriptorSet(e, t, l) {
if (t.set) t.set.call(e, l);else {
if (!t.writable) throw new TypeError("attempted to set read only private field");
t.value = l;
}
}
modulenode_modules\@babel\runtime\helpers\classApplyDescriptorDestructureSet.js (Line 1:1 - Line 10:7), node_modules\@babel\runtime\helpers\esm\classApplyDescriptorDestructureSet.js (Line 1:1 - Line 10:7)
function _classApplyDescriptorDestructureSet(e, t) {
if (t.set) return "__destrObj" in t || (t.__destrObj = {
set value(r) {
t.set.call(e, r);
}
}), t.__destrObj;
if (!t.writable) throw new TypeError("attempted to set read only private field");
return t;
}
modulenode_modules\@babel\runtime\helpers\asyncToGenerator.js (Line 1:1 - Line 26:7), node_modules\@babel\core\lib\config\files\module-types.js (Line 41:1 - Line 43:6)
function asyncGeneratorStep(n, t, e, r, o, a, c) {
try {
var i = n[a](c),
u = i.value;
} catch (n) {
return void e(n);
}
i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
return function () {
var t = this,
e = arguments;
return new Promise(function (r, o) {
var a = n.apply(t, e);
function _next(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
}
function _throw(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
}
_next(void 0);
});
};
}
modulenode_modules\@babel\runtime\helpers\asyncIterator.js (Line 1:1 - Line 45:7), node_modules\@babel\runtime\helpers\esm\asyncIterator.js (Line 1:1 - Line 45:7)
function _asyncIterator(r) {
var n,
t,
o,
e = 2;
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
if (t && null != (n = r[t])) return n.call(r);
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
t = "@@asyncIterator", o = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(r) {
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
var n = r.done;
return Promise.resolve(r.value).then(function (r) {
return {
value: r,
done: n
};
});
}
return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {
this.s = r, this.n = r.next;
}, AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function next() {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
"return": function _return(r) {
var n = this.s["return"];
return void 0 === n ? Promise.resolve({
value: r,
done: !0
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
},
"throw": function _throw(r) {
var n = this.s["return"];
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
}
}, new AsyncFromSyncIterator(r);
}
modulenode_modules\@babel\runtime\helpers\asyncGeneratorDelegate.js (Line 1:2 - Line 24:7), node_modules\@babel\runtime\helpers\esm\asyncGeneratorDelegate.js (Line 1:21 - Line 24:7)
;
function _asyncGeneratorDelegate(t) {
var e = {},
n = !1;
function pump(e, r) {
return n = !0, r = new Promise(function (n) {
n(t[e](r));
}), {
done: !1,
value: new OverloadYield(r, 1)
};
}
return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
return this;
}, e.next = function (t) {
return n ? (n = !1, t) : pump("next", t);
}, "function" == typeof t["throw"] && (e["throw"] = function (t) {
if (n) throw n = !1, t;
return pump("throw", t);
}), "function" == typeof t["return"] && (e["return"] = function (t) {
return n ? (n = !1, t) : pump("return", t);
}), e;
}
modulenode_modules\@babel\runtime\helpers\arrayLikeToArray.js (Line 1:1 - Line 6:7), node_modules\@babel\runtime\helpers\esm\arrayLikeToArray.js (Line 1:1 - Line 6:7)
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
modulenode_modules\@babel\runtime\helpers\applyDecs2311.js (Line 4:2 - Line 124:7), node_modules\@babel\runtime\helpers\esm\applyDecs2311.js (Line 4:21 - Line 124:7)
;
function applyDecs2311(e, t, n, r, o, i) {
var a,
c,
u,
s,
f,
l,
p,
d = Symbol.metadata || Symbol["for"]("Symbol.metadata"),
m = Object.defineProperty,
h = Object.create,
y = [h(null), h(null)],
v = t.length;
function g(t, n, r) {
return function (o, i) {
n && (i = o, o = e);
for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []);
return r ? i : o;
};
}
function b(e, t, n, r) {
if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
return e;
}
function applyDec(e, t, n, r, o, i, u, s, f, l, p) {
function d(e) {
if (!p(e)) throw new TypeError("Attempted to access private element on non-instance");
}
var h = [].concat(t[0]),
v = t[3],
w = !u,
D = 1 === o,
S = 3 === o,
j = 4 === o,
E = 2 === o;
function I(t, n, r) {
return function (o, i) {
return n && (i = o, o = e), r && r(o), P[t].call(o, i);
};
}
if (!w) {
var P = {},
k = [],
F = S ? "get" : j || D ? "set" : "value";
if (f ? (l || D ? P = {
get: setFunctionName(function () {
return v(this);
}, r, "get"),
set: function set(e) {
t[4](this, e);
}
} : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) {
if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet");
y[+s][r] = o < 3 ? 1 : o;
}
}
for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) {
var T = b(h[O], "A decorator", "be", !0),
z = n ? h[O - 1] : void 0,
A = {},
H = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][o],
name: r,
metadata: a,
addInitializer: function (e, t) {
if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished");
b(t, "An initializer", "be", !0), i.push(t);
}.bind(null, A)
};
if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = {
has: f ? p.bind() : function (e) {
return r in e;
}
}, j || (c.get = f ? E ? function (e) {
return d(e), P.value;
} : I("get", 0, d) : function (e) {
return e[r];
}), E || S || (c.set = f ? I("set", 0, d) : function (e, t) {
e[r] = t;
}), N = T.call(z, D ? {
get: P.get,
set: P.set
} : P[F], H), A.v = 1, D) {
if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
} else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N);
}
return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N;
}
function w(e) {
return m(e, d, {
configurable: !0,
enumerable: !0,
value: a
});
}
return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) {
e && f.push(g(e));
}, p = function p(t, r) {
for (var i = 0; i < n.length; i++) {
var a = n[i],
c = a[1],
l = 7 & c;
if ((8 & c) == t && !l == r) {
var p = a[2],
d = !!a[3],
m = 16 & c;
applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) {
return checkInRHS(t) === e;
} : o);
}
}
}, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), {
e: c,
get c() {
var n = [];
return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)];
}
};
}
modulenode_modules\@babel\runtime\helpers\applyDecs2305.js (Line 4:2 - Line 133:7), node_modules\@babel\runtime\helpers\esm\applyDecs2305.js (Line 4:21 - Line 133:7)
;
function applyDecs2305(e, t, r, n, o, a) {
function i(e, t, r) {
return function (n, o) {
return r && r(n), e[t].call(n, o);
};
}
function c(e, t) {
for (var r = 0; r < e.length; r++) e[r].call(t);
return t;
}
function s(e, t, r, n) {
if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined"));
return e;
}
function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) {
function m(e) {
if (!h(e)) throw new TypeError("Attempted to access private element on non-instance");
}
var y,
v = t[0],
g = t[3],
b = !u;
if (!b) {
r || Array.isArray(v) || (v = [v]);
var w = {},
S = [],
A = 3 === o ? "get" : 4 === o || d ? "set" : "value";
f ? (p || d ? w = {
get: setFunctionName(function () {
return g(this);
}, n, "get"),
set: function set(e) {
t[4](this, e);
}
} : w[A] = g, p || setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n));
}
for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) {
var D = v[j],
E = r ? v[j - 1] : void 0,
I = {},
O = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][o],
name: n,
metadata: a,
addInitializer: function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
s(t, "An initializer", "be", !0), c.push(t);
}.bind(null, I)
};
try {
if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else {
var k, F;
O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) {
return m(e), w.value;
} : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) {
return e[n];
}, (o < 2 || 4 === o) && (F = function F(e, t) {
e[n] = t;
}));
var N = O.access = {
has: f ? h.bind() : function (e) {
return n in e;
}
};
if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? {
get: w.get,
set: w.set
} : w[A], O), d) {
if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
} else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P);
}
} finally {
I.v = !0;
}
}
return (p || d) && u.push(function (e, t) {
for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t);
return t;
}), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P;
}
function u(e, t) {
return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), {
configurable: !0,
enumerable: !0,
value: t
});
}
if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")];
var f = Object.create(null == l ? null : l),
p = function (e, t, r, n) {
var o,
a,
i = [],
s = function s(t) {
return checkInRHS(t) === e;
},
u = new Map();
function l(e) {
e && i.push(c.bind(null, e));
}
for (var f = 0; f < t.length; f++) {
var p = t[f];
if (Array.isArray(p)) {
var d = p[1],
h = p[2],
m = p.length > 3,
y = 16 & d,
v = !!(8 & d),
g = 0 == (d &= 7),
b = h + "/" + v;
if (!g && !m) {
var w = u.get(b);
if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
u.set(b, !(d > 2) || d);
}
applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r);
}
}
return l(o), l(a), i;
}(e, t, o, f);
return r.length || u(e, f), {
e: p,
get c() {
var t = [];
return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)];
}
};
}
modulenode_modules\@babel\runtime\helpers\applyDecs2301.js (Line 4:2 - Line 220:7), node_modules\@babel\runtime\helpers\esm\applyDecs2301.js (Line 4:21 - Line 220:14)
;
function applyDecs2301Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function assertInstanceIfPrivate(e, t) {
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance");
}
function memberDec(e, t, r, n, a, i, s, o, c) {
var u;
switch (a) {
case 1:
u = "accessor";
break;
case 2:
u = "method";
break;
case 3:
u = "getter";
break;
case 4:
u = "setter";
break;
default:
u = "field";
}
var l,
f,
p = {
kind: u,
name: s ? "#" + t : toPropertyKey(t),
"static": i,
"private": s
},
d = {
v: !1
};
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) {
if (2 === a) l = function l(e) {
return assertInstanceIfPrivate(c, e), r.value;
};else {
var h = 0 === a || 1 === a;
(h || 3 === a) && (l = s ? function (e) {
return assertInstanceIfPrivate(c, e), r.get.call(e);
} : function (e) {
return r.get.call(e);
}), (h || 4 === a) && (f = s ? function (e, t) {
assertInstanceIfPrivate(c, e), r.set.call(e, t);
} : function (e, t) {
r.set.call(e, t);
});
}
} else l = function l(e) {
return e[t];
}, 0 === a && (f = function f(e, r) {
e[t] = r;
});
var v = s ? c.bind() : function (e) {
return t in e;
};
p.access = l && f ? {
get: l,
set: f,
has: v
} : l ? {
get: l,
has: v
} : {
set: f,
has: v
};
try {
return e(o, p);
} finally {
d.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function curryThis2(e) {
return function (t) {
e(this, t);
};
}
function applyMemberDec(e, t, r, n, a, i, s, o, c) {
var u,
l,
f,
p,
d,
h,
v,
y,
g = r[0];
if (s ? (0 === a || 1 === a ? (u = {
get: (d = r[3], function () {
return d(this);
}),
set: curryThis2(r[4])
}, f = "get") : 3 === a ? (u = {
get: r[3]
}, f = "get") : 4 === a ? (u = {
set: r[3]
}, f = "set") : u = {
value: r[3]
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = {
get: u.get,
set: u.set
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) {
var b;
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var I = l;
l = function l(e, t) {
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r);
return r;
};
} else {
var w = l;
l = function l(e, t) {
return w.call(e, t);
};
}
e.push(l);
}
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) {
return p.get.call(e, t);
}), e.push(function (e, t) {
return p.set.call(e, t);
})) : 2 === a ? e.push(p) : e.push(function (e, t) {
return p.call(e, t);
}) : Object.defineProperty(t, n, u));
}
function applyMemberDecs(e, t, r) {
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) {
var l = t[u];
if (Array.isArray(l)) {
var f,
p,
d = l[1],
h = l[2],
v = l.length > 3,
y = d >= 5,
g = r;
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) {
return checkInRHS(t) === e;
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) {
var m = y ? c : o,
b = m.get(h) || 0;
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
!b && d > 2 ? m.set(h, d) : m.set(h, !0);
}
applyMemberDec(s, f, l, h, d, y, v, p, g);
}
}
return pushInitializers(s, n), pushInitializers(s, a), s;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r, n) {
return {
e: applyMemberDecs(e, t, n),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var s = {
v: !1
};
try {
var o = t[i](n, {
kind: "class",
name: a,
addInitializer: createAddInitializerMethod(r, s)
});
} finally {
s.v = !0;
}
void 0 !== o && (assertValidReturnValue(10, o), n = o);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2301(e, t, r, n) {
return (modulenode_modules\@babel\runtime\helpers\applyDecs2203R.js (Line 3:2 - Line 189:7), node_modules\@babel\runtime\helpers\esm\applyDecs2203R.js (Line 3:21 - Line 189:15)
;
function applyDecs2203RFactory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function memberDec(e, t, r, n, a, i, o, s) {
var c;
switch (a) {
case 1:
c = "accessor";
break;
case 2:
c = "method";
break;
case 3:
c = "getter";
break;
case 4:
c = "setter";
break;
default:
c = "field";
}
var l,
u,
f = {
kind: c,
name: o ? "#" + t : toPropertyKey(t),
"static": i,
"private": o
},
p = {
v: !1
};
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() {
return this[t];
}, u = function u(e) {
this[t] = e;
}) : 2 === a ? l = function l() {
return r.value;
} : (1 !== a && 3 !== a || (l = function l() {
return r.get.call(this);
}), 1 !== a && 4 !== a || (u = function u(e) {
r.set.call(this, e);
})), f.access = l && u ? {
get: l,
set: u
} : l ? {
get: l
} : {
set: u
};
try {
return e(s, f);
} finally {
p.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function applyMemberDec(e, t, r, n, a, i, o, s) {
var c,
l,
u,
f,
p,
d,
h,
v = r[0];
if (o ? (0 === a || 1 === a ? (c = {
get: r[3],
set: r[4]
}, u = "get") : 3 === a ? (c = {
get: r[3]
}, u = "get") : 4 === a ? (c = {
set: r[3]
}, u = "set") : c = {
value: r[3]
}, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = {
get: c.get,
set: c.set
} : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = {
get: d,
set: h
}) : f = p);else for (var g = v.length - 1; g >= 0; g--) {
var y;
void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = {
get: d,
set: h
}) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var m = l;
l = function l(e, t) {
for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r);
return r;
};
} else {
var b = l;
l = function l(e, t) {
return b.call(e, t);
};
}
e.push(l);
}
0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) {
return f.get.call(e, t);
}), e.push(function (e, t) {
return f.set.call(e, t);
})) : 2 === a ? e.push(f) : e.push(function (e, t) {
return f.call(e, t);
}) : Object.defineProperty(t, n, c));
}
function applyMemberDecs(e, t) {
for (var r, n, a = [], i = new Map(), o = new Map(), s = 0; s < t.length; s++) {
var c = t[s];
if (Array.isArray(c)) {
var l,
u,
f = c[1],
p = c[2],
d = c.length > 3,
h = f >= 5;
if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) {
var v = h ? o : i,
g = v.get(p) || 0;
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p);
!g && f > 2 ? v.set(p, f) : v.set(p, !0);
}
applyMemberDec(a, l, c, p, f, h, d, u);
}
}
return pushInitializers(a, r), pushInitializers(a, n), a;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r) {
return {
e: applyMemberDecs(e, t),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var o = {
v: !1
};
try {
var s = t[i](n, {
kind: "class",
name: a,
addInitializer: createAddInitializerMethod(r, o)
});
} finally {
o.v = !0;
}
void 0 !== s && (assertValidReturnValue(10, s), n = s);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2203R(e, t, r) {
return (modulenode_modules\@babel\runtime\helpers\applyDecs2203.js (Line 1:2 - Line 184:7), node_modules\@babel\runtime\helpers\esm\applyDecs2203.js (Line 1:14 - Line 184:7)
;
function applyDecs2203Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e, t) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function memberDec(e, t, r, a, n, i, s, o) {
var c;
switch (n) {
case 1:
c = "accessor";
break;
case 2:
c = "method";
break;
case 3:
c = "getter";
break;
case 4:
c = "setter";
break;
default:
c = "field";
}
var l,
u,
f = {
kind: c,
name: s ? "#" + t : t,
"static": i,
"private": s
},
p = {
v: !1
};
0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() {
return this[t];
}, u = function u(e) {
this[t] = e;
}) : 2 === n ? l = function l() {
return r.value;
} : (1 !== n && 3 !== n || (l = function l() {
return r.get.call(this);
}), 1 !== n && 4 !== n || (u = function u(e) {
r.set.call(this, e);
})), f.access = l && u ? {
get: l,
set: u
} : l ? {
get: l
} : {
set: u
};
try {
return e(o, f);
} finally {
p.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function applyMemberDec(e, t, r, a, n, i, s, o) {
var c,
l,
u,
f,
p,
d,
h = r[0];
if (s ? c = 0 === n || 1 === n ? {
get: r[3],
set: r[4]
} : 3 === n ? {
get: r[3]
} : 4 === n ? {
set: r[3]
} : {
value: r[3]
} : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = {
get: c.get,
set: c.set
} : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = {
get: p,
set: d
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) {
var g;
void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = {
get: p,
set: d
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)));
}
if (0 === n || 1 === n) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var y = l;
l = function l(e, t) {
for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r);
return r;
};
} else {
var m = l;
l = function l(e, t) {
return m.call(e, t);
};
}
e.push(l);
}
0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) {
return u.get.call(e, t);
}), e.push(function (e, t) {
return u.set.call(e, t);
})) : 2 === n ? e.push(u) : e.push(function (e, t) {
return u.call(e, t);
}) : Object.defineProperty(t, a, c));
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r) {
var a = [];
return function (e, t, r) {
for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) {
var c = r[o];
if (Array.isArray(c)) {
var l,
u,
f = c[1],
p = c[2],
d = c.length > 3,
h = f >= 5;
if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) {
var v = h ? s : i,
g = v.get(p) || 0;
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p);
!g && f > 2 ? v.set(p, f) : v.set(p, !0);
}
applyMemberDec(e, l, c, p, f, h, d, u);
}
}
pushInitializers(e, a), pushInitializers(e, n);
}(a, e, t), function (e, t, r) {
if (r.length > 0) {
for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) {
var o = {
v: !1
};
try {
var c = r[s](n, {
kind: "class",
name: i,
addInitializer: createAddInitializerMethod(a, o)
});
} finally {
o.v = !0;
}
void 0 !== c && (assertValidReturnValue(10, c), n = c);
}
e.push(n, function () {
for (var e = 0; e < a.length; e++) a[e].call(n);
});
}
}(a, e, r), a;
};
}
var applyDecs2203Impl;
function applyDecs2203(e, t, r) {
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r);
}
modulenode_modules\@babel\runtime\helpers\applyDecs.js (Line 3:2 - Line 236:7), node_modules\@babel\runtime\helpers\esm\applyDecs.js (Line 3:21 - Line 236:7)
;
function old_createMetadataMethodsForProperty(e, t, a, r) {
return {
getMetadata: function getMetadata(o) {
old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o);
var i = e[o];
if (void 0 !== i) if (1 === t) {
var n = i["public"];
if (void 0 !== n) return n[a];
} else if (2 === t) {
var l = i["private"];
if (void 0 !== l) return l.get(a);
} else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor;
},
setMetadata: function setMetadata(o, i) {
old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o);
var n = e[o];
if (void 0 === n && (n = e[o] = {}), 1 === t) {
var l = n["public"];
void 0 === l && (l = n["public"] = {}), l[a] = i;
} else if (2 === t) {
var s = n.priv;
void 0 === s && (s = n["private"] = new Map()), s.set(a, i);
} else n.constructor = i;
}
};
}
function old_convertMetadataMapToFinal(e, t) {
var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")],
r = Object.getOwnPropertySymbols(t);
if (0 !== r.length) {
for (var o = 0; o < r.length; o++) {
var i = r[o],
n = t[i],
l = a ? a[i] : null,
s = n["public"],
c = l ? l["public"] : null;
s && c && Object.setPrototypeOf(s, c);
var d = n["private"];
if (d) {
var u = Array.from(d.values()),
f = l ? l["private"] : null;
f && (u = u.concat(f)), n["private"] = u;
}
l && Object.setPrototypeOf(n, l);
}
a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t;
}
}
function old_createAddInitializerMethod(e, t) {
return function (a) {
old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a);
};
}
function old_memberDec(e, t, a, r, o, i, n, l, s) {
var c;
switch (i) {
case 1:
c = "accessor";
break;
case 2:
c = "method";
break;
case 3:
c = "getter";
break;
case 4:
c = "setter";
break;
default:
c = "field";
}
var d,
u,
f = {
kind: c,
name: l ? "#" + t : toPropertyKey(t),
isStatic: n,
isPrivate: l
},
p = {
v: !1
};
if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) {
d = 2, u = Symbol(t);
var v = {};
0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () {
return a.value;
} : (1 !== i && 3 !== i || (v.get = function () {
return a.get.call(this);
}), 1 !== i && 4 !== i || (v.set = function (e) {
a.set.call(this, e);
})), f.access = v;
} else d = 1, u = t;
try {
return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p)));
} finally {
p.v = !0;
}
}
function old_assertNotFinished(e, t) {
if (e.v) throw Error("attempted to call " + t + " after decoration was finished");
}
function old_assertMetadataKey(e) {
if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e);
}
function old_assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function old_assertValidReturnValue(e, t) {
var a = _typeof(t);
if (1 === e) {
if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer");
} else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function old_getInit(e) {
var t;
return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t;
}
function old_applyMemberDec(e, t, a, r, o, i, n, l, s) {
var c,
d,
u,
f,
p,
v,
y,
h = a[0];
if (n ? (0 === o || 1 === o ? (c = {
get: a[3],
set: a[4]
}, u = "get") : 3 === o ? (c = {
get: a[3]
}, u = "get") : 4 === o ? (c = {
set: a[3]
}, u = "set") : c = {
value: a[3]
}, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? f = {
get: c.get,
set: c.set
} : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = {
get: v,
set: y
}) : f = p);else for (var m = h.length - 1; m >= 0; m--) {
var b;
void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = {
get: v,
set: y
}) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b)));
}
if (0 === o || 1 === o) {
if (void 0 === d) d = function d(e, t) {
return t;
};else if ("function" != typeof d) {
var g = d;
d = function d(e, t) {
for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a);
return a;
};
} else {
var _ = d;
d = function d(e, t) {
return _.call(e, t);
};
}
e.push(d);
}
0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) {
return f.get.call(e, t);
}), e.push(function (e, t) {
return f.set.call(e, t);
})) : 2 === o ? e.push(f) : e.push(function (e, t) {
return f.call(e, t);
}) : Object.defineProperty(t, r, c));
}
function old_applyMemberDecs(e, t, a, r, o) {
for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) {
var d = o[c];
if (Array.isArray(d)) {
var u,
f,
p,
v = d[1],
y = d[2],
h = d.length > 3,
m = v >= 5;
if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) {
var b = m ? s : l,
g = b.get(y) || 0;
if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y);
!g && v > 2 ? b.set(y, v) : b.set(y, !0);
}
old_applyMemberDec(e, u, d, y, v, m, h, f, p);
}
}
old_pushInitializers(e, i), old_pushInitializers(e, n);
}
function old_pushInitializers(e, t) {
t && e.push(function (e) {
for (var a = 0; a < t.length; a++) t[a].call(e);
return e;
});
}
function old_applyClassDecs(e, t, a, r) {
if (r.length > 0) {
for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) {
var s = {
v: !1
};
try {
var c = Object.assign({
kind: "class",
name: n,
addInitializer: old_createAddInitializerMethod(o, s)
}, old_createMetadataMethodsForProperty(a, 0, n, s)),
d = r[l](i, c);
} finally {
s.v = !0;
}
void 0 !== d && (old_assertValidReturnValue(10, d), i = d);
}
e.push(i, function () {
for (var e = 0; e < o.length; e++) o[e].call(i);
});
}
}
function applyDecs(e, t, a) {
var r = [],
o = {},
i = {};
return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r;
}
modulenode_modules\@babel\runtime\helpers\applyDecoratedDescriptor.js (Line 1:1 - Line 9:7), node_modules\@babel\runtime\helpers\esm\applyDecoratedDescriptor.js (Line 1:1 - Line 9:7)
function _applyDecoratedDescriptor(i, e, r, n, l) {
var a = {};
return Object.keys(n).forEach(function (i) {
a[i] = n[i];
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) {
return n(i, e, r) || r;
}, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
}
modulenode_modules\@babel\helper-plugin-utils\lib\index.js (Line 46:8 - Line 56:6), node_modules\@babel\core\lib\config\helpers\config-api.js (Line 57:6 - Line 67:3)
) {
if (typeof range === "number") {
if (!Number.isInteger(range)) {
throw new Error("Expected string or integer value.");
}
range = `^${range}.0.0-0`;
}
if (typeof range !== "string") {
throw new Error("Expected string or integer value.");
}
constnode_modules\@babel\helper-module-transforms\lib\rewrite-live-references.js (Line 259:5 - Line 266:6), node_modules\@babel\helper-module-transforms\lib\rewrite-live-references.js (Line 224:4 - Line 231:3)
.node.name;
if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
return;
}
const exportedNames = exported.get(localName);
const importData = imported.get(localName);
if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
constnode_modules\@babel\helper-module-imports\lib\import-injector.js (Line 146:5 - Line 158:2), node_modules\@babel\helper-module-imports\lib\import-injector.js (Line 113:11 - Line 125:2)
);
}
} else if (isModuleForBabel) {
builder.import();
if (isNamespace) {
builder.namespace(name || importedSource);
} else if (isDefault || isNamed) {
builder.named(name, importName);
}
} else {
builder.require();
if (isNamespace) {
builder.var(name || importedSource);node_modules\@babel\core\lib\transform-ast.js (Line 8:21 - Line 19:23), node_modules\@babel\core\lib\transform.js (Line 8:14 - Line 19:16)
;
function _gensync() {
const data = require("gensync");
_gensync = function () {
return data;
};
return data;
}
var _index = require("./config/index.js");
var _index2 = require("./transformation/index.js");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
const transformFromAstRunnernode_modules\@babel\core\lib\transform-ast.js (Line 25:2 - Line 37:23), node_modules\@babel\core\lib\transform.js (Line 24:2 - Line 36:16)
code, optsOrCallback, maybeCallback) {
let opts;
let callback;
if (typeof optsOrCallback === "function") {
callback = optsOrCallback;
opts = undefined;
} else {
opts = optsOrCallback;
callback = maybeCallback;
}
if (callback === undefined) {
{
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunnernode_modules\@ampproject\remapping\dist\remapping.mjs (Line 2:26 - Line 21:4), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 5:13 - Line 24:8)
;
const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);
const EMPTY_SOURCES = [];
function SegmentObject(source, line, column, name, content, ignore) {
return { source, line, column, name, content, ignore };
}
function Source(map, sources, source, content, ignore) {
return {
map,
sources,
source,
content,
ignore,
};
}
/**
* MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes
* (which may themselves be SourceMapTrees).
*/node_modules\@ampproject\remapping\dist\remapping.mjs (Line 42:2 - Line 60:16), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 45:2 - Line 63:11)
decodedMappings(map);
for (let i = 0; i < rootMappings.length; i++) {
const segments = rootMappings[i];
for (let j = 0; j < segments.length; j++) {
const segment = segments[j];
const genCol = segment[0];
let traced = SOURCELESS_MAPPING;
// 1-length segments only move the current generated column, there's no source information
// to gather from it.
if (segment.length !== 1) {
const source = rootSources[segment[1]];
traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : '');
// If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a
// respective segment into an original source.
if (traced == null)
continue;
}
const { column, line, name, content, source, ignore } = traced;
maybeAddSegmentnode_modules\@ampproject\remapping\dist\remapping.mjs (Line 77:2 - Line 103:4), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 80:2 - Line 106:8)
traceSegment(source.map, line, column);
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
if (segment == null)
return null;
// 1-length segments only move the current generated column, there's no source information
// to gather from it.
if (segment.length === 1)
return SOURCELESS_MAPPING;
return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);
}
function asArray(value) {
if (Array.isArray(value))
return value;
return [value];
}
/**
* Recursively builds a tree structure out of sourcemap files, with each node
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
* `OriginalSource`s and `SourceMapTree`s.
*
* Every sourcemap is composed of a collection of source files and mappings
* into locations of those source files. When we generate a `SourceMapTree` for
* the sourcemap, we attempt to load each source file's own sourcemap. If it
* does not have an associated sourcemap, it is considered an original,
* unmodified source file.
*/node_modules\@ampproject\remapping\dist\remapping.mjs (Line 105:2 - Line 140:9), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 108:2 - Line 143:13)
TraceMap(m, ''));
const map = maps.pop();
for (let i = 0; i < maps.length; i++) {
if (maps[i].sources.length > 1) {
throw new Error(`Transformation map ${i} must have exactly one source file.\n` +
'Did you specify these with the most recent transformation maps first?');
}
}
let tree = build(map, loader, '', 0);
for (let i = maps.length - 1; i >= 0; i--) {
tree = MapSource(maps[i], [tree]);
}
return tree;
}
function build(map, loader, importer, importerDepth) {
const { resolvedSources, sourcesContent, ignoreList } = map;
const depth = importerDepth + 1;
const children = resolvedSources.map((sourceFile, i) => {
// The loading context gives the loader more information about why this file is being loaded
// (eg, from which importer). It also allows the loader to override the location of the loaded
// sourcemap/original source, or to override the content in the sourcesContent field if it's
// an unmodified source file.
const ctx = {
importer,
depth,
source: sourceFile || '',
content: undefined,
ignore: undefined,
};
// Use the provided loader callback to retrieve the file's sourcemap.
// TODO: We should eventually support async loading of sourcemap files.
const sourceMap = loader(ctx.source, ctx);
const { source, content, ignore } = ctx;
// If there is a sourcemap, then we need to recurse into it to load its source files.
if (sourceMap)
return build(new TraceMapnode_modules\@ampproject\remapping\dist\remapping.mjs (Line 140:2 - Line 155:4), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 143:2 - Line 158:8)
TraceMap(sourceMap, source), loader, source, depth);
// Else, it's an unmodified source file.
// The contents of this unmodified source file can be overridden via the loader context,
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
// the importing sourcemap's `sourcesContent` field.
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;
return OriginalSource(source, sourceContent, ignored);
});
return MapSource(map, children);
}
/**
* A SourceMap v3 compatible sourcemap, which only includes fields that were
* provided to it.
*/node_modules\@ampproject\remapping\dist\remapping.mjs (Line 158:2 - Line 189:4), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 161:2 - Line 192:8)
toEncodedMap(map);
this.version = out.version; // SourceMap spec says this should be first.
this.file = out.file;
this.mappings = out.mappings;
this.names = out.names;
this.ignoreList = out.ignoreList;
this.sourceRoot = out.sourceRoot;
this.sources = out.sources;
if (!options.excludeContent) {
this.sourcesContent = out.sourcesContent;
}
}
toString() {
return JSON.stringify(this);
}
}
/**
* Traces through all the mappings in the root sourcemap, through the sources
* (and their sourcemaps), all the way back to the original source location.
*
* `loader` will be called every time we encounter a source file. If it returns
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
* it returns a falsey value, that source file is treated as an original,
* unmodified source file.
*
* Pass `excludeContent` to exclude any self-containing source file content
* from the output sourcemap.
*
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
* VLQ encoded) mappings.
*/node_modules\@ampproject\remapping\dist\remapping.mjs (Line 190:1 - Line 196:7), node_modules\@ampproject\remapping\dist\remapping.umd.js (Line 193:5 - Line 199:7)
function remapping(input, loader, options) {
const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };
const tree = buildSourceMapTree(input, loader);
return new SourceMap(traceMappings(tree), opts);
}
exportsrc\components\auth\RegistrationForm.tsx (Line 39:10 - Line 82:6), src\components\auth\RegistrationForm.tsx (Line 23:6 - Line 62:7)
}
/>
</div>
<div className={styles.field}>
<label htmlFor="register-password">
<Lock size={14} />
{t('common.form.label.password')}
<span className={styles.required}> *</span>
</label>
<PasswordInput
id="register-password"
name="password"
required={true}
disabled={isPending}
autoComplete="new-password"
/>
</div>
<div className={styles.field}>
<label htmlFor="register-firstName">
<User size={14} />
{t('common.form.label.firstName')}
<span className={styles.required}> *</span>
</label>
<Input
id="register-firstName"
name="firstName"
type="text"
required={true}
disabled={isPending}
/>
</div>
<div className={styles.field}>
<label htmlFor="register-lastName">
<User size={14} />
{t('common.form.label.lastName')}
</label>
<Input
id="register-lastName"
name="lastName"
type="text"
required={falsenode_modules\typescript-eslint\dist\index.js (Line 1:1 - Line 6:7), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.confignode_modules\typescript-eslint\dist\getTSConfigRootDirFromStack.js (Line 1:1 - Line 6:28), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 39:30)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTSConfigRootDirFromStacknode_modules\typescript\lib\_typingsInstaller.js (Line 18:1 - Line 25:2), node_modules\vite\node_modules\fdir\dist\index.cjs (Line 2:1 - Line 9:4)
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {node_modules\typescript\lib\_typingsInstaller.js (Line 23:15 - Line 32:11), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 31:2 - Line 40:8)
;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExportnode_modules\typescript\lib\_typingsInstaller.js (Line 32:2 - Line 42:48), node_modules\@jridgewell\trace-mapping\dist\trace-mapping.umd.js (Line 39:2 - Line 48:4)
;
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/typingsInstaller/nodeTypingsInstaller.tsnode_modules\typescript\lib\_tsserver.js (Line 1:1 - Line 42:26), node_modules\typescript\lib\_typingsInstaller.js (Line 1:1 - Line 48:4)
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/tsserver/server.tsnode_modules\typescript\lib\watchGuard.js (Line 1:1 - Line 41:32), node_modules\typescript\lib\_typingsInstaller.js (Line 1:1 - Line 48:4)
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/watchGuard/watchGuard.tsnode_modules\typed-array-length\test\index.js (Line 45:17 - Line 51:17), node_modules\which-typed-array\test\index.js (Line 58:16 - Line 64:16)
(function () {}), 'function is not typed array');
t.end();
});
test('Generators', { skip: generators.length === 0 }, function (t) {
forEach(generators, function (genFn) {
t.equal(false, typedArrayLengthnode_modules\typed-array-byte-offset\test\index.js (Line 4:2 - Line 16:21), node_modules\typed-array-length\test\index.js (Line 4:2 - Line 15:17)
= require('../');
var isCallable = require('is-callable');
var generators = require('make-generator-function')();
var arrowFn = require('make-arrow-function')();
var forEach = require('for-each');
var inspect = require('object-inspect');
var typedArrayNames = require('possible-typed-array-names');
test('not arrays', function (t) {
t.test('non-number/string primitives', function (st) {
// @ts-expect-error
st.equal(false, typedArrayByteOffsetnode_modules\typed-array-byte-offset\test\index.js (Line 46:21 - Line 52:21), node_modules\which-typed-array\test\index.js (Line 58:16 - Line 64:16)
(function () {}), 'function is not typed array');
t.end();
});
test('Generators', { skip: generators.length === 0 }, function (t) {
forEach(generators, function (genFn) {
t.equal(false, typedArrayByteOffsetnode_modules\typed-array-byte-length\test\index.js (Line 4:2 - Line 10:21), node_modules\typed-array-length\test\index.js (Line 4:2 - Line 10:16)
= require('../');
var isCallable = require('is-callable');
var generators = require('make-generator-function')();
var arrowFn = require('make-arrow-function')();
var forEach = require('for-each');
var inspect = require('object-inspect');
var availableTypedArraysnode_modules\typed-array-byte-length\test\index.js (Line 45:21 - Line 51:21), node_modules\which-typed-array\test\index.js (Line 58:16 - Line 64:16)
(function () {}), 'function is not typed array');
t.end();
});
test('Generators', { skip: generators.length === 0 }, function (t) {
forEach(generators, function (genFn) {
t.equal(false, typedArrayByteLengthnode_modules\tslib\modules\index.js (Line 36:2 - Line 69:2), node_modules\tslib\modules\index.js (Line 2:2 - Line 35:2)
{
__extends,
__assign,
__rest,
__decorate,
__param,
__esDecorate,
__runInitializers,
__propKey,
__setFunctionName,
__metadata,
__awaiter,
__generator,
__exportStar,
__createBinding,
__values,
__read,
__spread,
__spreadArrays,
__spreadArray,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
__classPrivateFieldIn,
__addDisposableResource,
__disposeResources,
__rewriteRelativeImportExtension,
};node_modules\tsconfig-paths\lib\match-path-async.js (Line 25:16 - Line 30:9), node_modules\tsconfig-paths\lib\match-path-sync.js (Line 37:15 - Line 42:10)
; }
if (extensions === void 0) { extensions = Object.keys(require.extensions); }
if (mainFields === void 0) { mainFields = ["main"]; }
var tryPaths = TryPath.getPathsToTry(extensions, absolutePathMappings, requestedModule);
if (!tryPaths) {
return callbacknode_modules\tinyglobby\dist\index.mjs (Line 229:9 - Line 236:5), node_modules\tinyglobby\dist\index.mjs (Line 220:5 - Line 227:6)
(patternsOrOptions, options) {
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? {
...options,
patterns: patternsOrOptions
} : patternsOrOptions;
const cwd = opts.cwd ? path.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
return crawl(opts, cwd, truenode_modules\tinyglobby\dist\index.js (Line 1:1 - Line 25:5), node_modules\vite\node_modules\fdir\dist\index.cjs (Line 1:1 - Line 25:3)
//#region rolldown:runtime
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i];
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
const path = __toESM(require("path"));
const fdirnode_modules\tinyglobby\dist\index.js (Line 26:2 - Line 39:8), node_modules\tinyglobby\dist\index.mjs (Line 3:12 - Line 16:7)
;
//#region src/utils.ts
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
function getPartialMatcher(patterns, options) {
const patternsCount = patterns.length;
const patternsParts = Array(patternsCount);
const regexes = Array(patternsCount);
for (let i = 0; i < patternsCount; i++) {
const parts = splitPattern(patterns[i]);
patternsParts[i] = parts;
const partsCount = parts.length;
const partRegexes = Array(partsCount);
for (let j = 0; j < partsCount; j++) partRegexes[j] = picomatch.defaultnode_modules\tinyglobby\dist\index.js (Line 39:8 - Line 65:2), node_modules\tinyglobby\dist\index.mjs (Line 16:10 - Line 42:2)
.makeRe(parts[j], options);
regexes[i] = partRegexes;
}
return (input) => {
const inputParts = input.split("/");
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
for (let i = 0; i < patterns.length; i++) {
const patternParts = patternsParts[i];
const regex = regexes[i];
const inputPatternCount = inputParts.length;
const minParts = Math.min(inputPatternCount, patternParts.length);
let j = 0;
while (j < minParts) {
const part = patternParts[j];
if (part.includes("/")) return true;
const match = regex[j].test(inputParts[j]);
if (!match) break;
if (part === "**") return true;
j++;
}
if (j === inputPatternCount) return true;
}
return false;
};
}
const splitPatternOptions = { parts: true };
function splitPattern(path$2node_modules\tinyglobby\dist\index.js (Line 86:8 - Line 103:8), node_modules\tinyglobby\dist\index.mjs (Line 63:10 - Line 80:11)
.scan(pattern);
return scan.isGlob || scan.negated;
}
function log(...tasks) {
console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`, ...tasks);
}
//#endregion
//#region src/index.ts
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
const BACKSLASHES = /\\/g;
function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
let result = pattern;
if (pattern.endsWith("/")) result = pattern.slice(0, -1);
if (!result.endsWith("*") && expandDirectories) result += "/**";
const escapedCwd = escapePath(cwd);
if (path.defaultnode_modules\tinyglobby\dist\index.js (Line 104:2 - Line 115:5), node_modules\tinyglobby\dist\index.mjs (Line 81:2 - Line 92:6)
posix.normalize(result);
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
const parts = splitPattern(result);
if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
const n = (parentDirectoryMatch[0].length + 1) / 3;
let i = 0;
const cwdParts = escapedCwd.split("/");
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
i++;
}
const potentialRoot = pathnode_modules\tinyglobby\dist\index.js (Line 115:2 - Line 137:8), node_modules\tinyglobby\dist\index.mjs (Line 92:2 - Line 114:6)
posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
props.root = potentialRoot;
props.depthOffset = -n + i;
}
}
if (!isIgnore && props.depthOffset >= 0) {
var _props$commonPath;
(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
const newCommonPath = [];
const length = Math.min(props.commonPath.length, parts.length);
for (let i = 0; i < length; i++) {
const part = parts[i];
if (part === "**" && !parts[i + 1]) {
newCommonPath.pop();
break;
}
if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
newCommonPath.push(part);
}
props.depthOffset = newCommonPath.length;
props.commonPath = newCommonPath;
props.root = newCommonPath.length > 0 ? path.defaultnode_modules\tinyglobby\dist\index.js (Line 137:8 - Line 161:2), node_modules\tinyglobby\dist\index.mjs (Line 114:5 - Line 138:2)
.posix.join(cwd, ...newCommonPath) : cwd;
}
return result;
}
function processPatterns({ patterns, ignore = [], expandDirectories = true }, cwd, props) {
if (typeof patterns === "string") patterns = [patterns];
else if (!patterns) patterns = ["**/*"];
if (typeof ignore === "string") ignore = [ignore];
const matchPatterns = [];
const ignorePatterns = [];
for (const pattern of ignore) {
if (!pattern) continue;
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
}
for (const pattern of patterns) {
if (!pattern) continue;
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
}
return {
match: matchPatterns,
ignore: ignorePatterns
};
}
function getRelativePath(path$2node_modules\tinyglobby\dist\index.js (Line 165:2 - Line 171:2), node_modules\tinyglobby\dist\index.mjs (Line 142:2 - Line 148:2)
;
if (root === cwd) return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath;
return getRelativePath(relativePath, cwd, root);
}
function formatPaths(paths, cwd, root) {
for (let i = paths.length - 1; i >= 0; i--) {
const path$2node_modules\tinyglobby\dist\index.js (Line 172:3 - Line 188:2), node_modules\tinyglobby\dist\index.mjs (Line 149:3 - Line 165:10)
endsWith("/") ? "/" : "");
}
return paths;
}
function crawl(options, cwd, sync) {
if (process.env.TINYGLOBBY_DEBUG) options.debug = true;
if (options.debug) log("globbing with options:", options, "cwd:", cwd);
if (Array.isArray(options.patterns) && options.patterns.length === 0) return sync ? [] : Promise.resolve([]);
const props = {
root: cwd,
commonPath: null,
depthOffset: 0
};
const processed = processPatterns(options, cwd, props);
const nocase = options.caseSensitiveMatch === false;
if (options.debug) log("internal processing patterns:", processed);
const matcher = (node_modules\tinyglobby\dist\index.js (Line 193:2 - Line 203:2), node_modules\tinyglobby\dist\index.mjs (Line 170:10 - Line 180:2)
(processed.ignore, {
dot: options.dot,
nocase
});
const partialMatcher = getPartialMatcher(processed.match, {
dot: options.dot,
nocase
});
const fdirOptions = {
filters: [options.debug ? (p, isDirectory) => {
const path$2node_modules\tinyglobby\dist\index.js (Line 205:2 - Line 239:2), node_modules\tinyglobby\dist\index.mjs (Line 182:2 - Line 216:2)
}`);
return matches;
} : (p, isDirectory) => matcher(processPath(p, cwd, props.root, isDirectory, options.absolute))],
exclude: options.debug ? (_, p) => {
const relativePath = processPath(p, cwd, props.root, true, true);
const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
if (skipped) log(`skipped ${p}`);
else log(`crawling ${p}`);
return skipped;
} : (_, p) => {
const relativePath = processPath(p, cwd, props.root, true, true);
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
},
pathSeparator: "/",
relativePaths: true,
resolveSymlinks: true
};
if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
if (options.absolute) {
fdirOptions.relativePaths = false;
fdirOptions.resolvePaths = true;
fdirOptions.includeBasePath = true;
}
if (options.followSymbolicLinks === false) {
fdirOptions.resolveSymlinks = false;
fdirOptions.excludeSymlinks = true;
}
if (options.onlyDirectories) {
fdirOptions.excludeFiles = true;
fdirOptions.includeDirs = true;
} else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
props.root = props.root.replace(BACKSLASHES, "");
const root = props.root;
if (options.debug) log("internal properties:", props);
const api = new fdir.node_modules\tinyglobby\dist\index.js (Line 239:2 - Line 249:8), node_modules\tinyglobby\dist\index.mjs (Line 216:2 - Line 226:8)
fdir(fdirOptions).crawl(root);
if (cwd === root || options.absolute) return sync ? api.sync() : api.withPromise();
return sync ? formatPaths(api.sync(), cwd, root) : api.withPromise().then((paths) => formatPaths(paths, cwd, root));
}
async function glob(patternsOrOptions, options) {
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? {
...options,
patterns: patternsOrOptions
} : patternsOrOptions;
const cwd = opts.cwd ? path.defaultnode_modules\tinyglobby\dist\index.js (Line 249:8 - Line 259:5), node_modules\tinyglobby\dist\index.mjs (Line 226:5 - Line 250:6)
.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
return crawl(opts, cwd, false);
}
function globSync(patternsOrOptions, options) {
if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? {
...options,
patterns: patternsOrOptions
} : patternsOrOptions;
const cwd = opts.cwd ? path.default.resolve(opts.cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
return crawl(opts, cwd, truenode_modules\string.prototype.trimend\test\shimmed.js (Line 1:1 - Line 14:8), node_modules\string.prototype.trimstart\test\shimmed.js (Line 1:1 - Line 14:10)
'use strict';
require('../auto');
var runTests = require('./tests');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
test('shimmed', function (t) {
t.equal(String.prototype.trimEndnode_modules\string.prototype.trimend\test\shimmed.js (Line 21:35 - Line 28:8), node_modules\string.prototype.trimstart\test\shimmed.js (Line 21:37 - Line 28:10)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return String.prototype.trimEndnode_modules\string.prototype.trimend\test\index.js (Line 3:2 - Line 9:8), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { trimEndnode_modules\string.prototype.trimend\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\string.prototype.trim\test\shimmed.js (Line 21:32 - Line 28:5), node_modules\string.prototype.trimstart\test\shimmed.js (Line 21:37 - Line 28:10)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return String.prototype.trimnode_modules\string.prototype.trim\test\index.js (Line 3:2 - Line 9:5), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { trimnode_modules\string.prototype.matchall\test\tests.js (Line 73:2 - Line 80:2), node_modules\string.prototype.matchall\test\tests.js (Line 58:10 - Line 64:2)
, [
{ value: assign([''], groups({ index: 0, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 1, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 2, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 3, input: 'abc' })), done: false },
{ value: undefined, done: true }
]]
]node_modules\string.prototype.matchall\test\tests.js (Line 192:3 - Line 198:9), node_modules\string.prototype.matchall\test\tests.js (Line 98:3 - Line 104:9)
var expectedResults = [
{ value: assign(['a'], groups({ index: 0, input: str })), done: false },
{ value: assign(['a'], groups({ index: 1, input: str })), done: false },
{ value: assign(['c'], groups({ index: 3, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(st, iteratornode_modules\string.prototype.includes\tests\shimmed.js (Line 4:2 - Line 15:9), node_modules\string.prototype.trim\test\shimmed.js (Line 3:10 - Line 14:5)
);
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(String.prototype.includesnode_modules\source-map-js\lib\util.js (Line 391:3 - Line 413:35), node_modules\source-map-js\lib\util.js (Line 364:3 - Line 386:27)
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0 || onlyCompareOriginal) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByOriginalPositionsNoSourcenode_modules\source-map-js\lib\util.js (Line 435:3 - Line 446:2), node_modules\source-map-js\lib\util.js (Line 359:2 - Line 370:3)
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0)node_modules\source-map-js\lib\util.js (Line 455:2 - Line 477:42), node_modules\source-map-js\lib\util.js (Line 430:3 - Line 452:36)
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0 || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsDeflatedNoLinenode_modules\source-map-js\lib\util.js (Line 510:2 - Line 531:36), node_modules\source-map-js\lib\util.js (Line 431:21 - Line 452:36)
) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsInflatednode_modules\source-map-js\lib\source-node.js (Line 387:20 - Line 401:2), node_modules\source-map-js\lib\source-node.js (Line 350:5 - Line 364:19)
) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
}node_modules\side-channel-map\test\index.js (Line 8:2 - Line 110:29), node_modules\side-channel-weakmap\test\index.js (Line 8:2 - Line 110:45)
|| function () {
throw new EvalError('should never happen');
};
t.test('export', function (st) {
st.equal(typeof getSideChannel, 'function', 'is a function');
st.equal(getSideChannel.length, 0, 'takes no arguments');
var channel = getSideChannel();
st.ok(channel, 'is truthy');
st.equal(typeof channel, 'object', 'is an object');
st.end();
});
t.test('assert', function (st) {
var channel = getSideChannel();
st['throws'](
function () { channel.assert({}); },
TypeError,
'nonexistent value throws'
);
var o = {};
channel.set(o, 'data');
st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
st.end();
});
t.test('has', function (st) {
var channel = getSideChannel();
/** @type {unknown[]} */ var o = [];
st.equal(channel.has(o), false, 'nonexistent value yields false');
channel.set(o, 'foo');
st.equal(channel.has(o), true, 'existent value yields true');
st.equal(channel.has('abc'), false, 'non object value non existent yields false');
channel.set('abc', 'foo');
st.equal(channel.has('abc'), true, 'non object value that exists yields true');
st.end();
});
t.test('get', function (st) {
var channel = getSideChannel();
var o = {};
st.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
var data = {};
channel.set(o, data);
st.equal(channel.get(o), data, '"get" yields data set by "set"');
st.end();
});
t.test('set', function (st) {
var channel = getSideChannel();
var o = function () {};
st.equal(channel.get(o), undefined, 'value not set');
channel.set(o, 42);
st.equal(channel.get(o), 42, 'value was set');
channel.set(o, Infinity);
st.equal(channel.get(o), Infinity, 'value was set again');
var o2 = {};
channel.set(o2, 17);
st.equal(channel.get(o), Infinity, 'o is not modified');
st.equal(channel.get(o2), 17, 'o2 is set');
channel.set(o, 14);
st.equal(channel.get(o), 14, 'o is modified');
st.equal(channel.get(o2), 17, 'o2 is not modified');
st.end();
});
t.test('delete', function (st) {
var channel = getSideChannel();
var o = {};
st.equal(channel['delete']({}), false, 'nonexistent value yields false');
channel.set(o, 42);
st.equal(channel.has(o), true, 'value is set');
st.equal(channel['delete']({}), false, 'nonexistent value still yields false');
st.equal(channel['delete'](o), true, 'deleted value yields true');
st.equal(channel.has(o), false, 'value is no longer set');
st.end();
});
t.end();
});
test('getSideChannelMap, no Maps'node_modules\side-channel-list\test\index.js (Line 20:19 - Line 35:19), node_modules\side-channel-weakmap\test\index.js (Line 24:15 - Line 39:15)
();
st['throws'](
function () { channel.assert({}); },
TypeError,
'nonexistent value throws'
);
var o = {};
channel.set(o, 'data');
st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
st.end();
});
t.test('has', function (st) {
var channel = getSideChannelListnode_modules\side-channel-list\test\index.js (Line 35:19 - Line 52:19), node_modules\side-channel-weakmap\test\index.js (Line 39:15 - Line 56:15)
();
/** @type {unknown[]} */ var o = [];
st.equal(channel.has(o), false, 'nonexistent value yields false');
channel.set(o, 'foo');
st.equal(channel.has(o), true, 'existent value yields true');
st.equal(channel.has('abc'), false, 'non object value non existent yields false');
channel.set('abc', 'foo');
st.equal(channel.has('abc'), true, 'non object value that exists yields true');
st.end();
});
t.test('get', function (st) {
var channel = getSideChannelListnode_modules\side-channel-list\test\index.js (Line 52:19 - Line 64:19), node_modules\side-channel-weakmap\test\index.js (Line 56:15 - Line 68:15)
();
var o = {};
st.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
var data = {};
channel.set(o, data);
st.equal(channel.get(o), data, '"get" yields data set by "set"');
st.end();
});
t.test('set', function (st) {
var channel = getSideChannelListnode_modules\side-channel-list\test\index.js (Line 64:19 - Line 87:19), node_modules\side-channel-weakmap\test\index.js (Line 68:15 - Line 91:15)
();
var o = function () {};
st.equal(channel.get(o), undefined, 'value not set');
channel.set(o, 42);
st.equal(channel.get(o), 42, 'value was set');
channel.set(o, Infinity);
st.equal(channel.get(o), Infinity, 'value was set again');
var o2 = {};
channel.set(o2, 17);
st.equal(channel.get(o), Infinity, 'o is not modified');
st.equal(channel.get(o2), 17, 'o2 is set');
channel.set(o, 14);
st.equal(channel.get(o), 14, 'o is modified');
st.equal(channel.get(o2), 17, 'o2 is not modified');
st.end();
});
t.test('delete', function (st) {
var channel = getSideChannelListnode_modules\side-channel-list\test\index.js (Line 87:19 - Line 104:2), node_modules\side-channel-weakmap\test\index.js (Line 91:15 - Line 108:2)
();
var o = {};
st.equal(channel['delete']({}), false, 'nonexistent value yields false');
channel.set(o, 42);
st.equal(channel.has(o), true, 'value is set');
st.equal(channel['delete']({}), false, 'nonexistent value still yields false');
st.equal(channel['delete'](o), true, 'deleted value yields true');
st.equal(channel.has(o), false, 'value is no longer set');
st.end();
});
t.end();
});node_modules\side-channel\test\index.js (Line 8:2 - Line 104:2), node_modules\side-channel-weakmap\test\index.js (Line 12:2 - Line 108:2)
t.test('export', function (st) {
st.equal(typeof getSideChannel, 'function', 'is a function');
st.equal(getSideChannel.length, 0, 'takes no arguments');
var channel = getSideChannel();
st.ok(channel, 'is truthy');
st.equal(typeof channel, 'object', 'is an object');
st.end();
});
t.test('assert', function (st) {
var channel = getSideChannel();
st['throws'](
function () { channel.assert({}); },
TypeError,
'nonexistent value throws'
);
var o = {};
channel.set(o, 'data');
st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
st.end();
});
t.test('has', function (st) {
var channel = getSideChannel();
/** @type {unknown[]} */ var o = [];
st.equal(channel.has(o), false, 'nonexistent value yields false');
channel.set(o, 'foo');
st.equal(channel.has(o), true, 'existent value yields true');
st.equal(channel.has('abc'), false, 'non object value non existent yields false');
channel.set('abc', 'foo');
st.equal(channel.has('abc'), true, 'non object value that exists yields true');
st.end();
});
t.test('get', function (st) {
var channel = getSideChannel();
var o = {};
st.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
var data = {};
channel.set(o, data);
st.equal(channel.get(o), data, '"get" yields data set by "set"');
st.end();
});
t.test('set', function (st) {
var channel = getSideChannel();
var o = function () {};
st.equal(channel.get(o), undefined, 'value not set');
channel.set(o, 42);
st.equal(channel.get(o), 42, 'value was set');
channel.set(o, Infinity);
st.equal(channel.get(o), Infinity, 'value was set again');
var o2 = {};
channel.set(o2, 17);
st.equal(channel.get(o), Infinity, 'o is not modified');
st.equal(channel.get(o2), 17, 'o2 is set');
channel.set(o, 14);
st.equal(channel.get(o), 14, 'o is modified');
st.equal(channel.get(o2), 17, 'o2 is not modified');
st.end();
});
t.test('delete', function (st) {
var channel = getSideChannel();
var o = {};
st.equal(channel['delete']({}), false, 'nonexistent value yields false');
channel.set(o, 42);
st.equal(channel.has(o), true, 'value is set');
st.equal(channel['delete']({}), false, 'nonexistent value still yields false');
st.equal(channel['delete'](o), true, 'deleted value yields true');
st.equal(channel.has(o), false, 'value is no longer set');
st.end();
});
t.end();
});node_modules\semver\bin\semver.js (Line 41:2 - Line 60:4), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\bin\semver.js (Line 47:6 - Line 66:5)
)
}
switch (a) {
case '-rv': case '-rev': case '--rev': case '--reverse':
reverse = true
break
case '-l': case '--loose':
loose = true
break
case '-p': case '--include-prerelease':
includePrerelease = true
break
case '-v': case '--version':
versions.push(argv.shift())
break
case '-i': case '--inc': case '--increment':
switch (argv[0]) {
case 'major': case 'minor': case 'patch': case 'prerelease':
case 'premajor': case 'preminor': case 'prepatch':
incnode_modules\scheduler\cjs\scheduler.native.production.js (Line 11:1 - Line 60:4), node_modules\scheduler\cjs\scheduler.production.js (Line 11:1 - Line 60:8)
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
varnode_modules\scheduler\cjs\scheduler.native.production.js (Line 69:2 - Line 110:9), node_modules\scheduler\cjs\scheduler.production.js (Line 69:2 - Line 110:4)
= function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
functionnode_modules\scheduler\cjs\scheduler.native.production.js (Line 111:15 - Line 162:9), node_modules\scheduler\cjs\scheduler.production.js (Line 277:13 - Line 327:2)
();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
return priorityLevel;
}
functionnode_modules\scheduler\cjs\scheduler.native.production.js (Line 180:15 - Line 210:15), node_modules\scheduler\cjs\scheduler.production.js (Line 124:13 - Line 154:8)
();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime && shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = getCurrentTimenode_modules\scheduler\cjs\scheduler.native.production.js (Line 210:15 - Line 266:15), node_modules\scheduler\cjs\scheduler.production.js (Line 154:13 - Line 210:8)
();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
var schedulePerformWorkUntilDeadline;
if ("function" === typeof localSetImmediate)
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(getCurrentTimenode_modules\scheduler\cjs\scheduler.native.development.js (Line 14:5 - Line 86:9), node_modules\scheduler\cjs\scheduler.native.production.js (Line 177:1 - Line 192:4)
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = getCurrentTime();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime &&
shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = getCurrentTime();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
functionnode_modules\scheduler\cjs\scheduler.native.development.js (Line 86:5 - Line 138:9), node_modules\scheduler\cjs\scheduler.production.js (Line 12:1 - Line 60:8)
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
functionnode_modules\scheduler\cjs\scheduler.native.development.js (Line 138:5 - Line 225:9), node_modules\scheduler\cjs\scheduler.production.js (Line 85:1 - Line 168:4)
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function unstable_scheduleCallback$1(priorityLevel, callback, options) {
var currentTime = getCurrentTime();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0),
schedulePerformWorkUntilDeadline())));
return priorityLevel;
}
function unstable_cancelCallback$1(task) {
task.callback = null;
}
function unstable_getCurrentPriorityLevel$1() {
return currentPriorityLevel;
}
functionnode_modules\scheduler\cjs\scheduler.native.development.js (Line 248:2 - Line 271:2), node_modules\scheduler\cjs\scheduler.native.production.js (Line 63:3 - Line 84:2)
getCurrentTime = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
getCurrentTime = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate =
"undefined" !== typeof setImmediate ? setImmediate : null,node_modules\scheduler\cjs\scheduler.native.development.js (Line 277:2 - Line 291:8), node_modules\scheduler\cjs\scheduler.production.js (Line 194:3 - Line 208:9)
schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
channelnode_modules\scheduler\cjs\scheduler.native.development.js (Line 295:2 - Line 331:8), node_modules\scheduler\cjs\scheduler.native.production.js (Line 273:3 - Line 309:9)
unstable_NormalPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_NormalPriority
: 3,
unstable_LowPriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_LowPriority
: 4,
unstable_ImmediatePriority =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_ImmediatePriority
: 1,
unstable_scheduleCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_scheduleCallback
: unstable_scheduleCallback$1,
unstable_cancelCallback =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_cancelCallback
: unstable_cancelCallback$1,
unstable_getCurrentPriorityLevel =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
: unstable_getCurrentPriorityLevel$1,
unstable_shouldYield =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_shouldYield
: shouldYieldToHost,
unstable_requestPaint =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_requestPaint
: requestPaint,
unstable_now =
"undefined" !== typeof nativeRuntimeScheduler
? nativeRuntimeScheduler.unstable_now
: getCurrentTime;
exportsnode_modules\scheduler\cjs\scheduler.native.development.js (Line 339:8 - Line 349:2), node_modules\scheduler\cjs\scheduler.native.production.js (Line 320:30 - Line 330:2)
;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_forceFrameRate = throwNotImplemented;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_next = throwNotImplemented;
exports.unstable_now = unstable_now;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = throwNotImplemented;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_shouldYield = unstable_shouldYield;
exports.unstable_wrapCallback = throwNotImplemented;node_modules\scheduler\cjs\scheduler.development.js (Line 14:5 - Line 166:18), node_modules\scheduler\cjs\scheduler.production.js (Line 121:1 - Line 110:28)
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime &&
shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function shouldYieldToHostnode_modules\scheduler\cjs\scheduler.development.js (Line 182:5 - Line 231:8), node_modules\scheduler\cjs\scheduler.production.js (Line 60:1 - Line 208:9)
exports.unstable_now = void 0;
if (
"object" === typeof performance &&
"function" === typeof performance.now
) {
var localPerformance = performance;
exports.unstable_now = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
exports.unstable_now = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate =
"undefined" !== typeof setImmediate ? setImmediate : null,
isMessageLoopRunning = !1,
taskTimeoutID = -1,
frameInterval = 5,
startTime = -1;
if ("function" === typeof localSetImmediate)
var schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
exportsnode_modules\scheduler\cjs\scheduler.development.js (Line 231:5 - Line 359:2), node_modules\scheduler\cjs\scheduler.production.js (Line 213:1 - Line 340:2)
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_forceFrameRate = function (fps) {
0 > fps || 125 < fps
? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
)
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
isMessageLoopRunning ||
((isMessageLoopRunning = !0),
schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};node_modules\scheduler\cjs\scheduler-unstable_post_task.development.js (Line 14:5 - Line 46:4), node_modules\scheduler\cjs\scheduler-unstable_post_task.production.js (Line 18:1 - Line 50:8)
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
varnode_modules\scheduler\cjs\scheduler-unstable_post_task.development.js (Line 52:5 - Line 149:2), node_modules\scheduler\cjs\scheduler-unstable_post_task.production.js (Line 50:1 - Line 140:2)
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay:
"object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(
null,
priorityLevel,
postTaskPriority,
controller,
callback
),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};node_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 11:1 - Line 60:10), node_modules\scheduler\cjs\scheduler.production.js (Line 11:1 - Line 60:15)
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var taskQueuenode_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 78:2 - Line 95:2), node_modules\scheduler\cjs\scheduler.production.js (Line 84:5 - Line 102:21)
;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (node_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 291:18 - Line 311:13), node_modules\scheduler\cjs\scheduler.production.js (Line 230:21 - Line 250:22)
;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_nownode_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 313:1 - Line 341:16), node_modules\scheduler\cjs\scheduler.production.js (Line 249:1 - Line 277:8)
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTimenode_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 341:16 - Line 380:2), node_modules\scheduler\cjs\scheduler.production.js (Line 277:2 - Line 316:18)
;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((node_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 392:9 - Line 406:2), node_modules\scheduler\cjs\scheduler.production.js (Line 326:14 - Line 340:2)
;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};node_modules\scheduler\cjs\scheduler-unstable_mock.development.js (Line 14:5 - Line 175:4), node_modules\scheduler\cjs\scheduler.production.js (Line 12:1 - Line 188:8)
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
(!(currentTask.expirationTime > initialTime) ||
(hasTimeRemaining && !shouldYieldToHost()));
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
varnode_modules\scheduler\cjs\scheduler-unstable_mock.development.js (Line 173:2 - Line 194:8), node_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 58:3 - Line 79:9)
;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
exportsnode_modules\scheduler\cjs\scheduler-unstable_mock.development.js (Line 194:5 - Line 414:2), node_modules\scheduler\cjs\scheduler-unstable_mock.production.js (Line 188:1 - Line 360:12)
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearLog = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting =
unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
}node_modules\rollup\dist\getLogFilter.js (Line 14:1 - Line 68:8), node_modules\rollup\dist\es\getLogFilter.js (Line 10:1 - Line 64:7)
const getLogFilter = filters => {
if (filters.length === 0)
return () => true;
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
const inverted = subFilter.startsWith('!');
if (inverted)
subFilter = subFilter.slice(1);
const [key, ...value] = subFilter.split(':');
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
}));
return (log) => {
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
for (const { inverted, key, parts } of intersectedFilters) {
const isFilterSatisfied = testFilter(log, key, parts);
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
continue nextIntersectedFilter;
}
}
return true;
}
return false;
};
};
const testFilter = (log, key, parts) => {
let rawValue = log;
for (let index = 0; index < key.length; index++) {
if (!rawValue) {
return false;
}
const part = key[index];
if (!(part in rawValue)) {
return false;
}
rawValue = rawValue[part];
}
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
if (parts.length === 1) {
return value === parts[0];
}
if (!value.startsWith(parts[0])) {
return false;
}
const lastPartIndex = parts.length - 1;
for (let index = 1; index < lastPartIndex; index++) {
const part = parts[index];
const position = value.indexOf(part);
if (position === -1) {
return false;
}
value = value.slice(position + part.length);
}
return value.endsWith(parts[lastPartIndex]);
};
exportsnode_modules\resolve\test\symlinks.js (Line 1:1 - Line 27:77), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 1:1 - Line 27:3)
var path = require('path');
var fs = require('fs');
var test = require('tape');
var map = require('array.prototype.map');
var resolve = require('../');
var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink');
var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package');
var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a');
var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a');
try {
fs.unlinkSync(symlinkDir);
} catch (err) {}
try {
fs.unlinkSync(packageDir);
} catch (err) {}
try {
fs.unlinkSync(modADir);
} catch (err) {}
try {
fs.unlinkSync(symlinkModADir);
} catch (err) {}
try {
fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir');
} catch (err) {
// if fails then it is probably on Windows and lets try to create a junctionnode_modules\resolve\test\symlinks.js (Line 29:1 - Line 46:2), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 31:1 - Line 48:2)
}
try {
fs.symlinkSync('../../package', packageDir, 'dir');
} catch (err) {
// if fails then it is probably on Windows and lets try to create a junction
fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction');
}
try {
fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir');
} catch (err) {
// if fails then it is probably on Windows and lets try to create a junction
fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction');
}
test('symlink', function (t) {
t.plan(2);
resolve('foo', { basedir: symlinkDir,node_modules\resolve\test\symlinks.js (Line 46:2 - Line 55:2), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 48:2 - Line 57:2)
}, function (err, res, pkg) {
t.error(err);
t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
});
});
test('sync symlink when preserveSymlinks = true', function (t) {
t.plan(4);
resolve('foo', { basedir: symlinkDir }node_modules\resolve\test\symlinks.js (Line 55:2 - Line 82:2), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 57:2 - Line 84:2)
}, function (err, res, pkg) {
t.ok(err, 'there is an error');
t.notOk(res, 'no result');
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
t.equal(
err && err.message,
'Cannot find module \'foo\' from \'' + symlinkDir + '\'',
'can not find nonexistent module'
);
});
});
test('sync symlink', function (t) {
var start = new Date();
t.doesNotThrow(function () {
t.equal(
resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }),
path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')
);
});
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();
});
test('sync symlink when preserveSymlinks = true', function (t) {
t.throws(function () {
resolve.sync('foo', { basedir: symlinkDir }node_modules\resolve\test\symlinks.js (Line 82:2 - Line 111:9), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 84:2 - Line 113:2)
});
}, /Cannot find module 'foo'/);
t.end();
});
test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false });
t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
t.end();
});
test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
t.plan(2);
var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) {
t.notOk(err, 'no error');
t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
});
});
test('packageFilter', function (t) {
function relative(x) {
return path.relative(__dirname, x);
}
function testPackageFilter(preserveSymlinks) {
return function (st) {
st.plan('is 1.x'node_modules\resolve\test\symlinks.js (Line 141:13 - Line 176:2), node_modules\eslint-plugin-react\node_modules\resolve\test\symlinks.js (Line 140:13 - Line 175:2)
var asyncPackageFilterPath = [];
resolve(
'mod-a',
{
basedir: destDir,
preserveSymlinks: preserveSymlinks,
packageFilter: function (pkg, pkgfile) {
asyncPackageFilterPath.push(pkgfile);
}
},
function (err, actualPath) {
st.error(err, 'no error');
st.equal(
relative(actualPath),
path.normalize(preserveSymlinks ? destMain : sourceMain),
'async: actual path is correct'
);
st.deepEqual(
map(asyncPackageFilterPath, relative),
map(
preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg],
path.normalize
),
'async: packageFilter pkgfile arg is correct'
);
}
);
};
}
t.test('preserveSymlinks: false', testPackageFilter(false));
t.test('preserveSymlinks: true', testPackageFilter(true));
t.end();
});node_modules\resolve\test\subdirs.js (Line 1:1 - Line 13:2), node_modules\eslint-plugin-react\node_modules\resolve\test\subdirs.js (Line 1:1 - Line 13:2)
var test = require('tape');
var resolve = require('../');
var path = require('path');
test('subdirs', function (t) {
t.plan(2);
var dir = path.join(__dirname, '/subdirs');
resolve('a/b/c/x.json', { basedir: dir }, function (err, res) {
t.ifError(err);
t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json'));
});
});node_modules\resolve\test\shadowed_core.js (Line 1:1 - Line 54:2), node_modules\eslint-plugin-react\node_modules\resolve\test\shadowed_core.js (Line 1:1 - Line 54:2)
var test = require('tape');
var resolve = require('../');
var path = require('path');
test('shadowed core modules still return core module', function (t) {
t.plan(2);
resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
t.ifError(err);
t.equal(res, 'util');
});
});
test('shadowed core modules still return core module [sync]', function (t) {
t.plan(1);
var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') });
t.equal(res, 'util');
});
test('shadowed core modules return shadow when appending `/`', function (t) {
t.plan(2);
resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
t.ifError(err);
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
});
});
test('shadowed core modules return shadow when appending `/` [sync]', function (t) {
t.plan(1);
var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') });
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
});
test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) {
t.plan(2);
resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) {
t.ifError(err);
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
});
});
test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) {
t.plan(1);
var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false });
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
});node_modules\resolve\test\resolver_sync.js (Line 1:1 - Line 323:19), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 1:1 - Line 323:25)
var path = require('path');
var fs = require('fs');
var test = require('tape');
var resolve = require('../');
var sync = require('../sync');
var requireResolveSupportsPaths = require.resolve.length > 1
&& !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794
var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version);
// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113
test('`./sync` entry point', function (t) {
t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`');
t.end();
});
test('foo', function (t) {
var dir = path.join(__dirname, 'resolver');
t.equal(
resolve.sync('./foo', { basedir: dir }),
path.join(dir, 'foo.js'),
'./foo'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./foo', { basedir: dir }),
require.resolve('./foo', { paths: [dir] }),
'./foo: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync('./foo.js', { basedir: dir }),
path.join(dir, 'foo.js'),
'./foo.js'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./foo.js', { basedir: dir }),
require.resolve('./foo.js', { paths: [dir] }),
'./foo.js: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }),
path.join(dir, 'foo.js')
);
t.throws(function () {
resolve.sync('foo', { basedir: dir });
});
// Test that filename is reported as the "from" value when passed.
t.throws(
function () {
resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') });
},
{
name: 'Error',
message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'"
}
);
t.end();
});
test('bar', function (t) {
var dir = path.join(__dirname, 'resolver');
var basedir = path.join(dir, 'bar');
t.equal(
resolve.sync('foo', { basedir: basedir }),
path.join(dir, 'bar/node_modules/foo/index.js'),
'foo in bar'
);
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
t.equal(
resolve.sync('foo', { basedir: basedir }),
require.resolve('foo', { paths: [basedir] }),
'foo in bar: resolve.sync === require.resolve'
);
}
t.end();
});
test('baz', function (t) {
var dir = path.join(__dirname, 'resolver');
t.equal(
resolve.sync('./baz', { basedir: dir }),
path.join(dir, 'baz/quux.js'),
'./baz'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./baz', { basedir: dir }),
require.resolve('./baz', { paths: [dir] }),
'./baz: resolve.sync === require.resolve'
);
}
t.end();
});
test('biz', function (t) {
var dir = path.join(__dirname, 'resolver/biz/node_modules');
t.equal(
resolve.sync('./grux', { basedir: dir }),
path.join(dir, 'grux/index.js')
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./grux', { basedir: dir }),
require.resolve('./grux', { paths: [dir] }),
'./grux: resolve.sync === require.resolve'
);
}
var tivDir = path.join(dir, 'grux');
t.equal(
resolve.sync('tiv', { basedir: tivDir }),
path.join(dir, 'tiv/index.js')
);
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
t.equal(
resolve.sync('tiv', { basedir: tivDir }),
require.resolve('tiv', { paths: [tivDir] }),
'tiv: resolve.sync === require.resolve'
);
}
var gruxDir = path.join(dir, 'tiv');
t.equal(
resolve.sync('grux', { basedir: gruxDir }),
path.join(dir, 'grux/index.js')
);
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
t.equal(
resolve.sync('grux', { basedir: gruxDir }),
require.resolve('grux', { paths: [gruxDir] }),
'grux: resolve.sync === require.resolve'
);
}
t.end();
});
test('normalize', function (t) {
var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
t.equal(
resolve.sync('../grux', { basedir: dir }),
path.join(dir, 'index.js')
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('../grux', { basedir: dir }),
require.resolve('../grux', { paths: [dir] }),
'../grux: resolve.sync === require.resolve'
);
}
t.end();
});
test('cup', function (t) {
var dir = path.join(__dirname, 'resolver');
t.equal(
resolve.sync('./cup', {
basedir: dir,
extensions: ['.js', '.coffee']
}),
path.join(dir, 'cup.coffee'),
'./cup -> ./cup.coffee'
);
t.equal(
resolve.sync('./cup.coffee', { basedir: dir }),
path.join(dir, 'cup.coffee'),
'./cup.coffee'
);
t.throws(function () {
resolve.sync('./cup', {
basedir: dir,
extensions: ['.js']
});
});
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }),
require.resolve('./cup.coffee', { paths: [dir] }),
'./cup.coffee: resolve.sync === require.resolve'
);
}
t.end();
});
test('mug', function (t) {
var dir = path.join(__dirname, 'resolver');
t.equal(
resolve.sync('./mug', { basedir: dir }),
path.join(dir, 'mug.js'),
'./mug -> ./mug.js'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./mug', { basedir: dir }),
require.resolve('./mug', { paths: [dir] }),
'./mug: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync('./mug', {
basedir: dir,
extensions: ['.coffee', '.js']
}),
path.join(dir, 'mug.coffee'),
'./mug -> ./mug.coffee'
);
t.equal(
resolve.sync('./mug', {
basedir: dir,
extensions: ['.js', '.coffee']
}),
path.join(dir, 'mug.js'),
'./mug -> ./mug.js'
);
t.end();
});
test('other path', function (t) {
var resolverDir = path.join(__dirname, 'resolver');
var dir = path.join(resolverDir, 'bar');
var otherDir = path.join(resolverDir, 'other_path');
t.equal(
resolve.sync('root', {
basedir: dir,
paths: [otherDir]
}),
path.join(resolverDir, 'other_path/root.js')
);
t.equal(
resolve.sync('lib/other-lib', {
basedir: dir,
paths: [otherDir]
}),
path.join(resolverDir, 'other_path/lib/other-lib.js')
);
t.throws(function () {
resolve.sync('root', { basedir: dir });
});
t.throws(function () {
resolve.sync('zzz', {
basedir: dir,
paths: [otherDir]
});
});
t.end();
});
test('path iterator', function (t) {
var resolverDir = path.join(__dirname, 'resolver');
var exactIterator = function (x, start, getPackageCandidates, opts) {
return [path.join(resolverDir, x)];
};
t.equal(
resolve.sync('baz', { packageIterator: exactIterator }),
path.join(resolverDir, 'baz/quux.js')
);
t.end();
});
test('incorrect main', function (t) {
var resolverDir = path.join(__dirname, 'resolver');
var dir = path.join(resolverDir, 'incorrect_main');
t.equal(
resolve.sync('./incorrect_main', { basedir: resolverDir }),
path.join(dir, 'index.js')
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./incorrect_main', { basedir: resolverDir }),
require.resolve('./incorrect_main', { paths: [resolverDir] }),
'./incorrect_main: resolve.sync === require.resolve'
);
}
t.end();
});
test('missing index', function (t) {
t.plan(requireResolveSupportsPaths ? 2 : 1);
var resolverDir = path.join(__dirname, 'resolver');
try {
resolve.sync('./missing_index', { basedir: resolverDir });
t.fail('did not fail');
} catch (err) {
t.equal(err && err.code, 'MODULE_NOT_FOUND'node_modules\resolve\test\resolver_sync.js (Line 323:19 - Line 338:4), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 323:25 - Line 337:4)
, 'error has correct error code');
}
if (requireResolveSupportsPaths) {
try {
require.resolve('./missing_index', { basedir: resolverDir });
t.fail('require.resolve did not fail');
} catch (err) {
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
}
}
});
test('missing main', function (t) {
var resolverDir = path.join(__dirname, 'resolver');
trynode_modules\resolve\test\resolver_sync.js (Line 372:5 - Line 569:24), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 368:5 - Line 565:21)
}
t.end();
});
test('main: false', function (t) {
var basedir = path.join(__dirname, 'resolver');
var dir = path.join(basedir, 'false_main');
t.equal(
resolve.sync('./false_main', { basedir: basedir }),
path.join(dir, 'index.js'),
'`"main": false`: resolves to `index.js`'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./false_main', { basedir: basedir }),
require.resolve('./false_main', { paths: [basedir] }),
'`"main": false`: resolve.sync === require.resolve'
);
}
t.end();
});
var stubStatSync = function stubStatSync(fn) {
var statSync = fs.statSync;
try {
fs.statSync = function () {
throw new EvalError('Unknown Error');
};
return fn();
} finally {
fs.statSync = statSync;
}
};
test('#79 - re-throw non ENOENT errors from stat', function (t) {
var dir = path.join(__dirname, 'resolver');
stubStatSync(function () {
t.throws(function () {
resolve.sync('foo', { basedir: dir });
}, /Unknown Error/);
});
t.end();
});
test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
var dir = path.join(__dirname, 'resolver');
var basedir = path.join(dir, 'same_names');
t.equal(
resolve.sync('./foo', { basedir: basedir }),
path.join(dir, 'same_names/foo.js')
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./foo', { basedir: basedir }),
require.resolve('./foo', { paths: [basedir] }),
'./foo: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync('./foo/', { basedir: basedir }),
path.join(dir, 'same_names/foo/index.js')
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./foo/', { basedir: basedir }),
require.resolve('./foo/', { paths: [basedir] }),
'./foo/: resolve.sync === require.resolve'
);
}
t.end();
});
test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
var dir = path.join(__dirname, 'resolver');
var basedir = path.join(dir, 'same_names/foo');
t.equal(
resolve.sync('./', { basedir: basedir }),
path.join(dir, 'same_names/foo/index.js'),
'./'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./', { basedir: basedir }),
require.resolve('./', { paths: [basedir] }),
'./: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync('.', { basedir: basedir }),
path.join(dir, 'same_names/foo/index.js'),
'.'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('.', { basedir: basedir }),
require.resolve('.', { paths: [basedir] }),
'.: resolve.sync === require.resolve',
{ todo: true }
);
}
t.end();
});
test('sync: #121 - treating an existing file as a dir when no basedir', function (t) {
var testFile = path.basename(__filename);
t.test('sanity check', function (st) {
st.equal(
resolve.sync('./' + testFile),
__filename,
'sanity check'
);
st.equal(
resolve.sync('./' + testFile),
require.resolve('./' + testFile),
'sanity check: resolve.sync === require.resolve'
);
st.end();
});
t.test('with a fake directory', function (st) {
function run() { return resolve.sync('./' + testFile + '/blah'); }
st.throws(run, 'throws an error');
try {
run();
} catch (e) {
st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
st.equal(
e.message,
'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
'can not find nonexistent module'
);
}
st.end();
});
t.end();
});
test('sync dot main', function (t) {
var start = new Date();
t.equal(
resolve.sync('./resolver/dot_main'),
path.join(__dirname, 'resolver/dot_main/index.js'),
'./resolver/dot_main'
);
t.equal(
resolve.sync('./resolver/dot_main'),
require.resolve('./resolver/dot_main'),
'./resolver/dot_main: resolve.sync === require.resolve'
);
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();
});
test('sync dot slash main', function (t) {
var start = new Date();
t.equal(
resolve.sync('./resolver/dot_slash_main'),
path.join(__dirname, 'resolver/dot_slash_main/index.js')
);
t.equal(
resolve.sync('./resolver/dot_slash_main'),
require.resolve('./resolver/dot_slash_main'),
'./resolver/dot_slash_main: resolve.sync === require.resolve'
);
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();
});
test('not a directory', function (t) {
var path = './foo';
try {
resolve.sync(path, { basedir: __filename });
t.fail();
} catch (err) {
t.ok(err, 'a non-directory errors');
t.equal(err && err.message, 'Cannot find module \''node_modules\resolve\test\resolver_sync.js (Line 570:19 - Line 720:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver_sync.js (Line 566:18 - Line 716:6)
);
}
t.end();
});
test('non-string "main" field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
try {
var result = resolve.sync('./invalid_main', { basedir: dir });
t.equal(result, undefined, 'result should not exist');
t.fail('should not get here');
} catch (err) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
}
t.end();
});
test('non-string "main" field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
try {
var result = resolve.sync('./invalid_main', { basedir: dir });
t.equal(result, undefined, 'result should not exist');
t.fail('should not get here');
} catch (err) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
}
t.end();
});
test('browser field in package.json', function (t) {
var dir = path.join(__dirname, 'resolver');
var res = resolve.sync('./browser_field', {
basedir: dir,
packageFilter: function packageFilter(pkg) {
if (pkg.browser) {
pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
delete pkg.browser; // eslint-disable-line no-param-reassign
}
return pkg;
}
});
t.equal(res, path.join(dir, 'browser_field', 'b.js'));
t.end();
});
test('absolute paths', function (t) {
var extensionless = __filename.slice(0, -path.extname(__filename).length);
t.equal(
resolve.sync(__filename),
__filename,
'absolute path to this file resolves'
);
t.equal(
resolve.sync(__filename),
require.resolve(__filename),
'absolute path to this file: resolve.sync === require.resolve'
);
t.equal(
resolve.sync(extensionless),
__filename,
'extensionless absolute path to this file resolves'
);
t.equal(
resolve.sync(__filename),
require.resolve(__filename),
'absolute path to this file: resolve.sync === require.resolve'
);
t.equal(
resolve.sync(__filename, { basedir: process.cwd() }),
__filename,
'absolute path to this file with a basedir resolves'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync(__filename, { basedir: process.cwd() }),
require.resolve(__filename, { paths: [process.cwd()] }),
'absolute path to this file + basedir: resolve.sync === require.resolve'
);
}
t.equal(
resolve.sync(extensionless, { basedir: process.cwd() }),
__filename,
'extensionless absolute path to this file with a basedir resolves'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync(extensionless, { basedir: process.cwd() }),
require.resolve(extensionless, { paths: [process.cwd()] }),
'extensionless absolute path to this file + basedir: resolve.sync === require.resolve'
);
}
t.end();
});
var malformedDir = path.join(__dirname, 'resolver/malformed_package_json');
test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) {
t.plan(5 + (requireResolveSupportsPaths ? 1 : 0));
var basedir = malformedDir;
var expected = path.join(basedir, 'index.js');
t.equal(
resolve.sync('./index.js', { basedir: basedir }),
expected,
'malformed package.json is silently ignored'
);
if (requireResolveSupportsPaths) {
t.equal(
resolve.sync('./index.js', { basedir: basedir }),
require.resolve('./index.js', { paths: [basedir] }),
'malformed package.json: resolve.sync === require.resolve'
);
}
var res1 = resolve.sync(
'./index.js',
{
basedir: basedir,
packageFilter: function (pkg, pkgfile, dir) {
t.fail('should not reach here');
}
}
);
t.equal(
res1,
expected,
'with packageFilter: malformed package.json is silently ignored'
);
var res2 = resolve.sync(
'./index.js',
{
basedir: basedir,
readPackageSync: function (readFileSync, pkgfile) {
t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path');
var result = String(readFileSync(pkgfile));
try {
return JSON.parse(result);
} catch (e) {
t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error');
}node_modules\resolve\test\resolver.js (Line 1:1 - Line 282:17), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 1:1 - Line 282:13)
var path = require('path');
var fs = require('fs');
var test = require('tape');
var resolve = require('../');
var async = require('../async');
test('`./async` entry point', function (t) {
t.equal(resolve, async, '`./async` entry point is the same as `main`');
t.end();
});
test('async foo', function (t) {
t.plan(12);
var dir = path.join(__dirname, 'resolver');
resolve('./foo', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
t.equal(pkg && pkg.name, 'resolve');
});
resolve('./foo.js', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
t.equal(pkg && pkg.name, 'resolve');
});
resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
t.equal(pkg && pkg.main, 'resolver');
});
resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
t.equal(pkg.main, 'resolver');
});
resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo.js'));
});
resolve('foo', { basedir: dir }, function (err) {
t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
// Test that filename is reported as the "from" value when passed.
resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) {
t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'");
});
});
test('bar', function (t) {
t.plan(6);
var dir = path.join(__dirname, 'resolver');
resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
t.equal(pkg, undefined);
});
resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
t.equal(pkg, undefined);
});
resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
t.equal(pkg.main, 'bar');
});
});
test('baz', function (t) {
t.plan(4);
var dir = path.join(__dirname, 'resolver');
resolve('./baz', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'baz/quux.js'));
t.equal(pkg.main, 'quux.js');
});
resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'baz/quux.js'));
t.equal(pkg.main, 'quux.js');
});
});
test('biz', function (t) {
t.plan(24);
var dir = path.join(__dirname, 'resolver/biz/node_modules');
resolve('./grux', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'grux/index.js'));
t.equal(pkg, undefined);
});
resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'grux/index.js'));
t.equal(pkg.main, 'biz');
});
resolve('./garply', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'tiv/index.js'));
t.equal(pkg, undefined);
});
resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'tiv/index.js'));
t.equal(pkg.main, 'grux');
});
resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'tiv/index.js'));
t.equal(pkg, undefined);
});
resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'tiv/index.js'));
t.equal(pkg.main, './lib');
});
resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'grux/index.js'));
t.equal(pkg, undefined);
});
resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'grux/index.js'));
t.equal(pkg.main, 'tiv');
});
resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'garply/lib/index.js'));
t.equal(pkg.main, './lib');
});
});
test('quux', function (t) {
t.plan(2);
var dir = path.join(__dirname, 'resolver/quux');
resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'foo/index.js'));
t.equal(pkg.main, 'quux');
});
});
test('normalize', function (t) {
t.plan(2);
var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
resolve('../grux', { basedir: dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'index.js'));
t.equal(pkg, undefined);
});
});
test('cup', function (t) {
t.plan(5);
var dir = path.join(__dirname, 'resolver');
resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'cup.coffee'));
});
resolve('./cup.coffee', { basedir: dir }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'cup.coffee'));
});
resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) {
t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
// Test that filename is reported as the "from" value when passed.
resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) {
t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'");
});
});
test('mug', function (t) {
t.plan(3);
var dir = path.join(__dirname, 'resolver');
resolve('./mug', { basedir: dir }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'mug.js'));
});
resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(dir, '/mug.coffee'));
});
resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
t.equal(res, path.join(dir, '/mug.js'));
});
});
test('other path', function (t) {
t.plan(6);
var resolverDir = path.join(__dirname, 'resolver');
var dir = path.join(resolverDir, 'bar');
var otherDir = path.join(resolverDir, 'other_path');
resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(resolverDir, 'other_path/root.js'));
});
resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) {
if (err) t.fail(err);
t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js'));
});
resolve('root', { basedir: dir }, function (err, res) {
t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) {
t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
});
test('path iterator', function (t) {
t.plan(2);
var resolverDir = path.join(__dirname, 'resolver');
var exactIterator = function (x, start, getPackageCandidates, opts) {
return [path.join(resolverDir, x)];
};
resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(resolverDir, 'baz/quux.js'));
t.equal(pkg && pkg.name, 'baz');
});
});
test('incorrect main'node_modules\resolve\test\resolver.js (Line 278:6 - Line 300:19), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 290:2 - Line 312:25)
);
});
});
test('incorrect main', function (t) {
t.plan(1);
var resolverDir = path.join(__dirname, 'resolver');
var dir = path.join(resolverDir, 'incorrect_main');
resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'index.js'));
});
});
test('missing index', function (t) {
t.plan(2);
var resolverDir = path.join(__dirname, 'resolver');
resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) {
t.ok(err instanceof Error);
t.equal(err && err.code, 'MODULE_NOT_FOUND'node_modules\resolve\test\resolver.js (Line 320:31 - Line 452:24), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 336:2 - Line 468:21)
);
});
});
test('main: false', function (t) {
t.plan(2);
var basedir = path.join(__dirname, 'resolver');
var dir = path.join(basedir, 'false_main');
resolve('./false_main', { basedir: basedir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(
res,
path.join(dir, 'index.js'),
'`"main": false`: resolves to `index.js`'
);
t.deepEqual(pkg, {
name: 'false_main',
main: false
});
});
});
test('without basedir', function (t) {
t.plan(1);
var dir = path.join(__dirname, 'resolver/without_basedir');
var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require
tester(t, function (err, res, pkg) {
if (err) {
t.fail(err);
} else {
t.equal(res, path.join(dir, 'node_modules/mymodule.js'));
}
});
});
test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
t.plan(2);
var dir = path.join(__dirname, 'resolver');
resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'same_names/foo.js'));
});
resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'same_names/foo/index.js'));
});
});
test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
t.plan(2);
var dir = path.join(__dirname, 'resolver');
resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'same_names/foo/index.js'));
});
resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'same_names/foo/index.js'));
});
});
test('async: #121 - treating an existing file as a dir when no basedir', function (t) {
var testFile = path.basename(__filename);
t.test('sanity check', function (st) {
st.plan(1);
resolve('./' + testFile, function (err, res, pkg) {
if (err) t.fail(err);
st.equal(res, __filename, 'sanity check');
});
});
t.test('with a fake directory', function (st) {
st.plan(4);
resolve('./' + testFile + '/blah', function (err, res, pkg) {
st.ok(err, 'there is an error');
st.notOk(res, 'no result');
st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
st.equal(
err && err.message,
'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
'can not find nonexistent module'
);
st.end();
});
});
t.end();
});
test('async dot main', function (t) {
var start = new Date();
t.plan(3);
resolve('./resolver/dot_main', function (err, ret) {
t.notOk(err);
t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js'));
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();
});
});
test('async dot slash main', function (t) {
var start = new Date();
t.plan(3);
resolve('./resolver/dot_slash_main', function (err, ret) {
t.notOk(err);
t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js'));
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();
});
});
test('not a directory', function (t) {
t.plan(6);
var path = './foo';
resolve(path, { basedir: __filename }, function (err, res, pkg) {
t.ok(err, 'a non-directory errors');
t.equal(arguments.length, 1);
t.equal(res, undefined);
t.equal(pkg, undefined);
t.equal(err && err.message, 'Cannot find module \''node_modules\resolve\test\resolver.js (Line 453:19 - Line 586:5), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 469:18 - Line 602:2)
);
});
});
test('non-string "main" field in package.json', function (t) {
t.plan(5);
var dir = path.join(__dirname, 'resolver');
resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
t.equal(res, undefined, 'res is undefined');
t.equal(pkg, undefined, 'pkg is undefined');
});
});
test('non-string "main" field in package.json', function (t) {
t.plan(5);
var dir = path.join(__dirname, 'resolver');
resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
t.ok(err, 'errors on non-string main');
t.equal(err.message, 'package “invalid_main” `main` must be a string');
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
t.equal(res, undefined, 'res is undefined');
t.equal(pkg, undefined, 'pkg is undefined');
});
});
test('browser field in package.json', function (t) {
t.plan(3);
var dir = path.join(__dirname, 'resolver');
resolve(
'./browser_field',
{
basedir: dir,
packageFilter: function packageFilter(pkg) {
if (pkg.browser) {
pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
delete pkg.browser; // eslint-disable-line no-param-reassign
}
return pkg;
}
},
function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'browser_field', 'b.js'));
t.equal(pkg && pkg.main, 'b');
t.equal(pkg && pkg.browser, undefined);
}
);
});
test('absolute paths', function (t) {
t.plan(4);
var extensionless = __filename.slice(0, -path.extname(__filename).length);
resolve(__filename, function (err, res) {
t.equal(
res,
__filename,
'absolute path to this file resolves'
);
});
resolve(extensionless, function (err, res) {
t.equal(
res,
__filename,
'extensionless absolute path to this file resolves'
);
});
resolve(__filename, { basedir: process.cwd() }, function (err, res) {
t.equal(
res,
__filename,
'absolute path to this file with a basedir resolves'
);
});
resolve(extensionless, { basedir: process.cwd() }, function (err, res) {
t.equal(
res,
__filename,
'extensionless absolute path to this file with a basedir resolves'
);
});
});
var malformedDir = path.join(__dirname, 'resolver/malformed_package_json');
test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) {
/* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */
t.plan(
(3 * 3) // 3 sets of 3 assertions in the final callback
+ 2 // 1 readPackage call with malformed package.json
);
var basedir = malformedDir;
var expected = path.join(basedir, 'index.js');
resolve('./index.js', { basedir: basedir }, function (err, res, pkg) {
t.error(err, 'no error');
t.equal(res, expected, 'malformed package.json is silently ignored');
t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument');
});
resolve(
'./index.js',
{
basedir: basedir,
packageFilter: function (pkg, pkgfile, dir) {
t.fail('should not reach here');
}
},
function (err, res, pkg) {
t.error(err, 'with packageFilter: no error');
t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored');
t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument');
}
);
resolve(
'./index.js',
{
basedir: basedir,
readPackage: function (readFile, pkgfile, cb) {
t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path');
readFile(pkgfile, function (err, result) {
try {
cb(null, JSON.parse(result));
} catch (e) {
t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error');
cb(nullnode_modules\resolve\test\resolver.js (Line 586:5 - Line 597:2), node_modules\eslint-plugin-react\node_modules\resolve\test\resolver.js (Line 602:2 - Line 613:2)
);
}
});
}
},
function (err, res, pkg) {
t.error(err, 'with readPackage: no error');
t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored');
t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument');
}
);
});node_modules\resolve\test\precedence.js (Line 1:1 - Line 23:2), node_modules\eslint-plugin-react\node_modules\resolve\test\precedence.js (Line 1:1 - Line 23:2)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('precedence', function (t) {
t.plan(3);
var dir = path.join(__dirname, 'precedence/aaa');
resolve('./', { basedir: dir }, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, 'index.js'));
t.equal(pkg.name, 'resolve');
});
});
test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
t.plan(1);
var dir = path.join(__dirname, 'precedence/bbb');
resolve('./', { basedir: dir }, function (err, res, pkg) {
t.ok(err);
});
});node_modules\resolve\test\pathfilter.js (Line 1:1 - Line 75:2), node_modules\eslint-plugin-react\node_modules\resolve\test\pathfilter.js (Line 1:1 - Line 75:2)
var path = require('path');
var test = require('tape');
var resolve = require('../');
var resolverDir = path.join(__dirname, '/pathfilter/deep_ref');
var pathFilterFactory = function (t) {
return function (pkg, x, remainder) {
t.equal(pkg.version, '1.2.3');
t.equal(x, path.join(resolverDir, 'node_modules/deep/ref'));
t.equal(remainder, 'ref');
return 'alt';
};
};
test('#62: deep module references and the pathFilter', function (t) {
t.test('deep/ref.js', function (st) {
st.plan(3);
resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) {
if (err) st.fail(err);
st.equal(pkg.version, '1.2.3');
st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
});
var res = resolve.sync('deep/ref', { basedir: resolverDir });
st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
});
t.test('deep/deeper/ref', function (st) {
st.plan(4);
resolve(
'deep/deeper/ref',
{ basedir: resolverDir },
function (err, res, pkg) {
if (err) t.fail(err);
st.notEqual(pkg, undefined);
st.equal(pkg.version, '1.2.3');
st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
}
);
var res = resolve.sync(
'deep/deeper/ref',
{ basedir: resolverDir }
);
st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
});
t.test('deep/ref alt', function (st) {
st.plan(8);
var pathFilter = pathFilterFactory(st);
var res = resolve.sync(
'deep/ref',
{ basedir: resolverDir, pathFilter: pathFilter }
);
st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
resolve(
'deep/ref',
{ basedir: resolverDir, pathFilter: pathFilter },
function (err, res, pkg) {
if (err) st.fail(err);
st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
st.end();
}
);
});
t.end();
});node_modules\resolve\test\nonstring.js (Line 1:1 - Line 9:2), node_modules\eslint-plugin-react\node_modules\resolve\test\nonstring.js (Line 1:1 - Line 9:2)
var test = require('tape');
var resolve = require('../');
test('nonstring', function (t) {
t.plan(1);
resolve(555, function (err, res, pkg) {
t.ok(err);
});
});node_modules\resolve\test\node_path.js (Line 1:1 - Line 70:2), node_modules\eslint-plugin-react\node_modules\resolve\test\node_path.js (Line 1:1 - Line 70:2)
var fs = require('fs');
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('$NODE_PATH', function (t) {
t.plan(8);
var isDir = function (dir, cb) {
if (dir === '/node_path' || dir === 'node_path/x') {
return cb(null, true);
}
fs.stat(dir, function (err, stat) {
if (!err) {
return cb(null, stat.isDirectory());
}
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
return cb(err);
});
};
resolve('aaa', {
paths: [
path.join(__dirname, '/node_path/x'),
path.join(__dirname, '/node_path/y')
],
basedir: __dirname,
isDirectory: isDir
}, function (err, res) {
t.error(err);
t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves');
});
resolve('bbb', {
paths: [
path.join(__dirname, '/node_path/x'),
path.join(__dirname, '/node_path/y')
],
basedir: __dirname,
isDirectory: isDir
}, function (err, res) {
t.error(err);
t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves');
});
resolve('ccc', {
paths: [
path.join(__dirname, '/node_path/x'),
path.join(__dirname, '/node_path/y')
],
basedir: __dirname,
isDirectory: isDir
}, function (err, res) {
t.error(err);
t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves');
});
// ensure that relative paths still resolve against the regular `node_modules` correctly
resolve('tap', {
paths: [
'node_path'
],
basedir: path.join(__dirname, 'node_path/x'),
isDirectory: isDir
}, function (err, res) {
var root = require('tap/package.json').main; // eslint-disable-line global-require
t.error(err);
t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
});
});node_modules\resolve\test\node-modules-paths.js (Line 1:1 - Line 143:2), node_modules\eslint-plugin-react\node_modules\resolve\test\node-modules-paths.js (Line 1:1 - Line 143:2)
var test = require('tape');
var path = require('path');
var parse = path.parse || require('path-parse');
var keys = require('object-keys');
var nodeModulesPaths = require('../lib/node-modules-paths');
var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) {
var moduleDirs = [].concat(moduleDirectories || 'node_modules');
if (paths) {
for (var k = 0; k < paths.length; ++k) {
moduleDirs.push(path.basename(paths[k]));
}
}
var foundModuleDirs = {};
var uniqueDirs = {};
var parsedDirs = {};
for (var i = 0; i < dirs.length; ++i) {
var parsed = parse(dirs[i]);
if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; }
foundModuleDirs[parsed.base] += 1;
parsedDirs[parsed.dir] = true;
uniqueDirs[dirs[i]] = true;
}
t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has');
var foundModuleDirNames = keys(foundModuleDirs);
t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found');
t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique');
var counts = {};
for (var j = 0; j < foundModuleDirNames.length; ++j) {
counts[foundModuleDirs[j]] = true;
}
t.equal(keys(counts).length, 1, 'all found module directories had the same count');
};
test('node-modules-paths', function (t) {
t.test('no options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start);
verifyDirs(t, start, dirs);
t.end();
});
t.test('empty options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, {});
verifyDirs(t, start, dirs);
t.end();
});
t.test('with paths=array option', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var dirs = nodeModulesPaths(start, { paths: paths });
verifyDirs(t, start, dirs, null, paths);
t.end();
});
t.test('with paths=function option', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request));
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg');
verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]);
t.end();
});
t.test('with paths=function skipping node modules resolution', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return [];
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths });
t.deepEqual(dirs, [], 'no node_modules was computed');
t.end();
});
t.test('with moduleDirectory option', function (t) {
var start = path.join(__dirname, 'resolver');
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory);
t.end();
});
t.test('with 1 moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory, paths);
t.end();
});
t.test('with 1+ moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectories = ['not node modules', 'other modules'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
verifyDirs(t, start, dirs, moduleDirectories, paths);
t.end();
});
t.test('combine paths correctly on Windows', function (t) {
var start = 'C:\\Users\\username\\myProject\\src';
var paths = [];
var moduleDirectories = ['node_modules', start];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) {
var start = '/Users/username/git/myProject/src';
var paths = [];
var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
});node_modules\resolve\test\module_dir.js (Line 1:1 - Line 56:2), node_modules\eslint-plugin-react\node_modules\resolve\test\module_dir.js (Line 1:1 - Line 56:2)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('moduleDirectory strings', function (t) {
t.plan(4);
var dir = path.join(__dirname, 'module_dir');
var xopts = {
basedir: dir,
moduleDirectory: 'xmodules'
};
resolve('aaa', xopts, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
});
var yopts = {
basedir: dir,
moduleDirectory: 'ymodules'
};
resolve('aaa', yopts, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
});
});
test('moduleDirectory array', function (t) {
t.plan(6);
var dir = path.join(__dirname, 'module_dir');
var aopts = {
basedir: dir,
moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
};
resolve('aaa', aopts, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
});
var bopts = {
basedir: dir,
moduleDirectory: ['zmodules', 'ymodules', 'xmodules']
};
resolve('aaa', bopts, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
});
var copts = {
basedir: dir,
moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
};
resolve('bbb', copts, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, '/zmodules/bbb/main.js'));
});
});node_modules\resolve\test\mock_sync.js (Line 1:1 - Line 14:9), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 1:1 - Line 13:5)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('mock', function (t) {
t.plan(4);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
functionnode_modules\resolve\test\mock_sync.js (Line 6:2 - Line 17:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 6:2 - Line 17:2)
);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file)node_modules\resolve\test\mock_sync.js (Line 12:11 - Line 213:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock_sync.js (Line 13:20 - Line 214:2)
)] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.equal(
resolve.sync('./baz', opts('/foo/bar')),
path.resolve('/foo/bar/baz.js')
);
t.equal(
resolve.sync('./baz.js', opts('/foo/bar')),
path.resolve('/foo/bar/baz.js')
);
t.throws(function () {
resolve.sync('baz', opts('/foo/bar'));
});
t.throws(function () {
resolve.sync('../baz', opts('/foo/bar'));
});
});
test('mock package', function (t) {
t.plan(1);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.equal(
resolve.sync('bar', opts('/foo')),
path.resolve('/foo/node_modules/bar/baz.js')
);
});
test('symlinked', function (t) {
t.plan(2);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
dirs[path.resolve('/foo/bar/symlinked')] = true;
function opts(basedir) {
return {
preserveSymlinks: false,
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
var resolved = path.resolve(file);
if (resolved.indexOf('symlinked') >= 0) {
return resolved;
}
var ext = path.extname(resolved);
if (ext) {
var dir = path.dirname(resolved);
var base = path.basename(resolved);
return path.join(dir, 'symlinked', base);
}
return path.join(resolved, 'symlinked');
}
};
}
t.equal(
resolve.sync('./baz', opts('/foo/bar')),
path.resolve('/foo/bar/symlinked/baz.js')
);
t.equal(
resolve.sync('./baz.js', opts('/foo/bar')),
path.resolve('/foo/bar/symlinked/baz.js')
);
});
test('readPackageSync', function (t) {
t.plan(3);
var files = {};
files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop';
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir, useReadPackage) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: useReadPackage ? null : function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.test('with readFile', function (st) {
st.plan(1);
st.equal(
resolve.sync('bar', opts('/foo')),
path.resolve('/foo/node_modules/bar/baz.js')
);
});
var readPackageSync = function (readFileSync, file) {
if (file.indexOf(path.join('bar', 'package.json')) >= 0) {
return { main: './something-else.js' };
}
return JSON.parse(files[path.resolve(file)]);
};
t.test('with readPackage', function (st) {
st.plan(1);
var options = opts('/foo');
delete options.readFileSync;
options.readPackageSync = readPackageSync;
st.equal(
resolve.sync('bar', options),
path.resolve('/foo/node_modules/bar/something-else.js')
);
});
t.test('with readFile and readPackage', function (st) {
st.plan(1);
var options = opts('/foo');
options.readPackageSync = readPackageSync;
st.throws(
function () { resolve.sync('bar', options); },
TypeError,
'errors when both readFile and readPackage are provided'
);
});
});node_modules\resolve\test\mock.js (Line 1:1 - Line 315:2), node_modules\eslint-plugin-react\node_modules\resolve\test\mock.js (Line 1:1 - Line 315:2)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('mock', function (t) {
t.plan(8);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg, undefined);
});
resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg, undefined);
});
resolve('baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
resolve('../baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
});
test('mock from package', function (t) {
t.plan(8);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, file));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package': { main: 'bar' },
readFile: function (file, cb) {
cb(null, files[file]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg && pkg.main, 'bar');
});
resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/baz.js'));
t.equal(pkg && pkg.main, 'bar');
});
resolve('baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
resolve('../baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
t.equal(err.code, 'MODULE_NOT_FOUND');
});
});
test('mock package', function (t) {
t.plan(2);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('bar', opts('/foo'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
t.equal(pkg && pkg.main, './baz.js');
});
});
test('mock package from package', function (t) {
t.plan(2);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package': { main: 'bar' },
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
resolve('bar', opts('/foo'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
t.equal(pkg && pkg.main, './baz.js');
});
});
test('symlinked', function (t) {
t.plan(4);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
dirs[path.resolve('/foo/bar/symlinked')] = true;
function opts(basedir) {
return {
preserveSymlinks: false,
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
var resolved = path.resolve(file);
if (resolved.indexOf('symlinked') >= 0) {
cb(null, resolved);
return;
}
var ext = path.extname(resolved);
if (ext) {
var dir = path.dirname(resolved);
var base = path.basename(resolved);
cb(null, path.join(dir, 'symlinked', base));
} else {
cb(null, path.join(resolved, 'symlinked'));
}
}
};
}
resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
t.equal(pkg, undefined);
});
resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
if (err) return t.fail(err);
t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
t.equal(pkg, undefined);
});
});
test('readPackage', function (t) {
t.plan(3);
var files = {};
files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop';
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file, cb) {
cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
},
isDirectory: function (dir, cb) {
cb(null, !!dirs[path.resolve(dir)]);
},
'package': { main: 'bar' },
readFile: function (file, cb) {
cb(null, files[path.resolve(file)]);
},
realpath: function (file, cb) {
cb(null, file);
}
};
}
t.test('with readFile', function (st) {
st.plan(3);
resolve('bar', opts('/foo'), function (err, res, pkg) {
st.error(err);
st.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
st.equal(pkg && pkg.main, './baz.js');
});
});
var readPackage = function (readFile, file, cb) {
var barPackage = path.join('bar', 'package.json');
if (file.slice(-barPackage.length) === barPackage) {
cb(null, { main: './something-else.js' });
} else {
cb(null, JSON.parse(files[path.resolve(file)]));
}
};
t.test('with readPackage', function (st) {
st.plan(3);
var options = opts('/foo');
delete options.readFile;
options.readPackage = readPackage;
resolve('bar', options, function (err, res, pkg) {
st.error(err);
st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js'));
st.equal(pkg && pkg.main, './something-else.js');
});
});
t.test('with readFile and readPackage', function (st) {
st.plan(1);
var options = opts('/foo');
options.readPackage = readPackage;
resolve('bar', options, function (err) {
st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided');
});
});
});node_modules\resolve\test\home_paths_sync.js (Line 1:1 - Line 114:2), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 1:1 - Line 114:2)
'use strict';
var fs = require('fs');
var homedir = require('../lib/homedir');
var path = require('path');
var test = require('tape');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var mv = require('mv');
var copyDir = require('copy-dir');
var tmp = require('tmp');
var HOME = homedir();
var hnm = path.join(HOME, '.node_modules');
var hnl = path.join(HOME, '.node_libraries');
var resolve = require('../sync');
function makeDir(t, dir, cb) {
mkdirp(dir, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function cleanup() {
rimraf.sync(dir);
});
cb();
}
});
}
function makeTempDir(t, dir, cb) {
if (fs.existsSync(dir)) {
var tmpResult = tmp.dirSync();
t.teardown(tmpResult.removeCallback);
var backup = path.join(tmpResult.name, path.basename(dir));
mv(dir, backup, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function () {
mv(backup, dir, cb);
});
makeDir(t, dir, cb);
}
});
} else {
makeDir(t, dir, cb);
}
}
test('homedir module paths', function (t) {
t.plan(7);
makeTempDir(t, hnm, function (err) {
t.error(err, 'no error with HNM temp dir');
if (err) {
return t.end();
}
var bazHNMDir = path.join(hnm, 'baz');
var dotMainDir = path.join(hnm, 'dot_main');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir);
copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir);
var bazHNMmain = path.join(bazHNMDir, 'quux.js');
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
var dotMainMain = path.join(dotMainDir, 'index.js');
t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`');
makeTempDir(t, hnl, function (err) {
t.error(err, 'no error with HNL temp dir');
if (err) {
return t.end();
}
var bazHNLDir = path.join(hnl, 'baz');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir);
var dotSlashMainDir = path.join(hnl, 'dot_slash_main');
var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js');
copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir);
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`');
t.test('with temp dirs', function (st) {
st.plan(3);
st.test('just in `$HOME/.node_modules`', function (s2t) {
s2t.plan(1);
var res = resolve('dot_main');
s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`');
});
st.test('just in `$HOME/.node_libraries`', function (s2t) {
s2t.plan(1);
var res = resolve('dot_slash_main');
s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`');
});
st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) {
s2t.plan(1);
var res = resolve('baz');
s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both');
});
});
});
});
});node_modules\resolve\test\home_paths.js (Line 1:1 - Line 127:2), node_modules\eslint-plugin-react\node_modules\resolve\test\home_paths_sync.js (Line 1:1 - Line 127:2)
'use strict';
var fs = require('fs');
var homedir = require('../lib/homedir');
var path = require('path');
var test = require('tape');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var mv = require('mv');
var copyDir = require('copy-dir');
var tmp = require('tmp');
var HOME = homedir();
var hnm = path.join(HOME, '.node_modules');
var hnl = path.join(HOME, '.node_libraries');
var resolve = require('../async');
function makeDir(t, dir, cb) {
mkdirp(dir, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function cleanup() {
rimraf.sync(dir);
});
cb();
}
});
}
function makeTempDir(t, dir, cb) {
if (fs.existsSync(dir)) {
var tmpResult = tmp.dirSync();
t.teardown(tmpResult.removeCallback);
var backup = path.join(tmpResult.name, path.basename(dir));
mv(dir, backup, function (err) {
if (err) {
cb(err);
} else {
t.teardown(function () {
mv(backup, dir, cb);
});
makeDir(t, dir, cb);
}
});
} else {
makeDir(t, dir, cb);
}
}
test('homedir module paths', function (t) {
t.plan(7);
makeTempDir(t, hnm, function (err) {
t.error(err, 'no error with HNM temp dir');
if (err) {
return t.end();
}
var bazHNMDir = path.join(hnm, 'baz');
var dotMainDir = path.join(hnm, 'dot_main');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir);
copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir);
var bazPkg = { name: 'baz', main: 'quux.js' };
var dotMainPkg = { main: 'index' };
var bazHNMmain = path.join(bazHNMDir, 'quux.js');
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
var dotMainMain = path.join(dotMainDir, 'index.js');
t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`');
makeTempDir(t, hnl, function (err) {
t.error(err, 'no error with HNL temp dir');
if (err) {
return t.end();
}
var bazHNLDir = path.join(hnl, 'baz');
copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir);
var dotSlashMainDir = path.join(hnl, 'dot_slash_main');
var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js');
var dotSlashMainPkg = { main: 'index' };
copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir);
t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`');
t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`');
t.test('with temp dirs', function (st) {
st.plan(3);
st.test('just in `$HOME/.node_modules`', function (s2t) {
s2t.plan(3);
resolve('dot_main', function (err, res, pkg) {
s2t.error(err, 'no error resolving `dot_main`');
s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`');
s2t.deepEqual(pkg, dotMainPkg);
});
});
st.test('just in `$HOME/.node_libraries`', function (s2t) {
s2t.plan(3);
resolve('dot_slash_main', function (err, res, pkg) {
s2t.error(err, 'no error resolving `dot_slash_main`');
s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`');
s2t.deepEqual(pkg, dotSlashMainPkg);
});
});
st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) {
s2t.plan(3);
resolve('baz', function (err, res, pkg) {
s2t.error(err, 'no error resolving `baz`');
s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both');
s2t.deepEqual(pkg, bazPkg);
});
});
});
});
});
});node_modules\resolve\test\filter_sync.js (Line 1:1 - Line 10:108), node_modules\eslint-plugin-react\node_modules\resolve\test\filter_sync.js (Line 1:1 - Line 10:14)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('filter', function (t) {
var dir = path.join(__dirname, 'resolver');
var packageFilterArgs;
var res = resolve.sync('./baz', {
basedir: dir,
// NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibilitynode_modules\resolve\test\filter.js (Line 13:8 - Line 32:2), node_modules\eslint-plugin-react\node_modules\resolve\test\filter.js (Line 13:4 - Line 32:4)
];
return pkg;
}
}, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works');
var packageData = packageFilterArgs[0];
t.equal(pkg, packageData, 'first packageFilter argument is "pkg"');
t.equal(packageData.main, 'doom', 'package "main" was altered');
var packageFile = packageFilterArgs[1];
t.equal(
packageFile,
path.join(dir, 'baz/package.json'),
'second packageFilter argument is "pkgfile"'
);
tnode_modules\resolve\test\faulty_basedir.js (Line 1:1 - Line 26:19), node_modules\eslint-plugin-react\node_modules\resolve\test\faulty_basedir.js (Line 1:1 - Line 26:18)
var test = require('tape');
var path = require('path');
var resolve = require('../');
test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) {
t.plan(1);
var resolverDir = 'C:\\a\\b\\c\\d';
resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) {
t.equal(!!err, true);
});
});
test('non-existent basedir should not throw when preserveSymlinks is false', function (t) {
t.plan(2);
var opts = {
basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'),
preserveSymlinks: false
};
var module = './dotdot/abc';
resolve(module, opts, function (err, res) {
t.equal(err.code, 'MODULE_NOT_FOUND'node_modules\resolve\test\dotdot.js (Line 1:1 - Line 29:2), node_modules\eslint-plugin-react\node_modules\resolve\test\dotdot.js (Line 1:1 - Line 29:2)
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('dotdot', function (t) {
t.plan(4);
var dir = path.join(__dirname, '/dotdot/abc');
resolve('..', { basedir: dir }, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(__dirname, 'dotdot/index.js'));
});
resolve('.', { basedir: dir }, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, 'index.js'));
});
});
test('dotdot sync', function (t) {
t.plan(2);
var dir = path.join(__dirname, '/dotdot/abc');
var a = resolve.sync('..', { basedir: dir });
t.equal(a, path.join(__dirname, 'dotdot/index.js'));
var b = resolve.sync('.', { basedir: dir });
t.equal(b, path.join(dir, 'index.js'));
});node_modules\resolve\lib\sync.js (Line 1:1 - Line 51:5), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 1:1 - Line 51:2)
var isCore = require('is-core-module');
var fs = require('fs');
var path = require('path');
var getHomedir = require('./homedir');
var caller = require('./caller');
var nodeModulesPaths = require('./node-modules-paths');
var normalizeOptions = require('./normalize-options');
var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
var homedir = getHomedir();
var defaultPaths = function () {
return [
path.join(homedir, '.node_modules'),
path.join(homedir, '.node_libraries')
];
};
var defaultIsFile = function isFile(file) {
try {
var stat = fs.statSync(file, { throwIfNoEntry: false });
} catch (e) {
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
throw e;
}
return !!stat && (stat.isFile() || stat.isFIFO());
};
var defaultIsDir = function isDirectory(dir) {
try {
var stat = fs.statSync(dir, { throwIfNoEntry: false });
} catch (e) {
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
throw e;
}
return !!stat && stat.isDirectory();
};
var defaultRealpathSync = function realpathSync(x) {
try {
return realpathFS(x);
} catch (realpathErr) {
if (realpathErr.code !== 'ENOENT') {
throw realpathErr;
}
}
return x;
};
var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {
if (optsnode_modules\resolve\lib\sync.js (Line 63:1 - Line 80:13), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 59:1 - Line 76:12)
};
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
var dirs = nodeModulesPaths(start, opts, x);
for (var i = 0; i < dirs.length; i++) {
dirs[i] = path.join(dirs[i], x);
}
return dirs;
};
module.exports = function resolveSync(x, options) {
if (typeof x !== 'string') {
throw new TypeError('Path must be a string.');
}
var opts = normalizeOptions(x, options);
var isFile = opts.isFile || defaultIsFile;
var readFileSyncnode_modules\resolve\lib\sync.js (Line 81:13 - Line 99:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 77:13 - Line 95:5)
;
var realpathSync = opts.realpathSync || defaultRealpathSync;
var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
if (opts.readFileSync && opts.readPackageSync) {
throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.');
}
var packageIterator = opts.packageIterator;
var extensions = opts.extensions || ['.js'];
var includeCoreModules = opts.includeCoreModules !== false;
var basedir = opts.basedir || path.dirname(caller());
var parent = opts.filename || basedir;
opts.paths = opts.paths || defaultPaths();
// ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
if ((node_modules\resolve\lib\sync.js (Line 99:5 - Line 145:18), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 101:5 - Line 147:12)
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
var res = path.resolve(absoluteStart, x);
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
if (m) return maybeRealpathSync(realpathSync, m, opts);
} else if (includeCoreModules && isCore(x)) {
return x;
} else {
var n = loadNodeModulesSync(x, absoluteStart);
if (n) return maybeRealpathSync(realpathSync, n, opts);
}
var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
err.code = 'MODULE_NOT_FOUND';
throw err;
function loadAsFileSync(x) {
var pkg = loadpkg(path.dirname(x));
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
var rfile = path.relative(pkg.dir, x);
var r = opts.pathFilter(pkg.pkg, x, rfile);
if (r) {
x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
}
}
if (isFile(x)) {
return x;
}
for (var i = 0; i < extensions.length; i++) {
var file = x + extensions[i];
if (isFile(file)) {
return file;
}
}
}
function loadpkg(dir) {
if (dir === '' || dir === '/') return;
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
return;
}
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
var pkgfile = path.join(maybeRealpathSyncnode_modules\resolve\lib\sync.js (Line 171:13 - Line 183:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 178:13 - Line 190:9)
}
if (pkg && pkg.main) {
if (typeof pkg.main !== 'string') {
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
mainError.code = 'INVALID_PACKAGE_MAIN';
throw mainError;
}
if (pkg.main === '.' || pkg.main === './') {
pkg.main = 'index';
}
try {
var mnode_modules\resolve\lib\sync.js (Line 188:13 - Line 208:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\sync.js (Line 201:13 - Line 221:2)
}
}
return loadAsFileSync(path.join(x, '/index'));
}
function loadNodeModulesSync(x, start) {
var thunk = function () { return getPackageCandidates(x, start, opts); };
var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
for (var i = 0; i < dirs.length; i++) {
var dir = dirs[i];
if (isDirectory(path.dirname(dir))) {
var m = loadAsFileSync(dir);
if (m) return m;
var n = loadAsDirectorySync(dir);
if (n) return n;
}
}
}
};node_modules\resolve\lib\node-modules-paths.js (Line 1:1 - Line 42:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\node-modules-paths.js (Line 1:1 - Line 42:2)
var path = require('path');
var parse = path.parse || require('path-parse'); // eslint-disable-line global-require
var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
var prefix = '/';
if ((/^([A-Za-z]:)/).test(absoluteStart)) {
prefix = '';
} else if ((/^\\\\/).test(absoluteStart)) {
prefix = '\\\\';
}
var paths = [absoluteStart];
var parsed = parse(absoluteStart);
while (parsed.dir !== paths[paths.length - 1]) {
paths.push(parsed.dir);
parsed = parse(parsed.dir);
}
return paths.reduce(function (dirs, aPath) {
return dirs.concat(modules.map(function (moduleDir) {
return path.resolve(prefix, aPath, moduleDir);
}));
}, []);
};
module.exports = function nodeModulesPaths(start, opts, request) {
var modules = opts && opts.moduleDirectory
? [].concat(opts.moduleDirectory)
: ['node_modules'];
if (opts && typeof opts.paths === 'function') {
return opts.paths(
request,
start,
function () { return getNodeModulesDirs(start, modules); },
opts
);
}
var dirs = getNodeModulesDirs(start, modules);
return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
};node_modules\resolve\lib\homedir.js (Line 1:1 - Line 24:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\homedir.js (Line 1:1 - Line 24:2)
'use strict';
var os = require('os');
// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js
module.exports = os.homedir || function homedir() {
var home = process.env.HOME;
var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
if (process.platform === 'win32') {
return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null;
}
if (process.platform === 'darwin') {
return home || (user ? '/Users/' + user : null);
}
if (process.platform === 'linux') {
return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens
}
return home || null;
};node_modules\resolve\lib\caller.js (Line 1:1 - Line 8:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\caller.js (Line 1:1 - Line 8:2)
module.exports = function () {
// see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
var origPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = function (_, stack) { return stack; };
var stack = (new Error()).stack;
Error.prepareStackTrace = origPrepareStackTrace;
return stack[2].getFileName();
};node_modules\resolve\lib\async.js (Line 1:1 - Line 47:5), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 1:1 - Line 47:2)
var fs = require('fs');
var getHomedir = require('./homedir');
var path = require('path');
var caller = require('./caller');
var nodeModulesPaths = require('./node-modules-paths');
var normalizeOptions = require('./normalize-options');
var isCore = require('is-core-module');
var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
var homedir = getHomedir();
var defaultPaths = function () {
return [
path.join(homedir, '.node_modules'),
path.join(homedir, '.node_libraries')
];
};
var defaultIsFile = function isFile(file, cb) {
fs.stat(file, function (err, stat) {
if (!err) {
return cb(null, stat.isFile() || stat.isFIFO());
}
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
return cb(err);
});
};
var defaultIsDir = function isDirectory(dir, cb) {
fs.stat(dir, function (err, stat) {
if (!err) {
return cb(null, stat.isDirectory());
}
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
return cb(err);
});
};
var defaultRealpath = function realpath(x, cb) {
realpathFS(x, function (realpathErr, realPath) {
if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);
else cb(null, realpathErr ? x : realPath);
});
};
var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {
if (optsnode_modules\resolve\lib\async.js (Line 47:6 - Line 62:5), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 47:17 - Line 62:8)
) {
realpath(x, cb);
} else {
cb(null, x);
}
};
var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) {
readFile(pkgfile, function (readFileErr, body) {
if (readFileErr) cb(readFileErr);
else {
try {
var pkg = JSON.parse(body);
cb(null, pkg);
} catch (jsonErr) {
cb(nullnode_modules\resolve\lib\async.js (Line 62:5 - Line 121:5), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 62:8 - Line 121:16)
);
}
}
});
};
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
var dirs = nodeModulesPaths(start, opts, x);
for (var i = 0; i < dirs.length; i++) {
dirs[i] = path.join(dirs[i], x);
}
return dirs;
};
module.exports = function resolve(x, options, callback) {
var cb = callback;
var opts = options;
if (typeof options === 'function') {
cb = opts;
opts = {};
}
if (typeof x !== 'string') {
var err = new TypeError('Path must be a string.');
return process.nextTick(function () {
cb(err);
});
}
opts = normalizeOptions(x, opts);
var isFile = opts.isFile || defaultIsFile;
var isDirectory = opts.isDirectory || defaultIsDir;
var readFile = opts.readFile || fs.readFile;
var realpath = opts.realpath || defaultRealpath;
var readPackage = opts.readPackage || defaultReadPackage;
if (opts.readFile && opts.readPackage) {
var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.');
return process.nextTick(function () {
cb(conflictErr);
});
}
var packageIterator = opts.packageIterator;
var extensions = opts.extensions || ['.js'];
var includeCoreModules = opts.includeCoreModules !== false;
var basedir = opts.basedir || path.dirname(caller());
var parent = opts.filename || basedir;
opts.paths = opts.paths || defaultPaths();
// ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
var absoluteStart = path.resolve(basedir);
maybeRealpath(
realpath,
absoluteStart,
opts,
function (err, realStart) {
if (err) cb(err);
else initnode_modules\resolve\lib\async.js (Line 126:5 - Line 231:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 140:13 - Line 245:3)
(basedir) {
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
res = path.resolve(basedir, x);
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
if ((/\/$/).test(x) && res === basedir) {
loadAsDirectory(res, opts.package, onfile);
} else loadAsFile(res, opts.package, onfile);
} else if (includeCoreModules && isCore(x)) {
return cb(null, x);
} else loadNodeModules(x, basedir, function (err, n, pkg) {
if (err) cb(err);
else if (n) {
return maybeRealpath(realpath, n, opts, function (err, realN) {
if (err) {
cb(err);
} else {
cb(null, realN, pkg);
}
});
} else {
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
moduleError.code = 'MODULE_NOT_FOUND';
cb(moduleError);
}
});
}
function onfile(err, m, pkg) {
if (err) cb(err);
else if (m) cb(null, m, pkg);
else loadAsDirectory(res, function (err, d, pkg) {
if (err) cb(err);
else if (d) {
maybeRealpath(realpath, d, opts, function (err, realD) {
if (err) {
cb(err);
} else {
cb(null, realD, pkg);
}
});
} else {
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
moduleError.code = 'MODULE_NOT_FOUND';
cb(moduleError);
}
});
}
function loadAsFile(x, thePackage, callback) {
var loadAsFilePackage = thePackage;
var cb = callback;
if (typeof loadAsFilePackage === 'function') {
cb = loadAsFilePackage;
loadAsFilePackage = undefined;
}
var exts = [''].concat(extensions);
load(exts, x, loadAsFilePackage);
function load(exts, x, loadPackage) {
if (exts.length === 0) return cb(null, undefined, loadPackage);
var file = x + exts[0];
var pkg = loadPackage;
if (pkg) onpkg(null, pkg);
else loadpkg(path.dirname(file), onpkg);
function onpkg(err, pkg_, dir) {
pkg = pkg_;
if (err) return cb(err);
if (dir && pkg && opts.pathFilter) {
var rfile = path.relative(dir, file);
var rel = rfile.slice(0, rfile.length - exts[0].length);
var r = opts.pathFilter(pkg, x, rel);
if (r) return load(
[''].concat(extensions.slice()),
path.resolve(dir, r),
pkg
);
}
isFile(file, onex);
}
function onex(err, ex) {
if (err) return cb(err);
if (ex) return cb(null, file, pkg);
load(exts.slice(1), x, pkg);
}
}
}
function loadpkg(dir, cb) {
if (dir === '' || dir === '/') return cb(null);
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
return cb(null);
}
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
if (unwrapErr) return loadpkg(path.dirname(dir), cb);
var pkgfile = path.join(pkgdir, 'package.json');
isFile(pkgfile, function (err, ex) {
// on err, ex is false
if (!ex) return loadpkg(path.dirname(dir), cb);
readPackage(readFile, pkgfile, function (err, pkgParam) {
if (err)node_modules\resolve\lib\async.js (Line 236:8 - Line 253:3), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 250:4 - Line 267:16)
);
}
cb(null, pkg, dir);
});
});
});
}
function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
var cb = callback;
var fpkg = loadAsDirectoryPackage;
if (typeof fpkg === 'function') {
cb = fpkg;
fpkg = opts.package;
}
maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {
if (unwrapErr) return cbnode_modules\resolve\lib\async.js (Line 253:10 - Line 265:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 267:3 - Line 279:2)
);
var pkgfile = path.join(pkgdir, 'package.json');
isFile(pkgfile, function (err, ex) {
if (err) return cb(err);
if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
readPackage(readFile, pkgfile, function (err, pkgParam) {
if (err) return cb(err);
var pkg = pkgParam;
if (pkg && opts.packageFilter) {
pkg = opts.packageFilter(pkg, pkgfile)node_modules\resolve\lib\async.js (Line 265:8 - Line 286:3), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 279:7 - Line 300:9)
);
}
if (pkg && pkg.main) {
if (typeof pkg.main !== 'string') {
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
mainError.code = 'INVALID_PACKAGE_MAIN';
return cb(mainError);
}
if (pkg.main === '.' || pkg.main === './') {
pkg.main = 'index';
}
loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
if (err) return cb(err);
if (m) return cb(null, m, pkg);
if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
var dir = path.resolve(x, pkg.main);
loadAsDirectory(dir, pkg, function (err, n, pkg) {
if (err) return cb(err);
if (n) return cb(null, n, pkg);
loadAsFile(path.join(x, 'index'), pkg, cbnode_modules\resolve\lib\async.js (Line 286:3 - Line 329:2), node_modules\eslint-plugin-react\node_modules\resolve\lib\async.js (Line 306:2 - Line 349:2)
);
});
});
return;
}
loadAsFile(path.join(x, '/index'), pkg, cb);
});
});
});
}
function processDirs(cb, dirs) {
if (dirs.length === 0) return cb(null, undefined);
var dir = dirs[0];
isDirectory(path.dirname(dir), isdir);
function isdir(err, isdir) {
if (err) return cb(err);
if (!isdir) return processDirs(cb, dirs.slice(1));
loadAsFile(dir, opts.package, onfile);
}
function onfile(err, m, pkg) {
if (err) return cb(err);
if (m) return cb(null, m, pkg);
loadAsDirectory(dir, opts.package, ondir);
}
function ondir(err, n, pkg) {
if (err) return cb(err);
if (n) return cb(null, n, pkg);
processDirs(cb, dirs.slice(1));
}
}
function loadNodeModules(x, start, cb) {
var thunk = function () { return getPackageCandidates(x, start, opts); };
processDirs(
cb,
packageIterator ? packageIterator(x, start, thunk, opts) : thunk()
);
}
};node_modules\regexp.prototype.flags\test\shimmed.js (Line 1:1 - Line 11:31), node_modules\string.prototype.trim\test\shimmed.js (Line 1:1 - Line 11:9)
'use strict';
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var functionsHaveConfigurableNamesnode_modules\regexp.prototype.flags\test\index.js (Line 3:2 - Line 9:6), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { flagsnode_modules\regexp.prototype.flags\test\implementation.js (Line 3:2 - Line 12:6), node_modules\string.prototype.trimstart\test\implementation.js (Line 3:2 - Line 12:15)
= require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { flagsnode_modules\regexp.prototype.flags\test\builtin.js (Line 1:13 - Line 14:10), node_modules\regexp.prototype.flags\test\shimmed.js (Line 3:2 - Line 16:10)
;
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('builtin'node_modules\regexp.prototype.flags\test\builtin.js (Line 14:10 - Line 46:2), node_modules\regexp.prototype.flags\test\shimmed.js (Line 16:10 - Line 48:2)
, function (t) {
var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags');
t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable');
et.end();
});
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object');
st.end();
});
t.test('has the correct descriptor', function (st) {
st.equal(descriptor.configurable, true);
st.equal(descriptor.enumerable, false);
st.equal(typeof descriptor.get, 'function');
st.equal(descriptor.set, undefined);
st.end();
});
runTests(callBind(descriptor.get), t);
t.end();
});node_modules\react-router-dom\dist\index.js (Line 11:1 - Line 29:13), node_modules\@jridgewell\sourcemap-codec\dist\sourcemap-codec.umd.js (Line 18:1 - Line 33:8)
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJSnode_modules\react-refresh\cjs\react-refresh-babel.production.js (Line 454:15 - Line 462:10), node_modules\react-refresh\cjs\react-refresh-babel.production.js (Line 411:15 - Line 419:5)
var insertAfterPath = null;
path.find(function (p) {
if (p.parentPath.isBlock()) return (insertAfterPath = p), !0;
});
null !== insertAfterPath &&
insertAfterPath.insertAfter(
t.expressionStatement(
t.callExpression(
sigCallIDnode_modules\react-refresh\cjs\react-refresh-babel.production.js (Line 483:20 - Line 521:3), node_modules\react-refresh\cjs\react-refresh-babel.production.js (Line 336:6 - Line 374:4)
: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
ifnode_modules\react-refresh\cjs\react-refresh-babel.development.js (Line 13:2 - Line 601:2), node_modules\react-refresh\cjs\react-refresh-babel.production.js (Line 12:1 - Line 586:2)
module.exports = function (babel) {
function createRegistration(programPath, persistentID) {
var handle = programPath.scope.generateUidIdentifier("c");
registrationsByProgramPath.has(programPath) ||
registrationsByProgramPath.set(programPath, []);
registrationsByProgramPath
.get(programPath)
.push({ handle: handle, persistentID: persistentID });
return handle;
}
function isComponentishName(name) {
return "string" === typeof name && "A" <= name[0] && "Z" >= name[0];
}
function findInnerComponents(inferredName, path, callback) {
var node = path.node;
switch (node.type) {
case "Identifier":
if (!isComponentishName(node.name)) break;
callback(inferredName, node, null);
return !0;
case "FunctionDeclaration":
return callback(inferredName, node.id, null), !0;
case "ArrowFunctionExpression":
if ("ArrowFunctionExpression" === node.body.type) break;
callback(inferredName, node, path);
return !0;
case "FunctionExpression":
return callback(inferredName, node, path), !0;
case "CallExpression":
var argsPath = path.get("arguments");
if (void 0 === argsPath || 0 === argsPath.length) break;
var calleePath = path.get("callee");
switch (calleePath.node.type) {
case "MemberExpression":
case "Identifier":
calleePath = calleePath.getSource();
if (
!findInnerComponents(
inferredName + "$" + calleePath,
argsPath[0],
callback
)
)
return !1;
callback(inferredName, node, path);
return !0;
default:
return !1;
}
case "VariableDeclarator":
if (
((argsPath = node.init),
null !== argsPath &&
((calleePath = node.id.name), isComponentishName(calleePath)))
) {
switch (argsPath.type) {
case "ArrowFunctionExpression":
case "FunctionExpression":
break;
case "CallExpression":
node = argsPath.callee;
var calleeType = node.type;
if (
"Import" === calleeType ||
("Identifier" === calleeType &&
(0 === node.name.indexOf("require") ||
0 === node.name.indexOf("import")))
)
return !1;
break;
case "TaggedTemplateExpression":
break;
default:
return !1;
}
node = path.get("init");
if (findInnerComponents(inferredName, node, callback)) return !0;
calleePath = path.scope.getBinding(calleePath);
if (void 0 === calleePath) return;
path = !1;
calleePath = calleePath.referencePaths;
for (calleeType = 0; calleeType < calleePath.length; calleeType++) {
var ref = calleePath[calleeType];
if (
!ref.node ||
"JSXIdentifier" === ref.node.type ||
"Identifier" === ref.node.type
) {
ref = ref.parent;
if ("JSXOpeningElement" === ref.type) path = !0;
else if ("CallExpression" === ref.type) {
ref = ref.callee;
var fnName = void 0;
switch (ref.type) {
case "Identifier":
fnName = ref.name;
break;
case "MemberExpression":
fnName = ref.property.name;
}
switch (fnName) {
case "createElement":
case "jsx":
case "jsxDEV":
case "jsxs":
path = !0;
}
}
if (path) return callback(inferredName, argsPath, node), !0;
}
}
}
}
return !1;
}
function getHookCallsSignature(functionNode) {
functionNode = hookCalls.get(functionNode);
return void 0 === functionNode
? null
: {
key: functionNode
.map(function (call) {
return call.name + "{" + call.key + "}";
})
.join("\n"),
customHooks: functionNode
.filter(function (call) {
a: switch (call.name) {
case "useState":
case "React.useState":
case "useReducer":
case "React.useReducer":
case "useEffect":
case "React.useEffect":
case "useLayoutEffect":
case "React.useLayoutEffect":
case "useMemo":
case "React.useMemo":
case "useCallback":
case "React.useCallback":
case "useRef":
case "React.useRef":
case "useContext":
case "React.useContext":
case "useImperativeHandle":
case "React.useImperativeHandle":
case "useDebugValue":
case "React.useDebugValue":
case "useId":
case "React.useId":
case "useDeferredValue":
case "React.useDeferredValue":
case "useTransition":
case "React.useTransition":
case "useInsertionEffect":
case "React.useInsertionEffect":
case "useSyncExternalStore":
case "React.useSyncExternalStore":
case "useFormStatus":
case "React.useFormStatus":
case "useFormState":
case "React.useFormState":
case "useActionState":
case "React.useActionState":
case "useOptimistic":
case "React.useOptimistic":
call = !0;
break a;
default:
call = !1;
}
return !call;
})
.map(function (call) {
return t.cloneDeep(call.callee);
})
};
}
function hasForceResetComment(path) {
path = path.hub.file;
var hasForceReset = hasForceResetCommentByFile.get(path);
if (void 0 !== hasForceReset) return hasForceReset;
hasForceReset = !1;
for (var comments = path.ast.comments, i = 0; i < comments.length; i++)
if (-1 !== comments[i].value.indexOf("@refresh reset")) {
hasForceReset = !0;
break;
}
hasForceResetCommentByFile.set(path, hasForceReset);
return hasForceReset;
}
function createArgumentsForSignature(node, signature, scope) {
var key = signature.key;
signature = signature.customHooks;
var forceReset = hasForceResetComment(scope.path),
customHooksInScope = [];
signature.forEach(function (callee) {
switch (callee.type) {
case "MemberExpression":
if ("Identifier" === callee.object.type)
var bindingName = callee.object.name;
break;
case "Identifier":
bindingName = callee.name;
}
scope.hasBinding(bindingName)
? customHooksInScope.push(callee)
: (forceReset = !0);
});
signature = key;
"function" !== typeof require ||
opts.emitFullSignatures ||
(signature = require("crypto")
.createHash("sha1")
.update(key)
.digest("base64"));
node = [node, t.stringLiteral(signature)];
(forceReset || 0 < customHooksInScope.length) &&
node.push(t.booleanLiteral(forceReset));
0 < customHooksInScope.length &&
node.push(
t.functionExpression(
null,
[],
t.blockStatement([
t.returnStatement(t.arrayExpression(customHooksInScope))
])
)
);
return node;
}
function findHOCCallPathsAbove(path) {
for (var calls = []; ; ) {
if (!path) return calls;
var parentPath = path.parentPath;
if (!parentPath) return calls;
if (
"AssignmentExpression" === parentPath.node.type &&
path.node === parentPath.node.right
)
path = parentPath;
else if (
"CallExpression" === parentPath.node.type &&
path.node !== parentPath.node.callee
)
calls.push(parentPath), (path = parentPath);
else return calls;
}
}
var opts =
1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
if ("function" === typeof babel.env) {
var env = babel.env();
if ("development" !== env && !opts.skipEnvCheck)
throw Error(
'React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "' +
env +
'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.'
);
}
var t = babel.types,
refreshReg = t.identifier(opts.refreshReg || "$RefreshReg$"),
refreshSig = t.identifier(opts.refreshSig || "$RefreshSig$"),
registrationsByProgramPath = new Map(),
hasForceResetCommentByFile = new WeakMap(),
seenForRegistration = new WeakSet(),
seenForSignature = new WeakSet(),
seenForOutro = new WeakSet(),
hookCalls = new WeakMap(),
HookCallsVisitor = {
CallExpression: function (path) {
var callee = path.node.callee,
name = null;
switch (callee.type) {
case "Identifier":
name = callee.name;
break;
case "MemberExpression":
name = callee.property.name;
}
if (
null !== name &&
/^use[A-Z]/.test(name) &&
((callee = path.scope.getFunctionParent()), null !== callee)
) {
callee = callee.block;
hookCalls.has(callee) || hookCalls.set(callee, []);
callee = hookCalls.get(callee);
var key = "";
"VariableDeclarator" === path.parent.type &&
(key = path.parentPath.get("id").getSource());
var args = path.get("arguments");
"useState" === name && 0 < args.length
? (key += "(" + args[0].getSource() + ")")
: "useReducer" === name &&
1 < args.length &&
(key += "(" + args[1].getSource() + ")");
callee.push({ callee: path.node.callee, name: name, key: key });
}
}
};
return {
visitor: {
ExportDefaultDeclaration: function (path) {
var node = path.node,
decl = node.declaration,
declPath = path.get("declaration");
if (
"CallExpression" === decl.type &&
!seenForRegistration.has(node)
) {
seenForRegistration.add(node);
var programPath = path.parentPath;
findInnerComponents(
"%default%",
declPath,
function (persistentID, targetExpr, targetPath) {
null !== targetPath &&
((persistentID = createRegistration(
programPath,
persistentID
)),
targetPath.replaceWith(
t.assignmentExpression("=", persistentID, targetExpr)
));
}
);
}
},
FunctionDeclaration: {
enter: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
var id = node.id;
null !== id &&
((id = id.name),
isComponentishName(id) &&
!seenForRegistration.has(node) &&
(seenForRegistration.add(node),
findInnerComponents(
modulePrefix + id,
path,
function (persistentID, targetExpr) {
persistentID = createRegistration(
programPath,
persistentID
);
insertAfterPath.insertAfter(
t.expressionStatement(
t.assignmentExpression("=", persistentID, targetExpr)
)
);
}
)));
},
exit: function (path) {
var node = path.node,
id = node.id;
if (null !== id) {
var signature = getHookCallsSignature(node);
if (null !== signature && !seenForSignature.has(node)) {
seenForSignature.add(node);
node = path.scope.generateUidIdentifier("_s");
path.scope.parent.push({
id: node,
init: t.callExpression(refreshSig, [])
});
path
.get("body")
.unshiftContainer(
"body",
t.expressionStatement(t.callExpression(node, []))
);
var insertAfterPath = null;
path.find(function (p) {
if (p.parentPath.isBlock()) return (insertAfterPath = p), !0;
});
null !== insertAfterPath &&
insertAfterPath.insertAfter(
t.expressionStatement(
t.callExpression(
node,
createArgumentsForSignature(
id,
signature,
insertAfterPath.scope
)
)
)
);
}
}
}
},
"ArrowFunctionExpression|FunctionExpression": {
exit: function (path) {
var node = path.node,
signature = getHookCallsSignature(node);
if (null !== signature && !seenForSignature.has(node)) {
seenForSignature.add(node);
var sigCallID = path.scope.generateUidIdentifier("_s");
path.scope.parent.push({
id: sigCallID,
init: t.callExpression(refreshSig, [])
});
"BlockStatement" !== path.node.body.type &&
(path.node.body = t.blockStatement([
t.returnStatement(path.node.body)
]));
path
.get("body")
.unshiftContainer(
"body",
t.expressionStatement(t.callExpression(sigCallID, []))
);
if ("VariableDeclarator" === path.parent.type) {
var insertAfterPath = null;
path.find(function (p) {
if (p.parentPath.isBlock()) return (insertAfterPath = p), !0;
});
null !== insertAfterPath &&
insertAfterPath.insertAfter(
t.expressionStatement(
t.callExpression(
sigCallID,
createArgumentsForSignature(
path.parent.id,
signature,
insertAfterPath.scope
)
)
)
);
} else
[path]
.concat(findHOCCallPathsAbove(path))
.forEach(function (p) {
p.replaceWith(
t.callExpression(
sigCallID,
createArgumentsForSignature(p.node, signature, p.scope)
)
);
});
}
}
},
VariableDeclaration: function (path) {
var node = path.node,
modulePrefix = "";
switch (path.parent.type) {
case "Program":
var insertAfterPath = path;
var programPath = path.parentPath;
break;
case "TSModuleBlock":
insertAfterPath = path;
programPath = insertAfterPath.parentPath.parentPath;
break;
case "ExportNamedDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
case "ExportDefaultDeclaration":
insertAfterPath = path.parentPath;
programPath = insertAfterPath.parentPath;
break;
default:
return;
}
if (
"TSModuleBlock" === path.parent.type ||
"ExportNamedDeclaration" === path.parent.type
)
for (; "Program" !== programPath.type; ) {
if ("TSModuleDeclaration" === programPath.type) {
if (
"Program" !== programPath.parentPath.type &&
"ExportNamedDeclaration" !== programPath.parentPath.type
)
return;
modulePrefix = programPath.node.id.name + "$" + modulePrefix;
}
programPath = programPath.parentPath;
}
if (
!seenForRegistration.has(node) &&
(seenForRegistration.add(node),
(path = path.get("declarations")),
1 === path.length)
) {
var declPath = path[0];
findInnerComponents(
modulePrefix + declPath.node.id.name,
declPath,
function (persistentID, targetExpr, targetPath) {
null !== targetPath &&
((persistentID = createRegistration(
programPath,
persistentID
)),
"VariableDeclarator" === targetPath.parent.type
? insertAfterPath.insertAfter(
t.expressionStatement(
t.assignmentExpression(
"=",
persistentID,
declPath.node.id
)
)
)
: targetPath.replaceWith(
t.assignmentExpression("=", persistentID, targetExpr)
));
}
);
}
},
Program: {
enter: function (path) {
path.traverse(HookCallsVisitor);
},
exit: function (path) {
var registrations = registrationsByProgramPath.get(path);
if (void 0 !== registrations) {
var node = path.node;
if (!seenForOutro.has(node)) {
seenForOutro.add(node);
registrationsByProgramPath.delete(path);
var declarators = [];
path.pushContainer(
"body",
t.variableDeclaration("var", declarators)
);
registrations.forEach(function (_ref) {
var handle = _ref.handle;
path.pushContainer(
"body",
t.expressionStatement(
t.callExpression(refreshReg, [
handle,
t.stringLiteral(_ref.persistentID)
])
)
);
declarators.push(t.variableDeclarator(handle));
});
}
}
}
}
}
};
})node_modules\react-is\umd\react-is.development.js (Line 12:1 - Line 18:84), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 10:1 - Line 16:13)
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.ReactIs = {}));
}(this, (function (exports) { 'use strict';
// The Symbol used to tag the ReactElement-like types. If there is no native Symbolnode_modules\react-is\umd\react-is.development.js (Line 44:2 - Line 56:22), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 73:6 - Line 85:20)
;
}
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_ASYNC_MODE_TYPEnode_modules\react-is\umd\react-is.development.js (Line 91:3 - Line 102:36), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 117:3 - Line 128:13)
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncModenode_modules\react-is\umd\react-is.development.js (Line 116:27 - Line 152:8), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 152:6 - Line 187:9)
;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exportsnode_modules\react-is\umd\react-is.development.js (Line 154:3 - Line 165:12), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 191:3 - Line 202:13)
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncModenode_modules\react-is\umd\react-is.development.js (Line 164:9 - Line 178:19), node_modules\rc-util\node_modules\react-is\umd\react-is.development.js (Line 202:13 - Line 216:15)
;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementTypenode_modules\react-is\cjs\react-is.development.js (Line 15:2 - Line 180:2), node_modules\react-is\umd\react-is.development.js (Line 16:8 - Line 181:2)
) {
'use strict';
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
// (unstable) APIs that have been removed. Can we remove the symbols?
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
function isValidElementType(type) {
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
}
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_ASYNC_MODE_TYPE:
case REACT_CONCURRENT_MODE_TYPE:
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return undefined;
} // AsyncMode is deprecated along with isAsyncMode
var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
}
}
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
})(node_modules\react-i18next\src\withTranslation.js (Line 1:1 - Line 14:2), node_modules\react-i18next\dist\es\withTranslation.js (Line 1:1 - Line 756:2)
import { createElement, forwardRef as forwardRefReact } from 'react';
import { useTranslation } from './useTranslation.js';
import { getDisplayName } from './utils.js';
export const withTranslation = (ns, options = {}) =>
function Extend(WrappedComponent) {
function I18nextWithTranslation({ forwardedRef, ...rest }) {
const [t, i18n, ready] = useTranslation(ns, { ...rest, keyPrefix: options.keyPrefix });
const passDownProps = {
...rest,
t,
i18n,
tReady: ready,node_modules\react-i18next\src\withTranslation.js (Line 15:7 - Line 25:23), node_modules\react-i18next\dist\es\withTranslation.js (Line 18:5 - Line 26:17)
};
if (options.withRef && forwardedRef) {
passDownProps.ref = forwardedRef;
} else if (!options.withRef && forwardedRef) {
passDownProps.forwardedRef = forwardedRef;
}
return createElement(WrappedComponent, passDownProps);
}
I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(
WrappedComponentnode_modules\react-i18next\src\withSSR.js (Line 1:1 - Line 12:2), node_modules\react-i18next\dist\es\withSSR.js (Line 1:1 - Line 14:2)
import { createElement } from 'react';
import { useSSR } from './useSSR.js';
import { composeInitialProps } from './context.js';
import { getDisplayName } from './utils.js';
export const withSSR = () =>
function Extend(WrappedComponent) {
function I18nextWithSSR({ initialI18nStore, initialLanguage, ...rest }) {
useSSR(initialI18nStore, initialLanguage);
return createElement(WrappedComponent, {
...rest,node_modules\react-i18next\src\utils.js (Line 2:1 - Line 15:27), node_modules\react-i18next\dist\es\utils.js (Line 1:1 - Line 137:6)
export const warn = (i18n, code, msg, rest) => {
const args = [msg, { code, ...(rest || {}) }];
if (i18n?.services?.logger?.forward) {
return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
const alreadyWarned = {};
/** @type {typeof warn} */node_modules\react-i18next\src\utils.js (Line 16:1 - Line 22:24), node_modules\react-i18next\dist\es\utils.js (Line 17:1 - Line 142:6)
export const warnOnce = (i18n, code, msg, rest) => {
if (isString(msg) && alreadyWarned[msg]) return;
if (isString(msg)) alreadyWarned[msg] = new Date();
warn(i18n, code, msg, rest);
};
// not needed right nownode_modules\react-i18next\src\utils.js (Line 38:7 - Line 51:39), node_modules\react-i18next\dist\es\utils.js (Line 27:7 - Line 38:7)
setTimeout(() => {
i18n.off('initialized', initialized);
}, 0);
cb();
};
i18n.on('initialized', initialized);
}
};
export const loadNamespaces = (i18n, ns, cb) => {
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
};
// should work with I18NEXT >= v22.5.0node_modules\react-i18next\src\utils.js (Line 57:2 - Line 66:2), node_modules\react-i18next\dist\es\utils.js (Line 41:2 - Line 50:2)
=> {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
i18n.loadLanguages(lng, loadedClb(i18n, cb));
};
export const hasLoadedNamespace = (ns, i18n, options = {}) => {
if (!i18n.languages || !i18n.languages.length) {
warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
languages: i18n.languages,node_modules\react-i18next\src\utils.js (Line 67:5 - Line 82:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 170:6 - Line 178:2)
});
return true;
}
return i18n.hasLoadedNamespace(ns, {
lng: options.lng,
precheck: (i18nInstance, loadNotPending) => {
if (
options.bindI18n &&
options.bindI18n.indexOf('languageChanging') > -1 &&
i18nInstance.services.backendConnector.backend &&
i18nInstance.isLanguageChangingTo &&
!loadNotPending(i18nInstance.isLanguageChangingTo, ns)
)
return false;
},node_modules\react-i18next\src\useTranslation.js (Line 10:1 - Line 28:2), node_modules\react-i18next\dist\es\useTranslation.js (Line 3:2 - Line 12:2)
} from './utils.js';
const usePrevious = (value, ignore) => {
const ref = useRef();
useEffect(() => {
ref.current = ignore ? ref.current : value;
}, [value, ignore]);
return ref.current;
};
const alwaysNewT = (i18n, language, namespace, keyPrefix) =>
i18n.getFixedT(language, namespace, keyPrefix);
const useMemoizedT = (i18n, language, namespace, keyPrefix) =>
useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [
i18n,
language,
namespace,
keyPrefix,node_modules\react-i18next\src\useTranslation.js (Line 33:3 - Line 41:2), node_modules\react-i18next\dist\es\useTranslation.js (Line 14:3 - Line 657:2)
const { i18n: i18nFromProps } = props;
const { i18n: i18nFromContext, defaultNS: defaultNSFromContext } = useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
if (!i18n) {
warnOnce(
i18n,
'NO_I18NEXT_INSTANCE',
'useTranslation: You will need to pass in an i18next instance by using initReactI18next',node_modules\react-i18next\src\useTranslation.js (Line 42:5 - Line 60:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 657:89 - Line 669:2)
);
const notReadyT = (k, optsOrDefaultValue) => {
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue))
return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait)
warnOnce(
i18n,
'DEPRECATED_OPTION',
'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.',node_modules\react-i18next\src\useTranslation.js (Line 93:5 - Line 106:59), node_modules\react-i18next\dist\es\useTranslation.js (Line 52:10 - Line 64:3)
);
const [t, setT] = useState(getT);
let joinedNS = namespaces.join();
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
const previousJoinedNS = usePrevious(joinedNS);
const isMounted = useRef(true);
useEffect(() => {
const { bindI18n, bindI18nStore } = i18nOptions;
isMounted.current = true;
// if not ready and not using suspense load the namespacesnode_modules\react-i18next\src\useTranslation.js (Line 108:5 - Line 128:55), node_modules\react-i18next\dist\umd\react-i18next.js (Line 697:6 - Line 714:3)
if (!ready && !useSuspense) {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
} else {
loadNamespaces(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
// bind events to trigger change, like languageChangednode_modules\react-i18next\src\useSSR.js (Line 1:1 - Line 9:86), node_modules\react-i18next\dist\es\useSSR.js (Line 1:1 - Line 11:3)
import { useContext } from 'react';
import { getI18n, I18nContext } from './context.js';
export const useSSR = (initialI18nStore, initialLanguage, props = {}) => {
const { i18n: i18nFromProps } = props;
const { i18n: i18nFromContext } = useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
// opt out if is a cloned instance, eg. created by i18next-http-middleware on requestnode_modules\react-i18next\src\useSSR.js (Line 19:2 - Line 33:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 810:2 - Line 822:2)
=> {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};node_modules\react-i18next\src\unescape.js (Line 3:1 - Line 26:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 184:2 - Line 206:2)
const matchHtmlEntity =
/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
const htmlEntities = {
'&': '&',
'&': '&',
'<': '<',
'<': '<',
'>': '>',
'>': '>',
''': "'",
''': "'",
'"': '"',
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…',
'/': '/',
'/': '/',node_modules\react-i18next\src\TransWithoutContext.js (Line 1:1 - Line 14:2), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 1:1 - Line 240:5)
import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';
import HTML from 'html-parse-stringify';
import { isObject, isString, warn, warnOnce } from './utils.js';
import { getDefaults } from './defaults.js';
import { getI18n } from './i18nInstance.js';
const hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
const getChildren = (node_modules\react-i18next\src\TransWithoutContext.js (Line 28:3 - Line 36:69), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 23:3 - Line 29:6)
newTarget.props = Object.assign(source.props, target.props);
return newTarget;
};
export const nodesToString = (children, i18nOptions, i18n, i18nKey) => {
if (!children) return '';
let stringNode = '';
// do not use `React.Children.toArray`, will fail at object childrennode_modules\react-i18next\src\TransWithoutContext.js (Line 47:7 - Line 57:33), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 33:7 - Line 273:11)
stringNode += `${child}`;
return;
}
if (isValidElement(child)) {
const { props, type } = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
// actual e.g. lorem <br/> ipsumnode_modules\react-i18next\src\TransWithoutContext.js (Line 79:7 - Line 88:40), node_modules\react-i18next\dist\umd\react-i18next.js (Line 284:8 - Line 295:6)
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, { i18nKey });
return;
}
if (isObject(child)) {
// e.g. lorem {{ value, format }} ipsumnode_modules\react-i18next\src\TransWithoutContext.js (Line 89:7 - Line 101:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 295:8 - Line 308:2)
const { format, ...clone } = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
warn(
i18n,
'TRANS_INVALID_OBJ',
`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,
{ i18nKey, child },node_modules\react-i18next\src\TransWithoutContext.js (Line 142:2 - Line 151:53), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 98:2 - Line 104:6)
=> {
if (isString(child)) return;
if (hasChildren(child)) getData(getChildren(child));
else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);
});
};
getData(children);
// parse ast from string with additional wrapper tagnode_modules\react-i18next\src\TransWithoutContext.js (Line 153:3 - Line 159:80), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 104:3 - Line 340:7)
const ast = HTML.parse(`<0>${targetString}</0>`);
const opts = { ...data, ...combinedTOpts };
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
// `mappedChildren` will always be empty if using the `i18nIsDynamicList` prop,node_modules\react-i18next\src\TransWithoutContext.js (Line 194:3 - Line 204:42), node_modules\react-i18next\dist\umd\react-i18next.js (Line 362:4 - Line 368:4)
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i) => {
const translationContent =
node.children?.[0]?.content &&
i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
if (node.type === 'tag') {
// regular array (components or children)node_modules\react-i18next\src\TransWithoutContext.js (Line 212:9 - Line 232:40), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 143:9 - Line 382:31)
if (!tmp) tmp = {};
const child =
Object.keys(node.attrs).length !== 0 ? mergeProps({ props: node.attrs }, tmp) : tmp;
const isElement = isValidElement(child);
const isValidTranslationWithChildren =
isElement && hasChildren(node, true) && !node.voidElement;
const isEmptyTransWithHTML =
emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
const isKnownComponent =
isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
if (isString(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (
hasChildren(child) || // the jsx element has children -> loopnode_modules\react-i18next\src\TransWithoutContext.js (Line 245:11 - Line 256:34), node_modules\react-i18next\dist\umd\react-i18next.js (Line 386:14 - Line 170:2)
);
pushTranslatedJSX(child, inner, mem, i);
} else if (Number.isNaN(parseFloat(node.name))) {
if (isKnownComponent) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push(createElement(node.name, { key: `${node.name}-${i}` }));
} else {
const inner = mapAST(
reactNodes /* wrong but we need something */node_modules\react-i18next\src\TransWithoutContext.js (Line 259:15 - Line 267:34), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 170:14 - Line 406:2)
);
mem.push(createElement(node.name, { key: `${node.name}-${i}` }, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(
reactNodes /* wrong but we need something */node_modules\react-i18next\src\TransWithoutContext.js (Line 270:13 - Line 277:6), node_modules\react-i18next\dist\umd\react-i18next.js (Line 406:14 - Line 411:3)
);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if (isObject(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
// v1node_modules\react-i18next\src\TransWithoutContext.js (Line 298:13 - Line 310:72), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 189:2 - Line 201:6)
)
: i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
if (wrapTextNodes) {
mem.push(createElement(wrapTextNodes, { key: `${node.name}-${i}` }, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
// call mapAST with having react nodes nested into additional node likenode_modules\react-i18next\src\TransWithoutContext.js (Line 317:3 - Line 327:2), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 204:2 - Line 212:12)
);
return getChildren(result[0]);
};
const fixComponentProps = (component, index, translation) => {
const componentKey = component.key || index;
const comp = cloneElement(component, { key: componentKey });
if (
!comp.props ||
!comp.props.children ||
(node_modules\react-i18next\src\TransWithoutContext.js (Line 337:3 - Line 346:2), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 218:3 - Line 453:2)
return createElement(Componentized, { key: componentKey });
};
const generateArrayComponents = (components, translation) =>
components.map((c, index) => fixComponentProps(c, index, translation));
const generateObjectComponents = (components, translation) => {
const componentMap = {};
Object.keys(components).forEach((node_modules\react-i18next\src\TransWithoutContext.js (Line 380:2 - Line 385:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 473:2 - Line 476:2)
=> {
if (!isObject(object)) return false;
if (Array.isArray(object)) return false;
return Object.keys(object).reduce(
(acc, key) => acc && Number.isNaN(Number.parseFloat(key)),
true,node_modules\react-i18next\src\TransWithoutContext.js (Line 386:3 - Line 412:2), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 248:5 - Line 498:2)
);
};
export function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18n();
if (!i18n) {
warnOnce(
i18n,
'NO_I18NEXT_INSTANCE',
`Trans: You need to pass in an i18next instance using i18nextReactModule`,
{ i18nKey },node_modules\react-i18next\src\TransWithoutContext.js (Line 422:3 - Line 433:46), node_modules\react-i18next\dist\umd\react-i18next.js (Line 506:4 - Line 515:7)
let namespaces = ns || t.ns || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue =
defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const { hashTransKey } = reactI18nextOptions;
const key =
i18nKey ||
(hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
// eslint-disable-next-line no-param-reassignnode_modules\react-i18next\src\TransWithoutContext.js (Line 453:3 - Line 471:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 537:4 - Line 546:2)
};
const translation = key ? t(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(
indexedChildren,
componentsMap,
translation,
i18n,
reactI18nextOptions,
combinedTOpts,
shouldUnescape,node_modules\react-i18next\src\Translation.js (Line 1:1 - Line 10:2), node_modules\react-i18next\dist\es\Translation.js (Line 1:1 - Line 11:2)
import { useTranslation } from './useTranslation.js';
export const Translation = ({ ns, children, ...options }) => {
const [t, i18n, ready] = useTranslation(ns, options);
return children(
t,
{
i18n,
lng: i18n.language,node_modules\react-i18next\src\Trans.js (Line 1:1 - Line 38:30), node_modules\react-i18next\dist\es\Trans.js (Line 1:1 - Line 37:3)
import { useContext } from 'react';
import { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';
import { getI18n, I18nContext } from './context.js';
export { nodesToString };
export function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const { i18n: i18nFromContext, defaultNS: defaultNSFromContext } = useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
const t = tFromProps || i18n?.t.bind(i18n);
return TransWithoutContext({
children,
count,
parent,
i18nKey,
context,
tOptions,
values,
defaults,
components,
// prepare having a namespacenode_modules\react-i18next\src\index.js (Line 1:1 - Line 15:41), node_modules\react-i18next\dist\es\index.js (Line 1:1 - Line 13:7)
export { Trans } from './Trans.js';
export { Trans as TransWithoutContext } from './TransWithoutContext.js';
export { useTranslation } from './useTranslation.js';
export { withTranslation } from './withTranslation.js';
export { Translation } from './Translation.js';
export { I18nextProvider } from './I18nextProvider.js';
export { withSSR } from './withSSR.js';
export { useSSR } from './useSSR.js';
export { initReactI18next } from './initReactI18next.js';
export { setDefaults, getDefaults } from './defaults.js';
export { setI18n, getI18n } from './i18nInstance.js';
export { I18nContext, composeInitialProps, getInitialProps } from './context.js';
// dummy functions for icu.macro supportnode_modules\react-i18next\src\index.js (Line 17:1 - Line 22:2), node_modules\react-i18next\dist\es\index.js (Line 13:1 - Line 18:2)
export const date = () => '';
export const time = () => '';
export const number = () => '';
export const select = () => '';
export const plural = () => '';
export const selectOrdinal = () => '';node_modules\react-i18next\src\I18nextProvider.js (Line 1:1 - Line 7:2), node_modules\react-i18next\dist\es\I18nextProvider.js (Line 1:1 - Line 15:2)
import { createElement, useMemo } from 'react';
import { I18nContext } from './context.js';
export function I18nextProvider({ i18n, defaultNS, children }) {
const value = useMemo(() => ({ i18n, defaultNS }), [i18n, defaultNS]);
return createElement(I18nContext.Provider, { value }, children);
}node_modules\react-i18next\src\context.js (Line 1:1 - Line 16:2), node_modules\react-i18next\dist\es\context.js (Line 1:1 - Line 12:3)
import { createContext } from 'react';
import { getDefaults, setDefaults } from './defaults.js';
import { getI18n, setI18n } from './i18nInstance.js';
import { initReactI18next } from './initReactI18next.js';
export { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };
export const I18nContext = createContext();
export class ReportNamespaces {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach((node_modules\react-i18next\src\context.js (Line 34:3 - Line 43:2), node_modules\react-i18next\dist\es\context.js (Line 26:3 - Line 33:2)
};
};
export const getInitialProps = () => {
const i18n = getI18n();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach((node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 43:7 - Line 66:2), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 14:2 - Line 37:9)
Internals = {
d: {
f: noop,
r: function () {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
};
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
(node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 95:7 - Line 108:3), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 45:3 - Line 58:9)
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
ifnode_modules\react-dom\cjs\react-dom.react-server.development.js (Line 144:7 - Line 179:4), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 61:3 - Line 90:3)
if (
"string" === typeof href &&
options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence
? options.precedence
: void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
varnode_modules\react-dom\cjs\react-dom.react-server.development.js (Line 270:12 - Line 297:4), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 115:3 - Line 138:3)
, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet
? options.imageSrcSet
: void 0,
imageSizes:
"string" === typeof options.imageSizes
? options.imageSizes
: void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
varnode_modules\react-dom\cjs\react-dom.react-server.development.js (Line 296:2 - Line 310:9), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 178:2 - Line 192:9)
= function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"string"node_modules\react-dom\cjs\react-dom.production.js (Line 89:2 - Line 198:17), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 43:10 - Line 152:8)
;
exports.preconnect = function (href, options) {
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
if ("string" === typeof href && options && "string" === typeof options.as) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence ? options.precedence : void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as) {
var crossOrigin = getCrossOriginStringAs(
options.as,
options.crossOrigin
);
Internals.d.M(href, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
Internals.d.L(href, as, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
imageSizes:
"string" === typeof options.imageSizes ? options.imageSizes : void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
if ("string" === typeof href)
if (options) {
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0
});
} else Internals.d.m(href);
};
exports.requestFormResetnode_modules\react-dom\cjs\react-dom.development.js (Line 44:5 - Line 72:9), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 14:2 - Line 42:4)
}
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
function getValueDescriptorExpectingObjectForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: 'something with type "' + typeof thing + '"';
}
function getValueDescriptorExpectingEnumForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: "string" === typeof thing
? JSON.stringify(thing)
: "number" === typeof thing
? "`" + thing + "`"
: 'something with type "' + typeof thing + '"';
}
functionnode_modules\react-dom\cjs\react-dom.development.js (Line 84:5 - Line 103:2), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 42:5 - Line 32:2)
var React = require("react"),
Internals = {
d: {
f: noop,
r: function () {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
},node_modules\react-dom\cjs\react-dom.development.js (Line 91:13 - Line 104:2), node_modules\react-dom\cjs\react-dom.production.js (Line 33:2 - Line 46:2)
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
},
REACT_PORTAL_TYPE = Symbol.for("react.portal"),node_modules\react-dom\cjs\react-dom.development.js (Line 106:64 - Line 119:13), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 65:2 - Line 78:11)
;
("function" === typeof Map &&
null != Map.prototype &&
"function" === typeof Map.prototype.forEach &&
"function" === typeof Set &&
null != Set.prototype &&
"function" === typeof Set.prototype.clear &&
"function" === typeof Set.prototype.forEach) ||
console.error(
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
);
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.createPortalnode_modules\react-dom\cjs\react-dom.development.js (Line 117:5 - Line 128:41), node_modules\react-dom\cjs\react-dom.production.js (Line 65:1 - Line 76:23)
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.createPortal = function (children, container) {
var key =
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (
!container ||
(1 !== container.nodeType &&
9 !== container.nodeType &&
11 !== container.nodeType)
)
throw Error("Target container is not a DOM element."node_modules\react-dom\cjs\react-dom.development.js (Line 128:41 - Line 140:3), node_modules\react-dom\cjs\react-dom.production.js (Line 76:2 - Line 87:2)
);
return createPortal$1(children, container, null, key);
};
exports.flushSync = function (fn) {
var previousTransition = ReactSharedInternals.T,
previousUpdatePriority = Internals.p;
try {
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
return fn();
} finally {
(ReactSharedInternals.T = previousTransition),
(Internals.p = previousUpdatePriority),
Internals.d.f() &&node_modules\react-dom\cjs\react-dom.development.js (Line 145:2 - Line 407:17), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 77:10 - Line 339:8)
;
exports.preconnect = function (href, options) {
"string" === typeof href && href
? null != options && "object" !== typeof options
? console.error(
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
getValueDescriptorExpectingEnumForWarning(options)
)
: null != options &&
"string" !== typeof options.crossOrigin &&
console.error(
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
)
: console.error(
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
if ("string" !== typeof href || !href)
console.error(
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
else if (1 < arguments.length) {
var options = arguments[1];
"object" === typeof options && options.hasOwnProperty("crossOrigin")
? console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
)
: console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
);
}
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
"string" === typeof href && href
? null == options || "object" !== typeof options
? console.error(
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
getValueDescriptorExpectingEnumForWarning(options)
)
: "style" !== options.as &&
"script" !== options.as &&
console.error(
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
getValueDescriptorExpectingEnumForWarning(options.as)
)
: console.error(
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
if (
"string" === typeof href &&
options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence
? options.precedence
: void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"script" !== options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingEnumForWarning(options.as) +
".");
if (encountered)
console.error(
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
encountered
);
else
switch (
((encountered =
options && "string" === typeof options.as ? options.as : "script"),
encountered)
) {
case "script":
break;
default:
(encountered =
getValueDescriptorExpectingEnumForWarning(encountered)),
console.error(
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
encountered,
href
);
}
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as)
(encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.M(href, {
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0,
nonce:
"string" === typeof options.nonce ? options.nonce : void 0
});
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
null == options || "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: ("string" === typeof options.as && options.as) ||
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
encountered
);
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
encountered = options.as;
var crossOrigin = getCrossOriginStringAs(
encountered,
options.crossOrigin
);
Internals.d.L(href, encountered, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet
? options.imageSrcSet
: void 0,
imageSizes:
"string" === typeof options.imageSizes
? options.imageSizes
: void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"string" !== typeof options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
encountered
);
"string" === typeof href &&
(options
? ((encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0
}))
: Internals.d.m(href));
};
exports.requestFormResetnode_modules\react-dom\cjs\react-dom.development.js (Line 405:2 - Line 414:18), node_modules\react-dom\cjs\react-dom.production.js (Line 196:5 - Line 205:21)
);
};
exports.requestFormReset = function (form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.useFormState = function (action, initialState, permalink) {
return resolveDispatchernode_modules\react-dom\cjs\react-dom-test-utils.development.js (Line 14:5 - Line 23:2), node_modules\react-dom\cjs\react-dom-test-utils.production.js (Line 12:1 - Line 21:2)
var React = require("react"),
didWarnAboutUsingAct = !1;
exports.act = function (callback) {
!1 === didWarnAboutUsingAct &&
((didWarnAboutUsingAct = !0),
console.error(
"`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info."
));
return React.act(callback);
};node_modules\react\cjs\react.react-server.production.js (Line 12:2 - Line 28:4), node_modules\react-dom\cjs\react-dom.production.js (Line 12:2 - Line 28:9)
;
function formatProdErrorMessage(code) {
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
"; visit " +
url +
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
varnode_modules\react\cjs\react.react-server.development.js (Line 226:7 - Line 244:9), node_modules\react\cjs\react.react-server.production.js (Line 66:2 - Line 84:4)
;
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
functionnode_modules\react\cjs\react.react-server.development.js (Line 248:2 - Line 316:2), node_modules\react\cjs\react.react-server.production.js (Line 87:4 - Line 155:7)
)
: index.toString(36);
}
function noop() {}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"),
(thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback) {node_modules\react\cjs\react.react-server.development.js (Line 384:2 - Line 403:50), node_modules\react\cjs\react.react-server.production.js (Line 204:2 - Line 223:23)
+ getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: "node_modules\react\cjs\react.react-server.development.js (Line 408:9 - Line 421:18), node_modules\react\cjs\react.react-server.production.js (Line 229:5 - Line 242:16)
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function resolveDispatchernode_modules\react\cjs\react.react-server.development.js (Line 427:11 - Line 447:2), node_modules\react\cjs\react.react-server.production.js (Line 240:7 - Line 258:8)
;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 1), (payload._result = moduleObject);
},
function (error) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 2), (payload._result = error);
}
);
-1 === payload._status &&
((payload._status = 0), (payload._result = ctor));
}
if (1 === payload._status)
return (node_modules\react\cjs\react.react-server.development.js (Line 475:7 - Line 480:2), node_modules\react\cjs\react.react-server.production.js (Line 28:2 - Line 33:2)
isArrayImpl = Array.isArray,
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler");node_modules\react\cjs\react.react-server.development.js (Line 515:5 - Line 543:72), node_modules\react\cjs\react.react-server.production.js (Line 267:1 - Line 293:23)
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."node_modules\react\cjs\react.react-server.development.js (Line 544:11 - Line 593:2), node_modules\react\cjs\react.react-server.production.js (Line 293:2 - Line 339:7)
);
return children;
}
};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.cache = function (fn) {
return function () {
var dispatcher = ReactSharedInternals.A;
if (!dispatcher) return fn.apply(null, arguments);
var fnMap = dispatcher.getCacheForType(createCacheRoot);
dispatcher = fnMap.get(fn);
void 0 === dispatcher &&
((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
fnMap = 0;
for (var l = arguments.length; fnMap < l; fnMap++) {
var arg = arguments[fnMap];
if (
"function" === typeof arg ||
("object" === typeof arg && null !== arg)
) {
var objectCache = dispatcher.o;
null === objectCache &&
(dispatcher.o = objectCache = new WeakMap());
dispatcher = objectCache.get(arg);
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
} else
(objectCache = dispatcher.p),
null === objectCache && (dispatcher.p = objectCache = new Map()),
(dispatcher = objectCache.get(arg)),
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
}
if (1 === dispatcher.s) return dispatcher.v;
if (2 === dispatcher.s) throw dispatcher.v;
try {
var result = fn.apply(null, arguments);
fnMap = dispatcher;
fnMap.s = 1;
return (fnMap.v = result);
} catch (error) {
throw (
((node_modules\react\cjs\react.react-server.development.js (Line 763:12 - Line 774:5), node_modules\react\cjs\react.react-server.production.js (Line 399:2 - Line 410:7)
;
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function (type, compare) {
nullnode_modules\react\cjs\react.production.js (Line 18:16 - Line 31:21), node_modules\react\cjs\react.react-server.production.js (Line 33:17 - Line 46:15)
),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
var ReactNoopUpdateQueuenode_modules\react\cjs\react.production.js (Line 76:15 - Line 119:7), node_modules\react\cjs\react.react-server.production.js (Line 47:7 - Line 90:5)
;
function ReactElement(type, key, self, source, owner, props) {
self = props.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== self ? self : null,
props: props
};
}
function cloneAndReplaceKey(oldElement, newKey) {
return ReactElement(
oldElement.type,
newKey,
void 0,
void 0,
void 0,
oldElement.props
);
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key
? escape("" + element.key)
: index.toString(36);
}
function noop$1node_modules\react\cjs\react.production.js (Line 129:2 - Line 289:4), node_modules\react\cjs\react.react-server.production.js (Line 100:5 - Line 261:9)
)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback)
return (
(callback = callback(children)),
(invokeCallback =
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != invokeCallback &&
(escapedPrefix =
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(callback = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(children && children.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
invokeCallback
)),
array.push(callback)),
1
);
invokeCallback = 0;
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
children = i.call(children), i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array) +
"). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 1), (payload._result = moduleObject);
},
function (error) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 2), (payload._result = error);
}
);
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
}
if (1 === payload._status) return payload._result.default;
throw payload._result;
}
varnode_modules\react\cjs\react.production.js (Line 318:2 - Line 352:10), node_modules\react\cjs\react.react-server.production.js (Line 266:1 - Line 548:9)
}
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Componentnode_modules\react\cjs\react.production.js (Line 369:2 - Line 378:5), node_modules\react\cjs\react.react-server.development.js (Line 600:2 - Line 611:8)
;
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props),
key = element.key,
owner = voidnode_modules\react\cjs\react.production.js (Line 375:5 - Line 398:14), node_modules\react\cjs\react.react-server.production.js (Line 348:2 - Line 371:14)
);
var props = assign({}, element.props),
key = element.key,
owner = void 0;
if (null != config)
for (propName in (void 0 !== config.ref && (owner = void 0),
void 0 !== config.key && (key = "" + config.key),
config))
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
for (var childArray = Array(propName), i = 0; i < propName; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
return ReactElement(element.type, key, void 0, void 0, owner, props);
};
exports.createContextnode_modules\react\cjs\react.production.js (Line 412:13 - Line 459:16), node_modules\react\cjs\react.react-server.production.js (Line 369:2 - Line 416:4)
;
};
exports.createElement = function (type, config, children) {
var propName,
props = {},
key = null;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(props[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === props[propName] &&
(props[propName] = childrenLength[propName]);
return ReactElement(type, key, void 0, void 0, null, props);
};
exports.createRef = function () {
return { current: null };
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function (type, compare) {
return {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
};
exports.startTransitionnode_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 14:5 - Line 72:19), node_modules\react\cjs\react.react-server.development.js (Line 49:5 - Line 107:12)
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercionnode_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 70:2 - Line 99:12), node_modules\react\cjs\react.react-server.development.js (Line 20:2 - Line 49:25)
null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskNamenode_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 98:5 - Line 115:27), node_modules\react\cjs\react.react-server.development.js (Line 106:5 - Line 123:21)
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternalsServernode_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 115:27 - Line 205:11), node_modules\react\cjs\react.react-server.development.js (Line 123:21 - Line 213:19)
.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(
type,
key,
self,
source,
owner,
props,
debugStack,
debugTask
) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== self ? self : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImplnode_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 287:2 - Line 302:23), node_modules\react\cjs\react.react-server.development.js (Line 475:8 - Line 490:22)
,
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCEnode_modules\react\cjs\react-jsx-runtime.profiling.js (Line 13:17 - Line 34:5), node_modules\react\cjs\react-jsx-runtime.react-server.production.js (Line 18:3 - Line 39:7)
);
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxsnode_modules\react\cjs\react-jsx-runtime.production.js (Line 11:1 - Line 34:2), node_modules\react\cjs\react-jsx-runtime.profiling.js (Line 11:1 - Line 34:2)
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;node_modules\react\cjs\react-jsx-runtime.development.js (Line 11:1 - Line 303:21), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 11:1 - Line 303:27)
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(
type,
key,
self,
source,
owner,
props,
debugStack,
debugTask
) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== self ? self : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
source,
self,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
self,
source,
getOwner(),
maybeKey,
debugStack,
debugTask
);
}
function validateChildKeys(node) {
"object" === typeof node &&
null !== node &&
node.$$typeof === REACT_ELEMENT_TYPE &&
node._store &&
(node._store.validated = 1);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternalsnode_modules\react\cjs\react-jsx-runtime.development.js (Line 305:7 - Line 328:21), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 309:2 - Line 332:27)
hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey, source, self) {
var trackActualOwner =
1e4 > ReactSharedInternalsnode_modules\react\cjs\react-jsx-runtime.development.js (Line 333:2 - Line 344:21), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 360:17 - Line 371:27)
,
source,
self,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey, source, self) {
var trackActualOwner =
1e4 > ReactSharedInternalsnode_modules\react\cjs\react-jsx-dev-runtime.react-server.production.js (Line 11:1 - Line 40:2), node_modules\react\cjs\react-jsx-runtime.react-server.production.js (Line 11:1 - Line 40:2)
"use strict";
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxDEV = void 0;
exports.jsxs = jsxProd;node_modules\react\cjs\react-jsx-dev-runtime.react-server.development.js (Line 11:1 - Line 385:2), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 11:1 - Line 385:2)
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternalsServer.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(
type,
key,
self,
source,
owner,
props,
debugStack,
debugTask
) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== self ? self : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
source,
self,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
self,
source,
getOwner(),
maybeKey,
debugStack,
debugTask
);
}
function validateChildKeys(node) {
"object" === typeof node &&
null !== node &&
node.$$typeof === REACT_ELEMENT_TYPE &&
node._store &&
(node._store.validated = 1);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternalsServer =
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
if (!ReactSharedInternalsServer)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
var hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey, source, self) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!1,
source,
self,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxDEV = function (
type,
config,
maybeKey,
isStaticChildren,
source,
self
) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
source,
self,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey, source, self) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!0,
source,
self,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();node_modules\react\cjs\react-jsx-dev-runtime.development.js (Line 11:1 - Line 326:7), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 11:1 - Line 330:4)
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(
type,
key,
self,
source,
owner,
props,
debugStack,
debugTask
) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== self ? self : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
source,
self,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
self,
source,
getOwner(),
maybeKey,
debugStack,
debugTask
);
}
function validateChildKeys(node) {
"object" === typeof node &&
null !== node &&
node.$$typeof === REACT_ELEMENT_TYPE &&
node._store &&
(node._store.validated = 1);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsxDEVnode_modules\rc-util\lib\ContainerRender.js (Line 7:2 - Line 14:7), node_modules\rc-util\lib\PortalWrapper.js (Line 9:13 - Line 16:9)
;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _reactnode_modules\rc-util\es\warning.js (Line 24:2 - Line 36:7), node_modules\rc-util\lib\warning.js (Line 37:1 - Line 49:9)
function warning(valid, message) {
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
}, message);
if (finalMessage) {
console.error("Warning: ".concat(finalMessage));
}
}
}
/** @see Similar to {@link warning} */
exportnode_modules\rc-util\es\warning.js (Line 36:2 - Line 46:7), node_modules\rc-util\lib\warning.js (Line 49:1 - Line 59:9)
function note(valid, message) {
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');
}, message);
if (finalMessage) {
console.warn("Note: ".concat(finalMessage));
}
}
}
exportnode_modules\rc-util\es\unsafeLifecyclesPolyfill.js (Line 1:8 - Line 15:6), node_modules\rc-util\lib\unsafeLifecyclesPolyfill.js (Line 8:2 - Line 22:7)
;
var unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
}
// only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
}
// In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!Reactnode_modules\rc-util\es\switchScrollingEffect.js (Line 7:2 - Line 18:9), node_modules\rc-util\lib\switchScrollingEffect.js (Line 14:9 - Line 25:2)
(close) {
if (!isBodyOverflowing() && !close) {
return;
}
// https://github.com/ant-design/ant-design/issues/19729
var scrollingEffectClassName = 'ant-scrolling-effect';
var scrollingEffectClassNameReg = new RegExp("".concat(scrollingEffectClassName), 'g');
var bodyClassName = document.body.className;
if (close) {
if (!scrollingEffectClassNameReg.test(bodyClassName)) return;
setStylenode_modules\rc-util\es\switchScrollingEffect.js (Line 25:9 - Line 34:2), node_modules\rc-util\lib\switchScrollingEffect.js (Line 32:2 - Line 41:2)
({
position: 'relative',
width: "calc(100% - ".concat(scrollBarSize, "px)")
});
if (!scrollingEffectClassNameReg.test(bodyClassName)) {
var addClassName = "".concat(bodyClassName, " ").concat(scrollingEffectClassName);
document.body.className = addClassName.trim();
}
}
})node_modules\rc-util\es\setStyle.js (Line 1:1 - Line 26:7), node_modules\rc-util\lib\setStyle.js (Line 7:1 - Line 32:4)
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
function setStyle(style) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!style) {
return {};
}
var _options$element = options.element,
element = _options$element === void 0 ? document.body : _options$element;
var oldStyle = {};
var styleKeys = Object.keys(style);
// IE browser compatible
styleKeys.forEach(function (key) {
oldStyle[key] = element.style[key];
});
styleKeys.forEach(function (key) {
element.style[key] = style[key];
});
return oldStyle;
}
exportnode_modules\rc-util\es\ref.js (Line 18:2 - Line 32:7), node_modules\rc-util\lib\ref.js (Line 25:2 - Line 39:4)
composeRef = function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
var refList = refs.filter(Boolean);
if (refList.length <= 1) {
return refList[0];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
};
exportnode_modules\rc-util\es\ref.js (Line 36:8 - Line 44:7), node_modules\rc-util\lib\ref.js (Line 43:2 - Line 51:4)
(function () {
return composeRef.apply(void 0, refs);
}, refs, function (prev, next) {
return prev.length !== next.length || prev.every(function (ref, i) {
return ref !== next[i];
});
});
};
exportnode_modules\rc-util\es\ref.js (Line 79:2 - Line 88:2), node_modules\rc-util\lib\ref.js (Line 86:2 - Line 95:2)
getNodeRef = function getNodeRef(node) {
if (node && isReactElement(node)) {
var ele = node;
// Source from:
// https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/getReactNodeRef/getReactNodeRef.ts
return ele.props.propertyIsEnumerable('ref') ? ele.props.ref : ele.ref;
}
return null;
};node_modules\rc-util\es\raf.js (Line 1:1 - Line 54:7), node_modules\rc-util\lib\raf.js (Line 7:1 - Line 60:4)
var raf = function raf(callback) {
return +setTimeout(callback, 16);
};
var caf = function caf(num) {
return clearTimeout(num);
};
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
raf = function raf(callback) {
return window.requestAnimationFrame(callback);
};
caf = function caf(handle) {
return window.cancelAnimationFrame(handle);
};
}
var rafUUID = 0;
var rafIds = new Map();
function cleanup(id) {
rafIds.delete(id);
}
var wrapperRaf = function wrapperRaf(callback) {
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
rafUUID += 1;
var id = rafUUID;
function callRef(leftTimes) {
if (leftTimes === 0) {
// Clean up
cleanup(id);
// Trigger
callback();
} else {
// Next raf
var realId = raf(function () {
callRef(leftTimes - 1);
});
// Bind real raf id
rafIds.set(id, realId);
}
}
callRef(times);
return id;
};
wrapperRaf.cancel = function (id) {
var realId = rafIds.get(id);
cleanup(id);
return caf(realId);
};
if (process.env.NODE_ENV !== 'production') {
wrapperRaf.ids = function () {
return rafIds;
};
}
exportnode_modules\rc-util\es\proxyObject.js (Line 4:2 - Line 19:2), node_modules\rc-util\lib\proxyObject.js (Line 10:1 - Line 25:2)
function proxyObject(obj, extendProps) {
if (typeof Proxy !== 'undefined' && obj) {
return new Proxy(obj, {
get: function get(target, prop) {
if (extendProps[prop]) {
return extendProps[prop];
}
// Proxy origin property
var originProp = target[prop];
return typeof originProp === 'function' ? originProp.bind(target) : originProp;
}
});
}
return obj;
}node_modules\rc-util\es\PortalWrapper.js (Line 20:2 - Line 38:8), node_modules\rc-util\lib\PortalWrapper.js (Line 30:1 - Line 48:2)
function getOpenCount() {
return process.env.NODE_ENV === 'test' ? openCount : 0;
}
// https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
var cacheOverflow = {};
var getParent = function getParent(getContainer) {
if (!supportDom) {
return null;
}
if (getContainer) {
if (typeof getContainer === 'string') {
return document.querySelectorAll(getContainer)[0];
}
if (typeof getContainer === 'function') {
return getContainer();
}
if (_typeofnode_modules\rc-util\es\PortalWrapper.js (Line 56:23 - Line 68:16), node_modules\rc-util\lib\PortalWrapper.js (Line 66:2 - Line 78:2)
(_this), "updateScrollLocker", function (prevProps) {
var _ref = prevProps || {},
prevVisible = _ref.visible;
var _this$props = _this.props,
getContainer = _this$props.getContainer,
visible = _this$props.visible;
if (visible && visible !== prevVisible && supportDom && getParent(getContainer) !== _this.scrollLocker.getContainer()) {
_this.scrollLocker.reLock({
container: getParent(getContainer)
});
}
});
_definePropertynode_modules\rc-util\es\PortalWrapper.js (Line 68:23 - Line 91:16), node_modules\rc-util\lib\PortalWrapper.js (Line 78:2 - Line 101:2)
(_this), "updateOpenCount", function (prevProps) {
var _ref2 = prevProps || {},
prevVisible = _ref2.visible,
prevGetContainer = _ref2.getContainer;
var _this$props2 = _this.props,
visible = _this$props2.visible,
getContainer = _this$props2.getContainer;
// Update count
if (visible !== prevVisible && supportDom && getParent(getContainer) === document.body) {
if (visible && !prevVisible) {
openCount += 1;
} else if (prevProps) {
openCount -= 1;
}
}
// Clean up container if needed
var getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) {
_this.removeCurrentContainer();
}
});
_definePropertynode_modules\rc-util\es\PortalWrapper.js (Line 91:23 - Line 103:16), node_modules\rc-util\lib\PortalWrapper.js (Line 101:2 - Line 113:2)
(_this), "attachToParent", function () {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (force || _this.container && !_this.container.parentNode) {
var parent = getParent(_this.props.getContainer);
if (parent) {
parent.appendChild(_this.container);
return true;
}
return false;
}
return true;
});
_definePropertynode_modules\rc-util\es\PortalWrapper.js (Line 103:23 - Line 114:16), node_modules\rc-util\lib\PortalWrapper.js (Line 113:2 - Line 124:2)
(_this), "getContainer", function () {
if (!supportDom) {
return null;
}
if (!_this.container) {
_this.container = document.createElement('div');
_this.attachToParent(true);
}
_this.setWrapperClassName();
return _this.container;
});
_definePropertynode_modules\rc-util\es\PortalWrapper.js (Line 120:23 - Line 134:16), node_modules\rc-util\lib\PortalWrapper.js (Line 130:2 - Line 144:2)
(_this), "removeCurrentContainer", function () {
var _this$container;
// Portal will remove from `parentNode`.
// Let's handle this again to avoid refactor issue.
(_this$container = _this.container) === null || _this$container === void 0 || (_this$container = _this$container.parentNode) === null || _this$container === void 0 || _this$container.removeChild(_this.container);
});
/**
* Enhance ./switchScrollingEffect
* 1. Simulate document body scroll bar with
* 2. Record body has overflow style and recover when all of PortalWrapper invisible
* 3. Disable body scroll when PortalWrapper has open
*
* @memberof PortalWrapper
*/
_definePropertynode_modules\rc-util\es\PortalWrapper.js (Line 160:4 - Line 184:4), node_modules\rc-util\lib\PortalWrapper.js (Line 170:2 - Line 194:5)
(function () {
_this2.forceUpdate();
});
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
this.updateOpenCount(prevProps);
this.updateScrollLocker(prevProps);
this.setWrapperClassName();
this.attachToParent();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var _this$props3 = this.props,
visible = _this$props3.visible,
getContainer = _this$props3.getContainer;
if (supportDom && getParent(getContainer) === document.body) {
// 离开时不会 render, 导到离开时数值不变,改用 func 。。
openCount = visible && openCount ? openCount - 1 : openCount;
}
this.removeCurrentContainer();
rafnode_modules\rc-util\es\PortalWrapper.js (Line 184:4 - Line 203:7), node_modules\rc-util\lib\PortalWrapper.js (Line 194:8 - Line 213:8)
.cancel(this.rafId);
}
}, {
key: "render",
value: function render() {
var _this$props4 = this.props,
children = _this$props4.children,
forceRender = _this$props4.forceRender,
visible = _this$props4.visible;
var portal = null;
var childProps = {
getOpenCount: function getOpenCount() {
return openCount;
},
getContainer: this.getContainer,
switchScrollingEffect: this.switchScrollingEffect,
scrollLocker: this.scrollLocker
};
if (forceRender || visible || this.componentRef.current) {
portal = /*#__PURE__*/React.createElement(Portalnode_modules\rc-util\es\Portal.js (Line 28:10 - Line 42:9), node_modules\rc-util\lib\Portal.js (Line 35:2 - Line 49:10)
(function () {
// Restore container to original place
// React 18 StrictMode will unmount first and mount back for effect test:
// https://reactjs.org/blog/2022/03/29/react-v18.html#new-strict-mode-behaviors
if (containerRef.current.parentNode === null && parentRef.current !== null) {
parentRef.current.appendChild(containerRef.current);
}
return function () {
var _containerRef$current;
// [Legacy] This should not be handle by Portal but parent PortalWrapper instead.
// Since some component use `Portal` directly, we have to keep the logic here.
(_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 || (_containerRef$current = _containerRef$current.parentNode) === null || _containerRef$current === void 0 || _containerRef$current.removeChild(containerRef.current);
};
}, []);
return containerRef.current ? /*#__PURE__*/ReactDOMnode_modules\rc-util\es\pickAttrs.js (Line 1:43 - Line 17:7), node_modules\rc-util\lib\pickAttrs.js (Line 8:2 - Line 24:9)
;
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/);
/* eslint-enable max-len */
var ariaPrefix = 'aria-';
var dataPrefix = 'data-';
function match(key, prefix) {
return key.indexOf(prefix) === 0;
}
/**
* Picker props from exist props with filter
* @param props Passed props
* @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
*/
exportnode_modules\rc-util\es\pickAttrs.js (Line 17:2 - Line 31:14), node_modules\rc-util\lib\pickAttrs.js (Line 24:1 - Line 38:2)
function pickAttrs(props) {
var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var mergedConfig;
if (ariaOnly === false) {
mergedConfig = {
aria: true,
data: true,
attr: true
};
} else if (ariaOnly === true) {
mergedConfig = {
aria: true
};
} else {
mergedConfig = _objectSpreadnode_modules\rc-util\es\pickAttrs.js (Line 31:14 - Line 46:2), node_modules\rc-util\lib\pickAttrs.js (Line 38:2 - Line 53:2)
({}, ariaOnly);
}
var attrs = {};
Object.keys(props).forEach(function (key) {
if (
// Aria
mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||
// Data
mergedConfig.data && match(key, dataPrefix) ||
// Attr
mergedConfig.attr && propList.includes(key)) {
attrs[key] = props[key];
}
});
return attrs;
}node_modules\rc-util\es\omit.js (Line 1:2 - Line 9:2), node_modules\rc-util\lib\omit.js (Line 7:1 - Line 15:2)
function omit(obj, fields) {
var clone = Object.assign({}, obj);
if (Array.isArray(fields)) {
fields.forEach(function (key) {
delete clone[key];
});
}
return clone;
}node_modules\rc-util\es\KeyCode.js (Line 1:1 - Line 538:7), node_modules\rc-util\lib\KeyCode.js (Line 7:1 - Line 544:4)
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var KeyCode = {
/**
* MAC_ENTER
*/
MAC_ENTER: 3,
/**
* BACKSPACE
*/
BACKSPACE: 8,
/**
* TAB
*/
TAB: 9,
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: 12,
// NUMLOCK on FF/Safari Mac
/**
* ENTER
*/
ENTER: 13,
/**
* SHIFT
*/
SHIFT: 16,
/**
* CTRL
*/
CTRL: 17,
/**
* ALT
*/
ALT: 18,
/**
* PAUSE
*/
PAUSE: 19,
/**
* CAPS_LOCK
*/
CAPS_LOCK: 20,
/**
* ESC
*/
ESC: 27,
/**
* SPACE
*/
SPACE: 32,
/**
* PAGE_UP
*/
PAGE_UP: 33,
// also NUM_NORTH_EAST
/**
* PAGE_DOWN
*/
PAGE_DOWN: 34,
// also NUM_SOUTH_EAST
/**
* END
*/
END: 35,
// also NUM_SOUTH_WEST
/**
* HOME
*/
HOME: 36,
// also NUM_NORTH_WEST
/**
* LEFT
*/
LEFT: 37,
// also NUM_WEST
/**
* UP
*/
UP: 38,
// also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39,
// also NUM_EAST
/**
* DOWN
*/
DOWN: 40,
// also NUM_SOUTH
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: 44,
/**
* INSERT
*/
INSERT: 45,
// also NUM_INSERT
/**
* DELETE
*/
DELETE: 46,
// also NUM_DELETE
/**
* ZERO
*/
ZERO: 48,
/**
* ONE
*/
ONE: 49,
/**
* TWO
*/
TWO: 50,
/**
* THREE
*/
THREE: 51,
/**
* FOUR
*/
FOUR: 52,
/**
* FIVE
*/
FIVE: 53,
/**
* SIX
*/
SIX: 54,
/**
* SEVEN
*/
SEVEN: 55,
/**
* EIGHT
*/
EIGHT: 56,
/**
* NINE
*/
NINE: 57,
/**
* QUESTION_MARK
*/
QUESTION_MARK: 63,
// needs localization
/**
* A
*/
A: 65,
/**
* B
*/
B: 66,
/**
* C
*/
C: 67,
/**
* D
*/
D: 68,
/**
* E
*/
E: 69,
/**
* F
*/
F: 70,
/**
* G
*/
G: 71,
/**
* H
*/
H: 72,
/**
* I
*/
I: 73,
/**
* J
*/
J: 74,
/**
* K
*/
K: 75,
/**
* L
*/
L: 76,
/**
* M
*/
M: 77,
/**
* N
*/
N: 78,
/**
* O
*/
O: 79,
/**
* P
*/
P: 80,
/**
* Q
*/
Q: 81,
/**
* R
*/
R: 82,
/**
* S
*/
S: 83,
/**
* T
*/
T: 84,
/**
* U
*/
U: 85,
/**
* V
*/
V: 86,
/**
* W
*/
W: 87,
/**
* X
*/
X: 88,
/**
* Y
*/
Y: 89,
/**
* Z
*/
Z: 90,
/**
* META
*/
META: 91,
// WIN_KEY_LEFT
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: 92,
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: 93,
/**
* NUM_ZERO
*/
NUM_ZERO: 96,
/**
* NUM_ONE
*/
NUM_ONE: 97,
/**
* NUM_TWO
*/
NUM_TWO: 98,
/**
* NUM_THREE
*/
NUM_THREE: 99,
/**
* NUM_FOUR
*/
NUM_FOUR: 100,
/**
* NUM_FIVE
*/
NUM_FIVE: 101,
/**
* NUM_SIX
*/
NUM_SIX: 102,
/**
* NUM_SEVEN
*/
NUM_SEVEN: 103,
/**
* NUM_EIGHT
*/
NUM_EIGHT: 104,
/**
* NUM_NINE
*/
NUM_NINE: 105,
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: 106,
/**
* NUM_PLUS
*/
NUM_PLUS: 107,
/**
* NUM_MINUS
*/
NUM_MINUS: 109,
/**
* NUM_PERIOD
*/
NUM_PERIOD: 110,
/**
* NUM_DIVISION
*/
NUM_DIVISION: 111,
/**
* F1
*/
F1: 112,
/**
* F2
*/
F2: 113,
/**
* F3
*/
F3: 114,
/**
* F4
*/
F4: 115,
/**
* F5
*/
F5: 116,
/**
* F6
*/
F6: 117,
/**
* F7
*/
F7: 118,
/**
* F8
*/
F8: 119,
/**
* F9
*/
F9: 120,
/**
* F10
*/
F10: 121,
/**
* F11
*/
F11: 122,
/**
* F12
*/
F12: 123,
/**
* NUMLOCK
*/
NUMLOCK: 144,
/**
* SEMICOLON
*/
SEMICOLON: 186,
// needs localization
/**
* DASH
*/
DASH: 189,
// needs localization
/**
* EQUALS
*/
EQUALS: 187,
// needs localization
/**
* COMMA
*/
COMMA: 188,
// needs localization
/**
* PERIOD
*/
PERIOD: 190,
// needs localization
/**
* SLASH
*/
SLASH: 191,
// needs localization
/**
* APOSTROPHE
*/
APOSTROPHE: 192,
// needs localization
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: 222,
// needs localization
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: 219,
// needs localization
/**
* BACKSLASH
*/
BACKSLASH: 220,
// needs localization
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: 221,
// needs localization
/**
* WIN_KEY
*/
WIN_KEY: 224,
/**
* MAC_FF_META
*/
MAC_FF_META: 224,
// Firefox (Gecko) fires this for the meta key instead of 91
/**
* WIN_IME
*/
WIN_IME: 229,
// ======================== Function ========================
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
var keyCode = e.keyCode;
if (e.altKey && !e.ctrlKey || e.metaKey ||
// Function keys don't generate text
keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
return false;
}
// The following keys are quite harmless, even in combination with
// CTRL, ALT or SHIFT.
switch (keyCode) {
case KeyCode.ALT:
case KeyCode.CAPS_LOCK:
case KeyCode.CONTEXT_MENU:
case KeyCode.CTRL:
case KeyCode.DOWN:
case KeyCode.END:
case KeyCode.ESC:
case KeyCode.HOME:
case KeyCode.INSERT:
case KeyCode.LEFT:
case KeyCode.MAC_FF_META:
case KeyCode.META:
case KeyCode.NUMLOCK:
case KeyCode.NUM_CENTER:
case KeyCode.PAGE_DOWN:
case KeyCode.PAGE_UP:
case KeyCode.PAUSE:
case KeyCode.PRINT_SCREEN:
case KeyCode.RIGHT:
case KeyCode.SHIFT:
case KeyCode.UP:
case KeyCode.WIN_KEY:
case KeyCode.WIN_KEY_RIGHT:
return false;
default:
return true;
}
},
/**
* whether character is entered.
*/
isCharacterKey: function isCharacterKey(keyCode) {
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
return true;
}
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
return true;
}
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
return true;
}
// Safari sends zero key code for non-latin characters.
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
return true;
}
switch (keyCode) {
case KeyCode.SPACE:
case KeyCode.QUESTION_MARK:
case KeyCode.NUM_PLUS:
case KeyCode.NUM_MINUS:
case KeyCode.NUM_PERIOD:
case KeyCode.NUM_DIVISION:
case KeyCode.SEMICOLON:
case KeyCode.DASH:
case KeyCode.EQUALS:
case KeyCode.COMMA:
case KeyCode.PERIOD:
case KeyCode.SLASH:
case KeyCode.APOSTROPHE:
case KeyCode.SINGLE_QUOTE:
case KeyCode.OPEN_SQUARE_BRACKET:
case KeyCode.BACKSLASH:
case KeyCode.CLOSE_SQUARE_BRACKET:
return true;
default:
return false;
}
}
};
exportnode_modules\rc-util\es\isMobile.js (Line 1:2 - Line 7:2), node_modules\rc-util\lib\isMobile.js (Line 7:9 - Line 13:2)
() {
if (typeof navigator === 'undefined' || typeof window === 'undefined') {
return false;
}
var agent = navigator.userAgent || navigator.vendor || window.opera;
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));
})node_modules\rc-util\es\isEqual.js (Line 2:12 - Line 18:8), node_modules\rc-util\lib\isEqual.js (Line 9:2 - Line 24:2)
;
/**
* Deeply compares two object literals.
* @param obj1 object 1
* @param obj2 object 2
* @param shallow shallow compare
* @returns
*/
function isEqual(obj1, obj2) {
var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
// https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
var refSet = new Set();
function deepEqual(a, b) {
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var circular = refSet.has(a);
warningnode_modules\rc-util\es\isEqual.js (Line 18:8 - Line 41:8), node_modules\rc-util\lib\isEqual.js (Line 24:2 - Line 47:2)
(!circular, 'Warning: There may be circular references');
if (circular) {
return false;
}
if (a === b) {
return true;
}
if (shallow && level > 1) {
return false;
}
refSet.add(a);
var newLevel = level + 1;
if (Array.isArray(a)) {
if (!Array.isArray(b) || a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; i++) {
if (!deepEqual(a[i], b[i], newLevel)) {
return false;
}
}
return true;
}
if (a && b && _typeofnode_modules\rc-util\es\isEqual.js (Line 41:8 - Line 55:7), node_modules\rc-util\lib\isEqual.js (Line 47:2 - Line 61:4)
(b) === 'object') {
var keys = Object.keys(a);
if (keys.length !== Object.keys(b).length) {
return false;
}
return keys.every(function (key) {
return deepEqual(a[key], b[key], newLevel);
});
}
// other
return false;
}
return deepEqual(obj1, obj2);
}
exportnode_modules\rc-util\es\getScrollBarSize.js (Line 3:1 - Line 35:10), node_modules\rc-util\lib\getScrollBarSize.js (Line 11:1 - Line 43:2)
var cached;
function measureScrollbarSize(ele) {
var randomId = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7));
var measureEle = document.createElement('div');
measureEle.id = randomId;
// Create Style
var measureStyle = measureEle.style;
measureStyle.position = 'absolute';
measureStyle.left = '0';
measureStyle.top = '0';
measureStyle.width = '100px';
measureStyle.height = '100px';
measureStyle.overflow = 'scroll';
// Clone Style if needed
var fallbackWidth;
var fallbackHeight;
if (ele) {
var targetStyle = getComputedStyle(ele);
measureStyle.scrollbarColor = targetStyle.scrollbarColor;
measureStyle.scrollbarWidth = targetStyle.scrollbarWidth;
// Set Webkit style
var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
var width = parseInt(webkitScrollbarStyle.width, 10);
var height = parseInt(webkitScrollbarStyle.height, 10);
// Try wrap to handle CSP case
try {
var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
updateCSSnode_modules\rc-util\es\getScrollBarSize.js (Line 35:10 - Line 53:10), node_modules\rc-util\lib\getScrollBarSize.js (Line 43:2 - Line 61:2)
("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
} catch (e) {
// Can't wrap, just log error
console.error(e);
// Get from style directly
fallbackWidth = width;
fallbackHeight = height;
}
}
document.body.appendChild(measureEle);
// Measure. Get fallback style if provided
var scrollWidth = ele && fallbackWidth && !isNaN(fallbackWidth) ? fallbackWidth : measureEle.offsetWidth - measureEle.clientWidth;
var scrollHeight = ele && fallbackHeight && !isNaN(fallbackHeight) ? fallbackHeight : measureEle.offsetHeight - measureEle.clientHeight;
// Clean up
document.body.removeChild(measureEle);
removeCSSnode_modules\rc-util\es\getContainerRenderMixin.js (Line 8:2 - Line 30:9), node_modules\rc-util\lib\getContainerRenderMixin.js (Line 15:1 - Line 37:10)
function getContainerRenderMixin(config) {
var _config$autoMount = config.autoMount,
autoMount = _config$autoMount === void 0 ? true : _config$autoMount,
_config$autoDestroy = config.autoDestroy,
autoDestroy = _config$autoDestroy === void 0 ? true : _config$autoDestroy,
isVisible = config.isVisible,
isForceRender = config.isForceRender,
getComponent = config.getComponent,
_config$getContainer = config.getContainer,
getContainer = _config$getContainer === void 0 ? defaultGetContainer : _config$getContainer;
var mixin;
function _renderComponent(instance, componentArg, ready) {
if (!isVisible || instance._component || isVisible(instance) || isForceRender && isForceRender(instance)) {
if (!instance._container) {
instance._container = getContainer(instance);
}
var component;
if (instance.getComponent) {
component = instance.getComponent(componentArg);
} else {
component = getComponent(instance, componentArg);
}
ReactDOMnode_modules\rc-util\es\getContainerRenderMixin.js (Line 39:14 - Line 49:14), node_modules\rc-util\lib\getContainerRenderMixin.js (Line 46:2 - Line 56:2)
({}, mixin), {}, {
componentDidMount: function componentDidMount() {
_renderComponent(this);
},
componentDidUpdate: function componentDidUpdate() {
_renderComponent(this);
}
});
}
if (!autoMount || !autoDestroy) {
mixin = _objectSpreadnode_modules\rc-util\es\getContainerRenderMixin.js (Line 49:14 - Line 58:9), node_modules\rc-util\lib\getContainerRenderMixin.js (Line 56:2 - Line 65:10)
({}, mixin), {}, {
renderComponent: function renderComponent(componentArg, ready) {
_renderComponent(this, componentArg, ready);
}
});
}
function _removeContainer(instance) {
if (instance._container) {
var container = instance._container;
ReactDOMnode_modules\rc-util\es\createChainedFunction.js (Line 9:2 - Line 21:2), node_modules\rc-util\lib\createChainedFunction.js (Line 15:1 - Line 27:2)
function createChainedFunction() {
var args = [].slice.call(arguments, 0);
if (args.length === 1) {
return args[0];
}
return function chainedFunction() {
for (var i = 0; i < args.length; i++) {
if (args[i] && args[i].apply) {
args[i].apply(this, arguments);
}
}
};
}node_modules\rc-util\es\ContainerRender.js (Line 19:16 - Line 24:16), node_modules\rc-util\lib\ContainerRender.js (Line 25:2 - Line 30:2)
(this, ContainerRender);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_definePropertynode_modules\rc-util\es\ContainerRender.js (Line 31:23 - Line 42:9), node_modules\rc-util\lib\ContainerRender.js (Line 37:2 - Line 48:10)
(_this), "renderComponent", function (props, ready) {
var _this$props = _this.props,
visible = _this$props.visible,
getComponent = _this$props.getComponent,
forceRender = _this$props.forceRender,
getContainer = _this$props.getContainer,
parent = _this$props.parent;
if (visible || parent._component || forceRender) {
if (!_this.container) {
_this.container = getContainer();
}
ReactDOMnode_modules\rc-util\es\ContainerRender.js (Line 51:13 - Line 82:6), node_modules\rc-util\lib\ContainerRender.js (Line 57:2 - Line 88:7)
(ContainerRender, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.props.autoDestroy) {
this.removeContainer();
}
}
}, {
key: "render",
value: function render() {
return this.props.children({
renderComponent: this.renderComponent,
removeContainer: this.removeContainer
});
}
}]);
return ContainerRender;
}(Reactnode_modules\rc-util\es\composeProps.js (Line 3:14 - Line 19:7), node_modules\rc-util\lib\composeProps.js (Line 10:2 - Line 26:4)
({}, originProps), isAll ? patchProps : {});
Object.keys(patchProps).forEach(function (key) {
var func = patchProps[key];
if (typeof func === 'function') {
composedProps[key] = function () {
var _originProps$key;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
func.apply(void 0, args);
return (_originProps$key = originProps[key]) === null || _originProps$key === void 0 ? void 0 : _originProps$key.call.apply(_originProps$key, [originProps].concat(args));
};
}
});
return composedProps;
}
exportnode_modules\rc-slider\lib\Slider.js (Line 4:2 - Line 11:20), node_modules\rc-slider\lib\Tracks\Track.js (Line 4:2 - Line 11:12)
= require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _toConsumableArray2node_modules\rc-slider\lib\Slider.js (Line 29:9 - Line 42:4), node_modules\rc-slider\lib\Tracks\Track.js (Line 16:8 - Line 17:4)
(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
/**
* New:
* - click mark to update range value
* - handleRender
* - Fix handle with count not correct
* - Fix pushable not work in some case
* - No more FindDOMNode
* - Move all position related style into inline style
* - Key: up is plus, down is minus
* - fix Key with step = null not align with marks
* - Change range should not trigger onChange
* - keyboard support pushable
*/node_modules\rc-slider\es\util.js (Line 4:2 - Line 29:7), node_modules\rc-slider\lib\util.js (Line 12:1 - Line 37:9)
function getDirectionStyle(direction, value, min, max) {
var offset = getOffset(value, min, max);
var positionStyle = {};
switch (direction) {
case 'rtl':
positionStyle.right = "".concat(offset * 100, "%");
positionStyle.transform = 'translateX(50%)';
break;
case 'btt':
positionStyle.bottom = "".concat(offset * 100, "%");
positionStyle.transform = 'translateY(50%)';
break;
case 'ttb':
positionStyle.top = "".concat(offset * 100, "%");
positionStyle.transform = 'translateY(-50%)';
break;
default:
positionStyle.left = "".concat(offset * 100, "%");
positionStyle.transform = 'translateX(-50%)';
break;
}
return positionStyle;
}
/** Return index value if is list or return value directly */
exportnode_modules\rc-slider\es\Slider.js (Line 21:1 - Line 99:9), node_modules\rc-slider\lib\Slider.js (Line 30:1 - Line 108:2)
/**
* New:
* - click mark to update range value
* - handleRender
* - Fix handle with count not correct
* - Fix pushable not work in some case
* - No more FindDOMNode
* - Move all position related style into inline style
* - Key: up is plus, down is minus
* - fix Key with step = null not align with marks
* - Change range should not trigger onChange
* - keyboard support pushable
*/
var Slider = /*#__PURE__*/React.forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-slider' : _props$prefixCls,
className = props.className,
style = props.style,
classNames = props.classNames,
styles = props.styles,
id = props.id,
_props$disabled = props.disabled,
disabled = _props$disabled === void 0 ? false : _props$disabled,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
autoFocus = props.autoFocus,
onFocus = props.onFocus,
onBlur = props.onBlur,
_props$min = props.min,
min = _props$min === void 0 ? 0 : _props$min,
_props$max = props.max,
max = _props$max === void 0 ? 100 : _props$max,
_props$step = props.step,
step = _props$step === void 0 ? 1 : _props$step,
value = props.value,
defaultValue = props.defaultValue,
range = props.range,
count = props.count,
onChange = props.onChange,
onBeforeChange = props.onBeforeChange,
onAfterChange = props.onAfterChange,
onChangeComplete = props.onChangeComplete,
_props$allowCross = props.allowCross,
allowCross = _props$allowCross === void 0 ? true : _props$allowCross,
_props$pushable = props.pushable,
pushable = _props$pushable === void 0 ? false : _props$pushable,
reverse = props.reverse,
vertical = props.vertical,
_props$included = props.included,
included = _props$included === void 0 ? true : _props$included,
startPoint = props.startPoint,
trackStyle = props.trackStyle,
handleStyle = props.handleStyle,
railStyle = props.railStyle,
dotStyle = props.dotStyle,
activeDotStyle = props.activeDotStyle,
marks = props.marks,
dots = props.dots,
handleRender = props.handleRender,
activeHandleRender = props.activeHandleRender,
track = props.track,
_props$tabIndex = props.tabIndex,
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
ariaLabelForHandle = props.ariaLabelForHandle,
ariaLabelledByForHandle = props.ariaLabelledByForHandle,
ariaRequired = props.ariaRequired,
ariaValueTextFormatterForHandle = props.ariaValueTextFormatterForHandle;
var handlesRef = React.useRef(null);
var containerRef = React.useRef(null);
var direction = React.useMemo(function () {
if (vertical) {
return reverse ? 'ttb' : 'btt';
}
return reverse ? 'rtl' : 'ltr';
}, [reverse, vertical]);
// ============================ Range =============================
var _useRange = useRangenode_modules\rc-slider\es\Slider.js (Line 100:15 - Line 133:8), node_modules\rc-slider\lib\Slider.js (Line 109:2 - Line 142:2)
(_useRange, 5),
rangeEnabled = _useRange2[0],
rangeEditable = _useRange2[1],
rangeDraggableTrack = _useRange2[2],
minCount = _useRange2[3],
maxCount = _useRange2[4];
var mergedMin = React.useMemo(function () {
return isFinite(min) ? min : 0;
}, [min]);
var mergedMax = React.useMemo(function () {
return isFinite(max) ? max : 100;
}, [max]);
// ============================= Step =============================
var mergedStep = React.useMemo(function () {
return step !== null && step <= 0 ? 1 : step;
}, [step]);
// ============================= Push =============================
var mergedPush = React.useMemo(function () {
if (typeof pushable === 'boolean') {
return pushable ? mergedStep : false;
}
return pushable >= 0 ? pushable : false;
}, [pushable, mergedStep]);
// ============================ Marks =============================
var markList = React.useMemo(function () {
return Object.keys(marks || {}).map(function (key) {
var mark = marks[key];
var markObj = {
value: Number(key)
};
if (mark && _typeofnode_modules\rc-slider\es\Slider.js (Line 133:8 - Line 149:10), node_modules\rc-slider\lib\Slider.js (Line 142:2 - Line 158:2)
(mark) === 'object' && ! /*#__PURE__*/React.isValidElement(mark) && ('label' in mark || 'style' in mark)) {
markObj.style = mark.style;
markObj.label = mark.label;
} else {
markObj.label = mark;
}
return markObj;
}).filter(function (_ref) {
var label = _ref.label;
return label || typeof label === 'number';
}).sort(function (a, b) {
return a.value - b.value;
});
}, [marks]);
// ============================ Format ============================
var _useOffset = useOffsetnode_modules\rc-slider\es\Slider.js (Line 158:15 - Line 163:15), node_modules\rc-slider\lib\Slider.js (Line 167:2 - Line 172:2)
(_useMergedState, 2),
mergedValue = _useMergedState2[0],
setValue = _useMergedState2[1];
var rawValues = React.useMemo(function () {
var valueList = mergedValue === null || mergedValue === undefined ? [] : Array.isArray(mergedValue) ? mergedValue : [mergedValue];
var _valueList = _slicedToArraynode_modules\rc-slider\es\Slider.js (Line 170:19 - Line 199:9), node_modules\rc-slider\lib\Slider.js (Line 179:2 - Line 208:2)
(valueList);
// When count provided or value is `undefined`, we fill values
if (count || mergedValue === undefined) {
var pointCount = count >= 0 ? count + 1 : 2;
returnValues = returnValues.slice(0, pointCount);
// Fill with count
while (returnValues.length < pointCount) {
var _returnValues;
returnValues.push((_returnValues = returnValues[returnValues.length - 1]) !== null && _returnValues !== void 0 ? _returnValues : mergedMin);
}
}
returnValues.sort(function (a, b) {
return a - b;
});
}
// Align in range
returnValues.forEach(function (val, index) {
returnValues[index] = formatValue(val);
});
return returnValues;
}, [mergedValue, rangeEnabled, mergedMin, count, formatValue]);
// =========================== onChange ===========================
var getTriggerValue = function getTriggerValue(triggerValues) {
return rangeEnabled ? triggerValues : triggerValues[0];
};
var triggerChange = useEventnode_modules\rc-slider\es\Slider.js (Line 220:8 - Line 227:19), node_modules\rc-slider\lib\Slider.js (Line 229:2 - Line 236:2)
(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(finishValue);
});
var onDelete = function onDelete(index) {
if (disabled || !rangeEditable || rawValues.length <= minCount) {
return;
}
var cloneNextValues = _toConsumableArraynode_modules\rc-slider\es\Slider.js (Line 227:19 - Line 235:8), node_modules\rc-slider\lib\Slider.js (Line 236:2 - Line 244:2)
(rawValues);
cloneNextValues.splice(index, 1);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(cloneNextValues));
triggerChange(cloneNextValues);
var nextFocusIndex = Math.max(0, index - 1);
handlesRef.current.hideHelp();
handlesRef.current.focus(nextFocusIndex);
};
var _useDrag = useDragnode_modules\rc-slider\es\Slider.js (Line 236:15 - Line 250:19), node_modules\rc-slider\lib\Slider.js (Line 245:2 - Line 259:2)
(_useDrag, 5),
draggingIndex = _useDrag2[0],
draggingValue = _useDrag2[1],
draggingDelete = _useDrag2[2],
cacheValues = _useDrag2[3],
onStartDrag = _useDrag2[4];
/**
* When `rangeEditable` will insert a new value in the values array.
* Else it will replace the value in the values array.
*/
var changeToCloseValue = function changeToCloseValue(newValue, e) {
if (!disabled) {
// Create new values
var cloneNextValues = _toConsumableArraynode_modules\rc-slider\es\Slider.js (Line 250:19 - Line 287:8), node_modules\rc-slider\lib\Slider.js (Line 259:2 - Line 296:2)
(rawValues);
var valueIndex = 0;
var valueBeforeIndex = 0; // Record the index which value < newValue
var valueDist = mergedMax - mergedMin;
rawValues.forEach(function (val, index) {
var dist = Math.abs(newValue - val);
if (dist <= valueDist) {
valueDist = dist;
valueIndex = index;
}
if (val < newValue) {
valueBeforeIndex = index;
}
});
var focusIndex = valueIndex;
if (rangeEditable && valueDist !== 0 && (!maxCount || rawValues.length < maxCount)) {
cloneNextValues.splice(valueBeforeIndex + 1, 0, newValue);
focusIndex = valueBeforeIndex + 1;
} else {
cloneNextValues[valueIndex] = newValue;
}
// Fill value to match default 2 (only when `rawValues` is empty)
if (rangeEnabled && !rawValues.length && count === undefined) {
cloneNextValues.push(newValue);
}
var nextValue = getTriggerValue(cloneNextValues);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(nextValue);
triggerChange(cloneNextValues);
if (e) {
var _document$activeEleme, _document$activeEleme2;
(_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || (_document$activeEleme2 = _document$activeEleme.blur) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.call(_document$activeEleme);
handlesRef.current.focus(focusIndex);
onStartDrag(e, focusIndex, cloneNextValues);
} else {
// https://github.com/ant-design/ant-design/issues/49997
onAfterChange === null || onAfterChange === void 0 || onAfterChange(nextValue);
warningnode_modules\rc-slider\es\Slider.js (Line 287:8 - Line 325:15), node_modules\rc-slider\lib\Slider.js (Line 296:2 - Line 334:2)
(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(nextValue);
}
}
};
// ============================ Click =============================
var onSliderMouseDown = function onSliderMouseDown(e) {
e.preventDefault();
var _containerRef$current = containerRef.current.getBoundingClientRect(),
width = _containerRef$current.width,
height = _containerRef$current.height,
left = _containerRef$current.left,
top = _containerRef$current.top,
bottom = _containerRef$current.bottom,
right = _containerRef$current.right;
var clientX = e.clientX,
clientY = e.clientY;
var percent;
switch (direction) {
case 'btt':
percent = (bottom - clientY) / height;
break;
case 'ttb':
percent = (clientY - top) / height;
break;
case 'rtl':
percent = (right - clientX) / width;
break;
default:
percent = (clientX - left) / width;
}
var nextValue = mergedMin + percent * (mergedMax - mergedMin);
changeToCloseValue(formatValue(nextValue), e);
};
// =========================== Keyboard ===========================
var _React$useState = React.useState(null),
_React$useState2 = _slicedToArraynode_modules\rc-slider\es\Slider.js (Line 325:15 - Line 350:8), node_modules\rc-slider\lib\Slider.js (Line 334:2 - Line 359:2)
(_React$useState, 2),
keyboardValue = _React$useState2[0],
setKeyboardValue = _React$useState2[1];
var onHandleOffsetChange = function onHandleOffsetChange(offset, valueIndex) {
if (!disabled) {
var next = offsetValues(rawValues, offset, valueIndex);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
triggerChange(next.values);
setKeyboardValue(next.value);
}
};
React.useEffect(function () {
if (keyboardValue !== null) {
var valueIndex = rawValues.indexOf(keyboardValue);
if (valueIndex >= 0) {
handlesRef.current.focus(valueIndex);
}
}
setKeyboardValue(null);
}, [keyboardValue]);
// ============================= Drag =============================
var mergedDraggableTrack = React.useMemo(function () {
if (rangeDraggableTrack && mergedStep === null) {
if (process.env.NODE_ENV !== 'production') {
warningnode_modules\rc-slider\es\Slider.js (Line 356:9 - Line 372:19), node_modules\rc-slider\lib\Slider.js (Line 365:2 - Line 381:2)
(function (e, valueIndex) {
onStartDrag(e, valueIndex);
onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
});
// Auto focus for updated handle
var dragging = draggingIndex !== -1;
React.useEffect(function () {
if (!dragging) {
var valueIndex = rawValues.lastIndexOf(draggingValue);
handlesRef.current.focus(valueIndex);
}
}, [dragging]);
// =========================== Included ===========================
var sortedCacheValues = React.useMemo(function () {
return _toConsumableArraynode_modules\rc-slider\es\Slider.js (Line 372:19 - Line 385:15), node_modules\rc-slider\lib\Slider.js (Line 381:2 - Line 394:2)
(cacheValues).sort(function (a, b) {
return a - b;
});
}, [cacheValues]);
// Provide a range values with included [min, max]
// Used for Track, Mark & Dot
var _React$useMemo = React.useMemo(function () {
if (!rangeEnabled) {
return [mergedMin, sortedCacheValues[0]];
}
return [sortedCacheValues[0], sortedCacheValues[sortedCacheValues.length - 1]];
}, [sortedCacheValues, rangeEnabled, mergedMin]),
_React$useMemo2 = _slicedToArraynode_modules\rc-slider\es\Slider.js (Line 385:15 - Line 437:14), node_modules\rc-slider\lib\Slider.js (Line 394:2 - Line 446:9)
(_React$useMemo, 2),
includedStart = _React$useMemo2[0],
includedEnd = _React$useMemo2[1];
// ============================= Refs =============================
React.useImperativeHandle(ref, function () {
return {
focus: function focus() {
handlesRef.current.focus(0);
},
blur: function blur() {
var _containerRef$current2;
var _document = document,
activeElement = _document.activeElement;
if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(activeElement)) {
activeElement === null || activeElement === void 0 || activeElement.blur();
}
}
};
});
// ========================== Auto Focus ==========================
React.useEffect(function () {
if (autoFocus) {
handlesRef.current.focus(0);
}
}, []);
// =========================== Context ============================
var context = React.useMemo(function () {
return {
min: mergedMin,
max: mergedMax,
direction: direction,
disabled: disabled,
keyboard: keyboard,
step: mergedStep,
included: included,
includedStart: includedStart,
includedEnd: includedEnd,
range: rangeEnabled,
tabIndex: tabIndex,
ariaLabelForHandle: ariaLabelForHandle,
ariaLabelledByForHandle: ariaLabelledByForHandle,
ariaRequired: ariaRequired,
ariaValueTextFormatterForHandle: ariaValueTextFormatterForHandle,
styles: styles || {},
classNames: classNames || {}
};
}, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, rangeEnabled, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaRequired, ariaValueTextFormatterForHandle, styles, classNames]);
// ============================ Render ============================
return /*#__PURE__*/React.createElement(SliderContextnode_modules\rc-slider\es\Slider.js (Line 441:16 - Line 446:4), node_modules\rc-slider\lib\Slider.js (Line 450:2 - Line 455:2)
({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-vertical"), vertical), "".concat(prefixCls, "-horizontal"), !vertical), "".concat(prefixCls, "-with-marks"), markList.length)),
style: style,
onMouseDown: onSliderMouseDown,
id: id
}, /*#__PURE__*/React.createElement("div", {
className: clsnode_modules\rc-slider\es\Slider.js (Line 460:8 - Line 475:6), node_modules\rc-slider\lib\Slider.js (Line 469:8 - Line 484:7)
, {
ref: handlesRef,
prefixCls: prefixCls,
style: handleStyle,
values: cacheValues,
draggingIndex: draggingIndex,
draggingDelete: draggingDelete,
onStartMove: onStartMove,
onOffsetChange: onHandleOffsetChange,
onFocus: onFocus,
onBlur: onBlur,
handleRender: handleRender,
activeHandleRender: activeHandleRender,
onChangeComplete: finishChange,
onDelete: rangeEditable ? onDelete : undefined
}), /*#__PURE__*/React.createElement(Marksnode_modules\rc-slider\es\context.js (Line 2:1 - Line 14:7), node_modules\rc-slider\lib\context.js (Line 11:1 - Line 23:4)
var SliderContext = /*#__PURE__*/React.createContext({
min: 0,
max: 0,
direction: 'ltr',
step: 1,
includedStart: 0,
includedEnd: 0,
tabIndex: 0,
keyboard: true,
styles: {},
classNames: {}
});
exportnode_modules\prelude-ls\lib\Obj.js (Line 141:1 - Line 154:2), node_modules\prelude-ls\lib\Str.js (Line 79:1 - Line 92:2)
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}node_modules\prelude-ls\lib\Num.js (Line 117:1 - Line 130:2), node_modules\prelude-ls\lib\Str.js (Line 79:1 - Line 92:2)
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}node_modules\prelude-ls\lib\List.js (Line 172:2 - Line 178:3), node_modules\prelude-ls\lib\List.js (Line 161:2 - Line 167:9)
xs){
var x;
return [].concat.apply([], (function(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
x = ref$[i$];
ifnode_modules\prelude-ls\lib\List.js (Line 207:2 - Line 219:2), node_modules\prelude-ls\lib\List.js (Line 187:2 - Line 199:3)
= function(xs){
var yss, res$, i$, to$, results, len$, x, j$, len1$, ys;
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
yss = res$;
results = [];
outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
ys = yss[j$];
if (!node_modules\prelude-ls\lib\List.js (Line 260:2 - Line 267:2), node_modules\prelude-ls\lib\List.js (Line 246:2 - Line 253:3)
= curry$(function(f, xs){
var results, i$, len$, x, key;
results = {};
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
key = f(x);
if (key in results) {
results[key].node_modules\prelude-ls\lib\List.js (Line 294:2 - Line 299:5), node_modules\prelude-ls\lib\List.js (Line 68:2 - Line 73:2)
= curry$(function(f, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (f(x)) {
return truenode_modules\prelude-ls\lib\List.js (Line 388:2 - Line 393:2), node_modules\prelude-ls\lib\List.js (Line 366:2 - Line 371:2)
xs){
var max, i$, ref$, len$, x;
max = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (fnode_modules\prelude-ls\lib\List.js (Line 399:2 - Line 404:2), node_modules\prelude-ls\lib\List.js (Line 377:2 - Line 382:2)
xs){
var min, i$, ref$, len$, x;
min = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (fnode_modules\prelude-ls\lib\List.js (Line 471:2 - Line 481:2), node_modules\prelude-ls\lib\List.js (Line 459:2 - Line 469:2)
= curry$(function(p, xs){
var len, i;
len = xs.length;
if (!len) {
return xs;
}
i = 0;
while (i < len && p(xs[i])) {
i += 1;
}
return xs.slice(inode_modules\prelude-ls\lib\List.js (Line 503:2 - Line 513:2), node_modules\prelude-ls\lib\List.js (Line 489:2 - Line 499:2)
xs, ys){
var result, len, i$, len$, i, x;
result = [];
len = ys.length;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (i === len) {
break;
}
result.push(fnode_modules\prelude-ls\lib\List.js (Line 543:2 - Line 554:9), node_modules\prelude-ls\lib\List.js (Line 520:2 - Line 531:9)
, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
xss = res$;
minLength = undefined;
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
xs = xss[i$];
minLength <= (ref$ = xs.length) || (minLength = ref$);
}
for (i$ = 0; i$ < minLength; ++i$) {
i = i$;
results$node_modules\prelude-ls\lib\List.js (Line 604:2 - Line 609:2), node_modules\prelude-ls\lib\List.js (Line 583:3 - Line 588:2)
, xs){
var i$, len$, i, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (fnode_modules\prelude-ls\lib\List.js (Line 686:1 - Line 699:2), node_modules\prelude-ls\lib\Str.js (Line 79:1 - Line 92:2)
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}node_modules\prelude-ls\lib\index.js (Line 165:8 - Line 178:2), node_modules\prelude-ls\lib\Str.js (Line 79:2 - Line 92:2)
;
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}node_modules\prelude-ls\lib\Func.js (Line 56:1 - Line 69:2), node_modules\prelude-ls\lib\Str.js (Line 79:1 - Line 92:2)
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}node_modules\postcss\lib\stringifier.js (Line 220:10 - Line 230:13), node_modules\postcss\lib\stringifier.js (Line 201:13 - Line 211:13)
(i => {
if (typeof i.raws.before !== 'undefined') {
value = i.raws.before
if (value.includes('\n')) {
value = value.replace(/[^\n]+$/, '')
}
return false
}
})
if (typeof value === 'undefined') {
value = this.raw(node, null, 'beforeRule'node_modules\picomatch\lib\utils.js (Line 4:8 - Line 18:18), node_modules\vite\node_modules\picomatch\lib\utils.js (Line 2:13 - Line 17:10)
;
const {
REGEX_BACKSLASH,
REGEX_REMOVE_BACKSLASH,
REGEX_SPECIAL_CHARS,
REGEX_SPECIAL_CHARS_GLOBAL
} = require('./constants');
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
exports.removeBackslashesnode_modules\picomatch\lib\utils.js (Line 36:5 - Line 64:2), node_modules\vite\node_modules\picomatch\lib\utils.js (Line 33:2 - Line 61:2)
;
};
exports.escapeLast = (input, char, lastIdx) => {
const idx = input.lastIndexOf(char, lastIdx);
if (idx === -1) return input;
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
};
exports.removePrefix = (input, state = {}) => {
let output = input;
if (output.startsWith('./')) {
output = output.slice(2);
state.prefix = './';
}
return output;
};
exports.wrapOutput = (input, state = {}, options = {}) => {
const prepend = options.contains ? '' : '^';
const append = options.contains ? '' : '$';
let output = `${prepend}(?:${input})${append}`;
if (state.negated === true) {
output = `(?:^(?!${output}).*$)`;
}
return output;
};node_modules\picomatch\lib\scan.js (Line 1:1 - Line 391:2), node_modules\vite\node_modules\picomatch\lib\scan.js (Line 1:1 - Line 391:2)
'use strict';
const utils = require('./utils');
const {
CHAR_ASTERISK, /* * */
CHAR_AT, /* @ */
CHAR_BACKWARD_SLASH, /* \ */
CHAR_COMMA, /* , */
CHAR_DOT, /* . */
CHAR_EXCLAMATION_MARK, /* ! */
CHAR_FORWARD_SLASH, /* / */
CHAR_LEFT_CURLY_BRACE, /* { */
CHAR_LEFT_PARENTHESES, /* ( */
CHAR_LEFT_SQUARE_BRACKET, /* [ */
CHAR_PLUS, /* + */
CHAR_QUESTION_MARK, /* ? */
CHAR_RIGHT_CURLY_BRACE, /* } */
CHAR_RIGHT_PARENTHESES, /* ) */
CHAR_RIGHT_SQUARE_BRACKET /* ] */
} = require('./constants');
const isPathSeparator = code => {
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
};
const depth = token => {
if (token.isPrefix !== true) {
token.depth = token.isGlobstar ? Infinity : 1;
}
};
/**
* Quickly scans a glob pattern and returns an object with a handful of
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
*
* ```js
* const pm = require('picomatch');
* console.log(pm.scan('foo/bar/*.js'));
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {Object} Returns an object with tokens and regex source string.
* @api public
*/
const scan = (input, options) => {
const opts = options || {};
const length = input.length - 1;
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
const slashes = [];
const tokens = [];
const parts = [];
let str = input;
let index = -1;
let start = 0;
let lastIndex = 0;
let isBrace = false;
let isBracket = false;
let isGlob = false;
let isExtglob = false;
let isGlobstar = false;
let braceEscaped = false;
let backslashes = false;
let negated = false;
let negatedExtglob = false;
let finished = false;
let braces = 0;
let prev;
let code;
let token = { value: '', depth: 0, isGlob: false };
const eos = () => index >= length;
const peek = () => str.charCodeAt(index + 1);
const advance = () => {
prev = code;
return str.charCodeAt(++index);
};
while (index < length) {
code = advance();
let next;
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
if (code === CHAR_LEFT_CURLY_BRACE) {
braceEscaped = true;
}
continue;
}
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
braces++;
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (code === CHAR_LEFT_CURLY_BRACE) {
braces++;
continue;
}
if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (braceEscaped !== true && code === CHAR_COMMA) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_RIGHT_CURLY_BRACE) {
braces--;
if (braces === 0) {
braceEscaped = false;
isBrace = token.isBrace = true;
finished = true;
break;
}
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_FORWARD_SLASH) {
slashes.push(index);
tokens.push(token);
token = { value: '', depth: 0, isGlob: false };
if (finished === true) continue;
if (prev === CHAR_DOT && index === (start + 1)) {
start += 2;
continue;
}
lastIndex = index + 1;
continue;
}
if (opts.noext !== true) {
const isExtglobChar = code === CHAR_PLUS
|| code === CHAR_AT
|| code === CHAR_ASTERISK
|| code === CHAR_QUESTION_MARK
|| code === CHAR_EXCLAMATION_MARK;
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
isExtglob = token.isExtglob = true;
finished = true;
if (code === CHAR_EXCLAMATION_MARK && index === start) {
negatedExtglob = true;
}
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
isGlob = token.isGlob = true;
finished = true;
break;
}
}
continue;
}
break;
}
}
if (code === CHAR_ASTERISK) {
if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_QUESTION_MARK) {
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_LEFT_SQUARE_BRACKET) {
while (eos() !== true && (next = advance())) {
if (next === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
isBracket = token.isBracket = true;
isGlob = token.isGlob = true;
finished = true;
break;
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
negated = token.negated = true;
start++;
continue;
}
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_LEFT_PARENTHESES) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
finished = true;
break;
}
}
continue;
}
break;
}
if (isGlob === true) {
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
}
if (opts.noext === true) {
isExtglob = false;
isGlob = false;
}
let base = str;
let prefix = '';
let glob = '';
if (start > 0) {
prefix = str.slice(0, start);
str = str.slice(start);
lastIndex -= start;
}
if (base && isGlob === true && lastIndex > 0) {
base = str.slice(0, lastIndex);
glob = str.slice(lastIndex);
} else if (isGlob === true) {
base = '';
glob = str;
} else {
base = str;
}
if (base && base !== '' && base !== '/' && base !== str) {
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
base = base.slice(0, -1);
}
}
if (opts.unescape === true) {
if (glob) glob = utils.removeBackslashes(glob);
if (base && backslashes === true) {
base = utils.removeBackslashes(base);
}
}
const state = {
prefix,
input,
start,
base,
glob,
isBrace,
isBracket,
isGlob,
isExtglob,
isGlobstar,
negated,
negatedExtglob
};
if (opts.tokens === true) {
state.maxDepth = 0;
if (!isPathSeparator(code)) {
tokens.push(token);
}
state.tokens = tokens;
}
if (opts.parts === true || opts.tokens === true) {
let prevIndex;
for (let idx = 0; idx < slashes.length; idx++) {
const n = prevIndex ? prevIndex + 1 : start;
const i = slashes[idx];
const value = input.slice(n, i);
if (opts.tokens) {
if (idx === 0 && start !== 0) {
tokens[idx].isPrefix = true;
tokens[idx].value = prefix;
} else {
tokens[idx].value = value;
}
depth(tokens[idx]);
state.maxDepth += tokens[idx].depth;
}
if (idx !== 0 || value !== '') {
parts.push(value);
}
prevIndex = i;
}
if (prevIndex && prevIndex + 1 < input.length) {
const value = input.slice(prevIndex + 1);
parts.push(value);
if (opts.tokens) {
tokens[tokens.length - 1].value = value;
depth(tokens[tokens.length - 1]);
state.maxDepth += tokens[tokens.length - 1].depth;
}
}
state.slashes = slashes;
state.parts = parts;
}
return state;
};
module.exports = scan;node_modules\picomatch\lib\picomatch.js (Line 3:2 - Line 52:6), node_modules\vite\node_modules\picomatch\lib\picomatch.js (Line 1:13 - Line 51:5)
;
const scan = require('./scan');
const parse = require('./parse');
const utils = require('./utils');
const constants = require('./constants');
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
/**
* Creates a matcher function from one or more glob patterns. The
* returned function takes a string to match as its first argument,
* and returns true if the string is a match. The returned matcher
* function also takes a boolean as the second argument that, when true,
* returns an object with additional information.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch(glob[, options]);
*
* const isMatch = picomatch('*.!(*a)');
* console.log(isMatch('a.a')); //=> false
* console.log(isMatch('a.b')); //=> true
* ```
* @name picomatch
* @param {String|Array} `globs` One or more glob patterns.
* @param {Object=} `options`
* @return {Function=} Returns a matcher function.
* @api public
*/
const picomatch = (glob, options, returnState = false) => {
if (Array.isArray(glob)) {
const fns = glob.map(input => picomatch(input, options, returnState));
const arrayMatcher = str => {
for (const isMatch of fns) {
const state = isMatch(str);
if (state) return state;
}
return false;
};
return arrayMatcher;
}
const isState = isObject(glob) && glob.tokens && glob.input;
if (glob === '' || (typeof glob !== 'string' && !isState)) {
throw new TypeError('Expected pattern to be a non-empty string');
}
const opts = options || {};
const posix = utilsnode_modules\picomatch\lib\picomatch.js (Line 52:2 - Line 161:10), node_modules\vite\node_modules\picomatch\lib\picomatch.js (Line 51:8 - Line 160:10)
;
const regex = isState
? picomatch.compileRe(glob, options)
: picomatch.makeRe(glob, options, false, true);
const state = regex.state;
delete regex.state;
let isIgnored = () => false;
if (opts.ignore) {
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
}
const matcher = (input, returnObject = false) => {
const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
const result = { glob, state, regex, posix, input, output, match, isMatch };
if (typeof opts.onResult === 'function') {
opts.onResult(result);
}
if (isMatch === false) {
result.isMatch = false;
return returnObject ? result : false;
}
if (isIgnored(input)) {
if (typeof opts.onIgnore === 'function') {
opts.onIgnore(result);
}
result.isMatch = false;
return returnObject ? result : false;
}
if (typeof opts.onMatch === 'function') {
opts.onMatch(result);
}
return returnObject ? result : true;
};
if (returnState) {
matcher.state = state;
}
return matcher;
};
/**
* Test `input` with the given `regex`. This is used by the main
* `picomatch()` function to test the input string.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.test(input, regex[, options]);
*
* console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
* // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
* ```
* @param {String} `input` String to test.
* @param {RegExp} `regex`
* @return {Object} Returns an object with matching info.
* @api public
*/
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
if (typeof input !== 'string') {
throw new TypeError('Expected input to be a string');
}
if (input === '') {
return { isMatch: false, output: '' };
}
const opts = options || {};
const format = opts.format || (posix ? utils.toPosixSlashes : null);
let match = input === glob;
let output = (match && format) ? format(input) : input;
if (match === false) {
output = format ? format(input) : input;
match = output === glob;
}
if (match === false || opts.capture === true) {
if (opts.matchBase === true || opts.basename === true) {
match = picomatch.matchBase(input, regex, options, posix);
} else {
match = regex.exec(output);
}
}
return { isMatch: Boolean(match), match, output };
};
/**
* Match the basename of a filepath.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.matchBase(input, glob[, options]);
* console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
* ```
* @param {String} `input` String to test.
* @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
* @return {Boolean}
* @api public
*/
picomatch.matchBasenode_modules\picomatch\lib\picomatch.js (Line 163:5 - Line 342:2), node_modules\vite\node_modules\picomatch\lib\picomatch.js (Line 162:6 - Line 341:2)
.basename(input));
};
/**
* Returns true if **any** of the given glob `patterns` match the specified `string`.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.isMatch(string, patterns[, options]);
*
* console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
* console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
* ```
* @param {String|Array} str The string to test.
* @param {String|Array} patterns One or more glob patterns to use for matching.
* @param {Object} [options] See available [options](#options).
* @return {Boolean} Returns true if any patterns match `str`
* @api public
*/
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
/**
* Parse a glob pattern to create the source string for a regular
* expression.
*
* ```js
* const picomatch = require('picomatch');
* const result = picomatch.parse(pattern[, options]);
* ```
* @param {String} `pattern`
* @param {Object} `options`
* @return {Object} Returns an object with useful properties and output to be used as a regex source string.
* @api public
*/
picomatch.parse = (pattern, options) => {
if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
return parse(pattern, { ...options, fastpaths: false });
};
/**
* Scan a glob pattern to separate the pattern into segments.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.scan(input[, options]);
*
* const result = picomatch.scan('!./foo/*.js');
* console.log(result);
* { prefix: '!./',
* input: '!./foo/*.js',
* start: 3,
* base: 'foo',
* glob: '*.js',
* isBrace: false,
* isBracket: false,
* isGlob: true,
* isExtglob: false,
* isGlobstar: false,
* negated: true }
* ```
* @param {String} `input` Glob pattern to scan.
* @param {Object} `options`
* @return {Object} Returns an object with
* @api public
*/
picomatch.scan = (input, options) => scan(input, options);
/**
* Compile a regular expression from the `state` object returned by the
* [parse()](#parse) method.
*
* @param {Object} `state`
* @param {Object} `options`
* @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
* @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
* @return {RegExp}
* @api public
*/
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
if (returnOutput === true) {
return state.output;
}
const opts = options || {};
const prepend = opts.contains ? '' : '^';
const append = opts.contains ? '' : '$';
let source = `${prepend}(?:${state.output})${append}`;
if (state && state.negated === true) {
source = `^(?!${source}).*$`;
}
const regex = picomatch.toRegex(source, options);
if (returnState === true) {
regex.state = state;
}
return regex;
};
/**
* Create a regular expression from a parsed glob pattern.
*
* ```js
* const picomatch = require('picomatch');
* const state = picomatch.parse('*.js');
* // picomatch.compileRe(state[, options]);
*
* console.log(picomatch.compileRe(state));
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
* ```
* @param {String} `state` The object returned from the `.parse` method.
* @param {Object} `options`
* @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
* @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
* @return {RegExp} Returns a regex created from the given pattern.
* @api public
*/
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
if (!input || typeof input !== 'string') {
throw new TypeError('Expected a non-empty string');
}
let parsed = { negated: false, fastpaths: true };
if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
parsed.output = parse.fastpaths(input, options);
}
if (!parsed.output) {
parsed = parse(input, options);
}
return picomatch.compileRe(parsed, options, returnOutput, returnState);
};
/**
* Create a regular expression from the given regex source string.
*
* ```js
* const picomatch = require('picomatch');
* // picomatch.toRegex(source[, options]);
*
* const { output } = picomatch.parse('*.js');
* console.log(picomatch.toRegex(output));
* //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
* ```
* @param {String} `source` Regular expression source string.
* @param {Object} `options`
* @return {RegExp}
* @api public
*/
picomatch.toRegex = (source, options) => {
try {
const opts = options || {};
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
} catch (err) {
if (options && options.debug === true) throw err;
return /$^/;
}
};
/**
* Picomatch constants.
* @return {Object}
*/
picomatch.constants = constants;
/**
* Expose "picomatch"
*/
module.exports = picomatch;node_modules\picomatch\lib\constants.js (Line 3:2 - Line 27:12), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 1:13 - Line 25:4)
;
const WIN_SLASH = '\\\\/';
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
/**
* Posix glob regex
*/
const DOT_LITERAL = '\\.';
const PLUS_LITERAL = '\\+';
const QMARK_LITERAL = '\\?';
const SLASH_LITERAL = '\\/';
const ONE_CHAR = '(?=.)';
const QMARK = '[^/]';
const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
const NO_DOT = `(?!${DOT_LITERAL})`;
const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
const STAR = `${QMARK}*?`;
const POSIX_CHARSnode_modules\picomatch\lib\constants.js (Line 43:1 - Line 63:2), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 44:1 - Line 63:2)
};
/**
* Windows glob regex
*/
const WINDOWS_CHARS = {
...POSIX_CHARS,
SLASH_LITERAL: `[${WIN_SLASH}]`,
QMARK: WIN_NO_SLASH,
STAR: `${WIN_NO_SLASH}*?`,
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
NO_DOT: `(?!${DOT_LITERAL})`,
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
}node_modules\picomatch\lib\constants.js (Line 63:1 - Line 100:6), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 65:1 - Line 102:10)
};
/**
* POSIX Bracket Regex
*/
const POSIX_REGEX_SOURCE = {
alnum: 'a-zA-Z0-9',
alpha: 'a-zA-Z',
ascii: '\\x00-\\x7F',
blank: ' \\t',
cntrl: '\\x00-\\x1F\\x7F',
digit: '0-9',
graph: '\\x21-\\x7E',
lower: 'a-z',
print: '\\x20-\\x7E ',
punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
space: ' \\t\\r\\n\\v\\f',
upper: 'A-Z',
word: 'A-Za-z0-9_',
xdigit: 'A-Fa-f0-9'
};
module.exports = {
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE,
// regular expressions
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
// Replace globs with equivalent patterns to reduce parsing time.
REPLACEMENTS: {
'***'node_modules\picomatch\lib\constants.js (Line 100:5 - Line 156:4), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 103:5 - Line 159:2)
'***': '*',
'**/**': '**',
'**/**/**': '**'
},
// Digits
CHAR_0: 48, /* 0 */
CHAR_9: 57, /* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 65, /* A */
CHAR_LOWERCASE_A: 97, /* a */
CHAR_UPPERCASE_Z: 90, /* Z */
CHAR_LOWERCASE_Z: 122, /* z */
CHAR_LEFT_PARENTHESES: 40, /* ( */
CHAR_RIGHT_PARENTHESES: 41, /* ) */
CHAR_ASTERISK: 42, /* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: 38, /* & */
CHAR_AT: 64, /* @ */
CHAR_BACKWARD_SLASH: 92, /* \ */
CHAR_CARRIAGE_RETURN: 13, /* \r */
CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
CHAR_COLON: 58, /* : */
CHAR_COMMA: 44, /* , */
CHAR_DOT: 46, /* . */
CHAR_DOUBLE_QUOTE: 34, /* " */
CHAR_EQUAL: 61, /* = */
CHAR_EXCLAMATION_MARK: 33, /* ! */
CHAR_FORM_FEED: 12, /* \f */
CHAR_FORWARD_SLASH: 47, /* / */
CHAR_GRAVE_ACCENT: 96, /* ` */
CHAR_HASH: 35, /* # */
CHAR_HYPHEN_MINUS: 45, /* - */
CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
CHAR_LEFT_CURLY_BRACE: 123, /* { */
CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
CHAR_LINE_FEED: 10, /* \n */
CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
CHAR_PERCENT: 37, /* % */
CHAR_PLUS: 43, /* + */
CHAR_QUESTION_MARK: 63, /* ? */
CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
CHAR_RIGHT_CURLY_BRACE: 125, /* } */
CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
CHAR_SEMICOLON: 59, /* ; */
CHAR_SINGLE_QUOTE: 39, /* ' */
CHAR_SPACE: 32, /* */
CHAR_TAB: 9, /* \t */
CHAR_UNDERSCORE: 95, /* _ */
CHAR_VERTICAL_LINE: 124, /* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
SEPnode_modules\picomatch\lib\constants.js (Line 158:3 - Line 179:2), node_modules\vite\node_modules\picomatch\lib\constants.js (Line 159:3 - Line 180:2)
/**
* Create EXTGLOB_CHARS
*/
extglobChars(chars) {
return {
'!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
'?': { type: 'qmark', open: '(?:', close: ')?' },
'+': { type: 'plus', open: '(?:', close: ')+' },
'*': { type: 'star', open: '(?:', close: ')*' },
'@': { type: 'at', open: '(?:', close: ')' }
};
},
/**
* Create GLOB_CHARS
*/
globChars(win32) {
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
}
};node_modules\object.values\test\shimmed.js (Line 1:1 - Line 13:7), node_modules\reflect.getprototypeof\test\shimmed.js (Line 1:1 - Line 14:8)
'use strict';
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(Objectnode_modules\object.values\test\index.js (Line 3:2 - Line 9:7), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { valuesnode_modules\object.values\test\implementation.js (Line 1:1 - Line 17:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 17:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation,node_modules\object.fromentries\test\shimmed.js (Line 21:39 - Line 28:12), node_modules\object.values\test\shimmed.js (Line 20:34 - Line 27:7)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Object.fromEntriesnode_modules\object.fromentries\test\index.js (Line 3:2 - Line 9:12), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { fromEntriesnode_modules\object.fromentries\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation, Object), t);
t.end();
});node_modules\object.entries\test\tests.js (Line 18:40 - Line 25:11), node_modules\object.values\test\tests.js (Line 18:39 - Line 25:10)
, function (st) {
var object = { a: a, b: b };
object[0] = 3;
object.c = c;
object[1] = 4;
delete object[0];
var objKeys = keys(object);
var objEntriesnode_modules\object.entries\test\tests.js (Line 28:26 - Line 35:8), node_modules\object.values\test\tests.js (Line 28:25 - Line 35:7)
);
st.end();
});
t.test('non-enumerable properties are omitted', { skip: !Object.defineProperty }, function (st) {
var object = { a: a, b: b };
Object.defineProperty(object, 'c', { enumerable: false, value: c });
st.deepEqual(entriesnode_modules\object.entries\test\tests.js (Line 35:2 - Line 44:8), node_modules\object.values\test\tests.js (Line 35:2 - Line 44:7)
], 'non-enumerable property‘s value is omitted');
st.end();
});
t.test('inherited properties are omitted', function (st) {
var F = function G() {};
F.prototype.a = a;
var f = new F();
f.b = b;
st.deepEqual(entriesnode_modules\object.entries\test\tests.js (Line 44:2 - Line 55:8), node_modules\object.values\test\tests.js (Line 44:2 - Line 55:7)
], 'only own properties are included');
st.end();
});
t.test('Symbol properties are omitted', { skip: !hasSymbols }, function (st) {
var object = { a: a, b: b, c: c };
var enumSym = Symbol('enum');
var nonEnumSym = Symbol('non enum');
object[enumSym] = enumSym;
object.d = enumSym;
Object.defineProperty(object, nonEnumSym, { enumerable: false, value: nonEnumSym });
st.deepEqual(entriesnode_modules\object.entries\test\tests.js (Line 55:2 - Line 67:8), node_modules\object.values\test\tests.js (Line 55:8 - Line 67:7)
], 'symbol properties are omitted');
st.end();
});
t.test('not-yet-visited keys deleted on [[Get]] must not show up in output', { skip: !define.supportsDescriptors }, function (st) {
var o = { a: 1, b: 2, c: 3 };
Object.defineProperty(o, 'a', {
get: function () {
delete this.b;
return 1;
}
});
st.deepEqual(entriesnode_modules\object.entries\test\tests.js (Line 67:2 - Line 79:8), node_modules\object.values\test\tests.js (Line 67:2 - Line 79:7)
], 'when "b" is deleted prior to being visited, it should not show up');
st.end();
});
t.test('not-yet-visited keys made non-enumerable on [[Get]] must not show up in output', { skip: !define.supportsDescriptors }, function (st) {
var o = { a: 'A', b: 'B' };
Object.defineProperty(o, 'a', {
get: function () {
Object.defineProperty(o, 'b', { enumerable: false });
return 'A';
}
});
st.deepEqual(entriesnode_modules\object.entries\test\shimmed.js (Line 20:35 - Line 27:8), node_modules\object.values\test\shimmed.js (Line 20:34 - Line 27:7)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Object.entriesnode_modules\object.entries\test\index.js (Line 3:2 - Line 9:8), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { entriesnode_modules\object.entries\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation, Object), t);
t.end();
});node_modules\object.assign\test\shimmed.js (Line 4:2 - Line 14:7), node_modules\reflect.getprototypeof\test\shimmed.js (Line 3:10 - Line 13:7)
);
var test = require('tape');
var defineProperties = require('define-properties');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(Object.assignnode_modules\object.assign\test\shimmed.js (Line 21:34 - Line 28:7), node_modules\object.values\test\shimmed.js (Line 20:34 - Line 27:7)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Object.assignnode_modules\object.assign\test\native.js (Line 10:9 - Line 49:2), node_modules\object.assign\test\shimmed.js (Line 13:10 - Line 52:2)
, function (t) {
t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
st.end();
});
// v8 in node 0.8 and 0.10 have non-enumerable string properties
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
/*
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
* which is 72% slower than our shim, and Firefox 40's native implementation.
*/
var thrower = Object.preventExtensions({ 1: '2' });
var error;
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
st.equal(error instanceof TypeError, true, 'error is TypeError');
st.equal(thrower[1], '2', 'thrower[1] === "2"');
st.end();
});
runTests(Object.assign, t);
t.end();
});node_modules\object.assign\test\index.js (Line 3:2 - Line 9:7), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { assignnode_modules\object.assign\test\implementation.js (Line 1:1 - Line 10:25), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 10:23)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad first arg/receiver'node_modules\object-inspect\test\indent-option.js (Line 69:5 - Line 77:45), node_modules\object-inspect\test\indent-option.js (Line 41:8 - Line 49:30)
,
'}'
].join('\n');
t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two');
t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs');
});
test('simple array with all single line elements'node_modules\object-inspect\test\indent-option.js (Line 116:5 - Line 122:9), node_modules\object-inspect\test\indent-option.js (Line 43:5 - Line 49:30)
].join('\n');
t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two');
t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs');
});
test('values'node_modules\object-inspect\test\indent-option.js (Line 141:5 - Line 149:6), node_modules\object-inspect\test\indent-option.js (Line 114:18 - Line 49:30)
,
']'
].join('\n');
t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two');
t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs');
});
test('Map'node_modules\object-inspect\test\indent-option.js (Line 146:7 - Line 154:21), node_modules\object-inspect\test\values.js (Line 94:2 - Line 101:15)
);
});
test('Map', { skip: typeof Map !== 'function' }, function (t) {
var map = new Map();
map.set({ a: 1 }, ['b']);
map.set(3, NaN);
var expectedStringSpacesnode_modules\object-inspect\test\indent-option.js (Line 211:42 - Line 220:21), node_modules\object-inspect\test\values.js (Line 117:41 - Line 126:15)
);
t.end();
});
test('Set', { skip: typeof Set !== 'function' }, function (t) {
var set = new Set();
set.add({ a: 1 });
set.add(['b']);
var expectedStringSpacesnode_modules\nanoid\async\index.js (Line 13:1 - Line 35:2), node_modules\nanoid\async\index.native.js (Line 4:1 - Line 26:2)
let customAlphabet = (alphabet, defaultSize = 21) => {
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
let tick = (id, size = defaultSize) =>
random(step).then(bytes => {
let i = step
while (i--) {
id += alphabet[bytes[i] & mask] || ''
if (id.length >= size) return id
}
return tick(id, size)
})
return size => tick('', size)
}
let nanoid = (size = 21) =>
random((size |= 0)).then(bytes => {
let id = ''
while (size--) {
id += urlAlphabet[bytes[size] & 63]
}
return id
})
export { nanoid, customAlphabet, random }node_modules\nanoid\async\index.cjs (Line 12:5 - Line 22:77), node_modules\nanoid\async\index.js (Line 5:5 - Line 14:4)
crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
if (err) {
reject(err)
} else {
resolve(buf)
}
})
})
let customAlphabet = (alphabet, defaultSize = 21) => {
// First, a bitmask is necessary to generate the ID. The bitmask makes bytesnode_modules\nanoid\async\index.cjs (Line 47:9 - Line 59:63), node_modules\nanoid\async\index.native.js (Line 11:9 - Line 21:6)
id += alphabet[bytes[i] & mask] || ''
if (id.length >= size) return id
}
return tick(id, size)
})
return size => tick('', size)
}
let nanoid = (size = 21) =>
random((size |= 0)).then(bytes => {
let id = ''
// A compact alternative for `for (var i = 0; i < step; i++)`.node_modules\nanoid\async\index.browser.cjs (Line 35:9 - Line 46:63), node_modules\nanoid\async\index.browser.js (Line 11:9 - Line 20:6)
id += alphabet[bytes[i] & mask] || ''
if (id.length === size) return id
}
}
}
}
let nanoid = async (size = 21) => {
let id = ''
let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))
// A compact alternative for `for (var i = 0; i < step; i++)`.node_modules\motion-utils\dist\motion-utils.dev.js (Line 5:13 - Line 43:2), node_modules\motion-utils\dist\cjs\index.js (Line 3:2 - Line 41:3)
;
function addUniqueItem(arr, item) {
if (arr.indexOf(item) === -1)
arr.push(item);
}
function removeItem(arr, item) {
const index = arr.indexOf(item);
if (index > -1)
arr.splice(index, 1);
}
// Adapted from array-move
function moveItem([...arr], fromIndex, toIndex) {
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
if (startIndex >= 0 && startIndex < arr.length) {
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
const [item] = arr.splice(fromIndex, 1);
arr.splice(endIndex, 0, item);
}
return arr;
}
const clamp = (min, max, v) => {
if (v > max)
return max;
if (v < min)
return min;
return v;
};
function formatErrorMessage(message, errorCode) {
return errorCode
? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
: message;
}
exports.warning = () => { };
exports.invariant = () => { };
{node_modules\motion-utils\dist\motion-utils.dev.js (Line 43:5 - Line 60:8), node_modules\motion-utils\dist\cjs\index.js (Line 41:2 - Line 58:4)
{
exports.warning = (check, message, errorCode) => {
if (!check && typeof console !== "undefined") {
console.warn(formatErrorMessage(message, errorCode));
}
};
exports.invariant = (check, message, errorCode) => {
if (!check) {
throw new Error(formatErrorMessage(message, errorCode));
}
};
}
const MotionGlobalConfig = {};
/**
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
*/node_modules\motion-utils\dist\motion-utils.dev.js (Line 70:5 - Line 91:8), node_modules\motion-utils\dist\cjs\index.js (Line 68:1 - Line 89:4)
const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
/*#__NO_SIDE_EFFECTS__*/
function memo(callback) {
let result;
return () => {
if (result === undefined)
result = callback();
return result;
};
}
/*#__NO_SIDE_EFFECTS__*/
const noop = (any) => any;
/**
* Pipe
* Compose other transformers to run linearily
* pipe(min(20), max(40))
* @param {...functions} transformers
* @return {function}
*/node_modules\motion-utils\dist\motion-utils.dev.js (Line 107:5 - Line 128:20), node_modules\motion-utils\dist\cjs\index.js (Line 105:1 - Line 18:16)
/*#__NO_SIDE_EFFECTS__*/
const progress = (from, to, value) => {
const toFromDifference = to - from;
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
class SubscriptionManager {
constructor() {
this.subscriptions = [];
}
add(handler) {
addUniqueItem(this.subscriptions, handler);
return () => removeItem(this.subscriptions, handler);
}
notify(a, b, c) {
const numSubscriptions = this.subscriptions.length;
if (!numSubscriptions)
return;
if (numSubscriptions === 1) {
/**
* If there's only a single handler we can just call it without invoking a loop.
*/node_modules\motion-utils\dist\motion-utils.dev.js (Line 137:21 - Line 155:8), node_modules\motion-utils\dist\es\subscription-manager.mjs (Line 27:17 - Line 40:7)
const handler = this.subscriptions[i];
handler && handler(a, b, c);
}
}
}
getSize() {
return this.subscriptions.length;
}
clear() {
this.subscriptions.length = 0;
}
}
/**
* Converts seconds to milliseconds
*
* @param seconds - Time in seconds.
* @return milliseconds - Converted time in milliseconds.
*/node_modules\motion-utils\dist\motion-utils.dev.js (Line 167:5 - Line 203:7), node_modules\motion-utils\dist\cjs\index.js (Line 165:1 - Line 201:3)
function velocityPerSecond(velocity, frameDuration) {
return frameDuration ? velocity * (1000 / frameDuration) : 0;
}
const warned = new Set();
function hasWarned(message) {
return warned.has(message);
}
function warnOnce(condition, message, errorCode) {
if (condition || warned.has(message))
return;
console.warn(formatErrorMessage(message, errorCode));
warned.add(message);
}
const wrap = (min, max, v) => {
const rangeSize = max - min;
return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;
};
/*
Bezier function generator
This has been modified from Gaëtan Renaudeau's BezierEasing
https://github.com/gre/bezier-easing/blob/master/src/index.js
https://github.com/gre/bezier-easing/blob/master/LICENSE
I've removed the newtonRaphsonIterate algo because in benchmarking it
wasn't noticeably faster than binarySubdivision, indeed removing it
usually improved times, depending on the curve.
I also removed the lookup table, as for the added bundle size and loop we're
only cutting ~4 or so subdivision iterations. I bumped the max iterations up
to 12 to compensate and this still tended to be faster for no perceivable
loss in accuracy.
Usage
const easeOut = cubicBezier(.17,.67,.83,.67);
const x = easeOut(0.5); // returns 0.627...
*/node_modules\motion-utils\dist\motion-utils.dev.js (Line 204:5 - Line 346:2), node_modules\motion-utils\dist\es\easing\cubic-bezier.mjs (Line 20:1 - Line 344:2)
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *
t;
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 12;
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
let currentX;
let currentT;
let i = 0;
do {
currentT = lowerBound + (upperBound - lowerBound) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - x;
if (currentX > 0.0) {
upperBound = currentT;
}
else {
lowerBound = currentT;
}
} while (Math.abs(currentX) > subdivisionPrecision &&
++i < subdivisionMaxIterations);
return currentT;
}
function cubicBezier(mX1, mY1, mX2, mY2) {
// If this is a linear gradient, return linear easing
if (mX1 === mY1 && mX2 === mY2)
return noop;
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
// If animation is at start/end, return t without easing
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}
// Accepts an easing function and returns a new one that outputs mirrored values for
// the second half of the animation. Turns easeIn into easeInOut.
const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
// Accepts an easing function and returns a new one that outputs reversed values.
// Turns easeIn into easeOut.
const reverseEasing = (easing) => (p) => 1 - easing(1 - p);
const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
const backIn = /*@__PURE__*/ reverseEasing(backOut);
const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
const circIn = (p) => 1 - Math.sin(Math.acos(p));
const circOut = reverseEasing(circIn);
const circInOut = mirrorEasing(circIn);
const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
function steps(numSteps, direction = "end") {
return (progress) => {
progress =
direction === "end"
? Math.min(progress, 0.999)
: Math.max(progress, 0.001);
const expanded = progress * numSteps;
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
return clamp(0, 1, rounded / numSteps);
};
}
const isEasingArray = (ease) => {
return Array.isArray(ease) && typeof ease[0] !== "number";
};
function getEasingForSegment(easing, i) {
return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;
}
const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
const easingLookup = {
linear: noop,
easeIn,
easeInOut,
easeOut,
circIn,
circInOut,
circOut,
backIn,
backInOut,
backOut,
anticipate,
};
const isValidEasing = (easing) => {
return typeof easing === "string";
};
const easingDefinitionToFunction = (definition) => {
if (isBezierDefinition(definition)) {
// If cubic bezier definition, create bezier curve
exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
const [x1, y1, x2, y2] = definition;
return cubicBezier(x1, y1, x2, y2);
}
else if (isValidEasing(definition)) {
// Else lookup from table
exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type");
return easingLookup[definition];
}
return definition;
};
exports.MotionGlobalConfig = MotionGlobalConfig;
exports.SubscriptionManager = SubscriptionManager;
exports.addUniqueItem = addUniqueItem;
exports.anticipate = anticipate;
exports.backIn = backIn;
exports.backInOut = backInOut;
exports.backOut = backOut;
exports.circIn = circIn;
exports.circInOut = circInOut;
exports.circOut = circOut;
exports.clamp = clamp;
exports.cubicBezier = cubicBezier;
exports.easeIn = easeIn;
exports.easeInOut = easeInOut;
exports.easeOut = easeOut;
exports.easingDefinitionToFunction = easingDefinitionToFunction;
exports.getEasingForSegment = getEasingForSegment;
exports.hasWarned = hasWarned;
exports.isBezierDefinition = isBezierDefinition;
exports.isEasingArray = isEasingArray;
exports.isNumericalString = isNumericalString;
exports.isObject = isObject;
exports.isZeroValueString = isZeroValueString;
exports.memo = memo;
exports.millisecondsToSeconds = millisecondsToSeconds;
exports.mirrorEasing = mirrorEasing;
exports.moveItem = moveItem;
exports.noop = noop;
exports.pipe = pipe;
exports.progress = progress;
exports.removeItem = removeItem;
exports.reverseEasing = reverseEasing;
exports.secondsToMilliseconds = secondsToMilliseconds;
exports.steps = steps;
exports.velocityPerSecond = velocityPerSecond;
exports.warnOnce = warnOnce;
exports.wrap = wrap;node_modules\minimist\test\bool.js (Line 71:5 - Line 82:44), node_modules\minimist\test\bool.js (Line 51:2 - Line 63:38)
);
var expected = {
herp: true,
h: true,
_: ['derp'],
};
t.same(aliasedArgv, expected);
t.same(propertyArgv, expected);
t.end();
});
test('boolean and alias array with options hash'node_modules\language-tags\lib\Tag.js (Line 7:13 - Line 13:16), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 3:22 - Line 8:15)
;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _definePropertynode_modules\language-tags\lib\Subtag.js (Line 1:1 - Line 18:14), node_modules\language-tags\lib\Tag.js (Line 1:1 - Line 18:8)
/**
* @author Matthew Caruana Galizia <mattcg@gmail.com>
* @license MIT: http://mattcg.mit-license.org/
* @copyright Copyright (c) 2013, Matthew Caruana Galizia
*/
'use strict';
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var index = require('language-subtag-registry/data/json/index.json');
var registry = require('language-subtag-registry/data/json/registry.json');
var Subtag = /*#__PURE__*/node_modules\keyv\src\index.js (Line 148:12 - Line 155:8), node_modules\keyv\src\index.js (Line 120:4 - Line 127:7)
))
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data))
.then(data => {
if (data === undefined || data === null) {
return undefined;
}
if (isArraynode_modules\keyv\src\index.js (Line 171:2 - Line 179:2), node_modules\keyv\src\index.js (Line 124:10 - Line 132:2)
;
}
if (typeof data.expires === 'number' && Date.now() > data.expires) {
return this.delete(key).then(() => undefined);
}
return (options && options.raw) ? data : data.value;
});node_modules\jsx-ast-utils\lib\hasProp.js (Line 64:13 - Line 71:6), node_modules\jsx-ast-utils\lib\hasProp.js (Line 48:11 - Line 55:5)
() {
var nodeProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_OPTIONS;
var propsToCheck = typeof props === 'string' ? props.split(' ') : props;
return propsToCheck.everynode_modules\jsx-ast-utils\lib\getProp.js (Line 1:1 - Line 9:9), node_modules\eslint-plugin-import\lib\core\importType.js (Line 1:1 - Line 1:6)
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _extendsnode_modules\jsx-ast-utils\lib\getProp.js (Line 30:8 - Line 35:9), node_modules\jsx-ast-utils\lib\hasProp.js (Line 25:8 - Line 30:4)
() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_OPTIONS;
functionnode_modules\json-stable-stringify-without-jsonify\test\replacer.js (Line 66:2 - Line 73:42), node_modules\json-stable-stringify-without-jsonify\test\replacer.js (Line 16:2 - Line 23:34)
};
var replacer = function(key, value) {
if(value === 1) return 'one';
if(value === 2) return 'two';
return value;
};
t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}'node_modules\json-stable-stringify-without-jsonify\example\key_cmp.js (Line 1:6 - Line 7:8), node_modules\json-stable-stringify-without-jsonify\test\cmp.js (Line 5:2 - Line 10:2)
);
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
consolenode_modules\json-schema-traverse\spec\index.spec.js (Line 152:6 - Line 158:2), node_modules\json-schema-traverse\spec\index.spec.js (Line 139:7 - Line 146:3)
],
['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
['post', schema, '', schema, undefined, undefined, undefined, undefined],
];
assert.deepStrictEqual(calls, expectedCalls);
});
}node_modules\js-yaml\lib\dumper.js (Line 590:8 - Line 605:2), node_modules\js-yaml\lib\dumper.js (Line 562:7 - Line 577:2)
) {
var _result = '',
_tag = state.tag,
index,
length,
value;
for (index = 0, length = object.length; index < length; index += 1) {
value = object[index];
if (state.replacer) {
value = state.replacer.call(object, String(index), value);
}
// Write only valid elements, put null instead of invalid elements.
if (writeNode(state, level +node_modules\is-weakset\test\index.js (Line 7:2 - Line 27:10), node_modules\which-collection\test\index.js (Line 7:2 - Line 27:16)
= require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isWeakSetnode_modules\is-weakmap\test\index.js (Line 7:2 - Line 27:10), node_modules\which-collection\test\index.js (Line 7:2 - Line 27:16)
= require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isWeakMapnode_modules\is-typed-array\test\index.js (Line 59:13 - Line 65:6), node_modules\which-typed-array\test\index.js (Line 58:16 - Line 64:6)
(function () {}), 'function is not typed array');
t.end();
});
test('Generators', { skip: generators.length === 0 }, function (t) {
forEach(generators, function (genFn) {
t.notOknode_modules\is-set\test\index.js (Line 7:2 - Line 27:6), node_modules\which-collection\test\index.js (Line 7:2 - Line 27:16)
= require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isSetnode_modules\is-map\test\index.js (Line 7:2 - Line 27:6), node_modules\which-collection\test\index.js (Line 7:2 - Line 27:16)
= require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isMapnode_modules\is-core-module\test\index.js (Line 121:6 - Line 136:2), node_modules\is-core-module\test\index.js (Line 56:5 - Line 71:3)
if (mod.slice(0, 5) !== 'node:') {
if (supportsNodePrefix) {
st.doesNotThrow(
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
'requiring node:' + mod + ' does not throw'
);
} else {
st['throws'](
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
'requiring node:' + mod + ' throws'
);
}
}
}
}
}node_modules\is-async-function\test\index.js (Line 11:11 - Line 28:16), node_modules\is-generator-function\test\index.js (Line 11:11 - Line 28:20)
);
test('returns false for non-functions', function (t) {
var nonFuncs = [
true,
false,
null,
undefined,
{},
[],
/a/g,
'string',
42,
new Date()
];
t.plan(nonFuncs.length);
forEach(nonFuncs, function (nonFunc) {
t.notOk(isAsyncFunctionnode_modules\is-array-buffer\test\index.js (Line 33:25 - Line 41:14), node_modules\is-shared-array-buffer\test\index.js (Line 23:26 - Line 31:20)
);
st.end();
});
t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) {
forEach(availableTypedArrays, function (TypedArray) {
var ta = new global[TypedArray](0);
st.equal(isArrayBuffernode_modules\internal-slot\test\index.js (Line 46:4 - Line 55:4), node_modules\internal-slot\test\index.js (Line 13:7 - Line 22:7)
(primitive, ''); },
TypeError,
inspect(primitive) + ' is not an Object'
);
});
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
t['throws'](
// @ts-expect-error
function () { SLOT.hasnode_modules\internal-slot\test\index.js (Line 75:4 - Line 84:4), node_modules\internal-slot\test\index.js (Line 13:7 - Line 22:7)
(primitive, ''); },
TypeError,
inspect(primitive) + ' is not an Object'
);
});
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
t['throws'](
// @ts-expect-error
function () { SLOT.getnode_modules\internal-slot\test\index.js (Line 104:4 - Line 113:4), node_modules\internal-slot\test\index.js (Line 13:7 - Line 22:7)
(primitive, ''); },
TypeError,
inspect(primitive) + ' is not an Object'
);
});
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
t['throws'](
// @ts-expect-error
function () { SLOT.setnode_modules\has-proto\test\index.js (Line 16:7 - Line 27:2), node_modules\has-proto\test\mutator.js (Line 23:2 - Line 34:2)
) {
t.notOk('toString' in obj, 'null object lacks toString');
if (gOPD && getter) {
t.equal(getter(obj), null);
}
} else {
t.ok('toString' in obj, 'without proto, null object has toString');
t.equal(gPO(obj), Object.prototype);
}
t.end();
});node_modules\has-proto\test\accessor.js (Line 13:17 - Line 34:2), node_modules\has-proto\test\mutator.js (Line 13:16 - Line 34:2)
();
t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')');
var obj = { __proto__: null };
if (result) {
t.notOk('toString' in obj, 'null object lacks toString');
t.equal(gPO(obj), null);
if (gOPD && getter) {
t.equal(getter(obj), null);
}
} else if (hasProto()) {
t.notOk('toString' in obj, 'null object lacks toString');
if (gOPD && getter) {
t.equal(getter(obj), null);
}
} else {
t.ok('toString' in obj, 'without proto, null object has toString');
t.equal(gPO(obj), Object.prototype);
}
t.end();
});node_modules\graphemer\lib\index.js (Line 1:1 - Line 6:12), node_modules\@typescript-eslint\eslint-plugin\dist\configs\flat\eslint-recommended.js (Line 1:1 - Line 12:7)
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Graphemer_1node_modules\function.prototype.name\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\function-bind\test\index.js (Line 134:23 - Line 141:2), node_modules\function-bind\test\index.js (Line 119:26 - Line 126:2)
, function (st) {
var args, context;
var boundContext = {};
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
context = this;
}, boundContext,node_modules\flatted\cjs\index.js (Line 2:1 - Line 62:6), node_modules\flatted\esm\index.js (Line 1:1 - Line 61:7)
/// <reference types="../types/index.d.ts" />
// (c) 2020-present Andrea Giammarchi
const {parse: $parse, stringify: $stringify} = JSON;
const {keys} = Object;
const Primitive = String; // it could be Number
const primitive = 'string'; // it could be 'number'
const ignore = {};
const object = 'object';
const noop = (_, value) => value;
const primitives = value => (
value instanceof Primitive ? Primitive(value) : value
);
const Primitives = (_, value) => (
typeof value === primitive ? new Primitive(value) : value
);
const revive = (input, parsed, output, $) => {
const lazy = [];
for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
const k = ke[y];
const value = output[k];
if (value instanceof Primitive) {
const tmp = input[value];
if (typeof tmp === object && !parsed.has(tmp)) {
parsed.add(tmp);
output[k] = ignore;
lazy.push({k, a: [input, parsed, tmp, $]});
}
else
output[k] = $.call(output, k, tmp);
}
else if (output[k] !== ignore)
output[k] = $.call(output, k, value);
}
for (let {length} = lazy, i = 0; i < length; i++) {
const {k, a} = lazy[i];
output[k] = $.call(output, k, revive.apply(null, a));
}
return output;
};
const set = (known, input, value) => {
const index = Primitive(input.push(value) - 1);
known.set(value, index);
return index;
};
/**
* Converts a specialized flatted string into a JS value.
* @param {string} text
* @param {(this: any, key: string, value: any) => any} [reviver]
* @returns {any}
*/
constnode_modules\flatted\cjs\index.js (Line 62:1 - Line 71:8), node_modules\flatted\esm\index.js (Line 61:2 - Line 77:4)
const parse = (text, reviver) => {
const input = $parse(text, Primitives).map(primitives);
const value = input[0];
const $ = reviver || noop;
const tmp = typeof value === object && value ?
revive(input, new Set, value, $) :
value;
return $.call({'': tmp}, '', tmp);
};
exportsnode_modules\flatted\cjs\index.js (Line 80:1 - Line 109:8), node_modules\flatted\esm\index.js (Line 78:2 - Line 112:4)
const stringify = (value, replacer, space) => {
const $ = replacer && typeof replacer === object ?
(k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) :
(replacer || noop);
const known = new Map;
const input = [];
const output = [];
let i = +set(known, input, $.call({'': value}, '', value));
let firstRun = !i;
while (i < input.length) {
firstRun = true;
output[i] = $stringify(input[i++], replace, space);
}
return '[' + output.join(',') + ']';
function replace(key, value) {
if (firstRun) {
firstRun = !firstRun;
return value;
}
const after = $.call(this, key, value);
switch (typeof after) {
case object:
if (after === null) return after;
case primitive:
return known.get(after) || set(known, input, after);
}
return after;
}
};
exportsnode_modules\fastq\test\test.js (Line 449:5 - Line 465:7), node_modules\fastq\test\test.js (Line 421:8 - Line 437:16)
(1, done)
queue.resume()
function done (err, result) {
completed = true
t.error(err, 'no error')
}
function worker (arg, cb) {
setImmediate(function () {
cb(null, true)
})
}
})
test('kill'node_modules\fastq\test\test.js (Line 516:13 - Line 535:16), node_modules\fastq\test\test.js (Line 481:5 - Line 500:15)
()
function done (err, result) {
t.error(err, 'no error')
setImmediate(function () {
t.equal(queue.length(), 0, 'no queued tasks')
t.equal(queue.running(), 0, 'no running tasks')
t.equal(queue.drain, predrain, 'drain is back to default')
})
}
function worker (arg, cb) {
t.equal(expected.shift(), arg, 'tasks come in order')
setImmediate(function () {
cb(null, true)
})
}
})
test('pause && idle'node_modules\fastq\test\test.js (Line 612:37 - Line 622:8), node_modules\fastq\test\test.js (Line 596:34 - Line 606:5)
, function (t) {
t.plan(5)
var q = buildQueue(function (task, cb) {
cb(new Error('test error'), null)
}, 1)
q.error(function (err, task) {
t.ok(err instanceof Error, 'global error handler should catch the error')
t.match(err.message, /test error/, 'error message should be "test error"')
t.equal(task, 42, 'The task executed should be passed')
})
q.unshiftnode_modules\fastq\test\promise.js (Line 192:13 - Line 199:4), node_modules\fastq\test\test.js (Line 599:5 - Line 606:2)
)
}, 1)
q.error(function (err, task) {
t.ok(err instanceof Error, 'global error handler should catch the error')
t.match(err.message, /test error/, 'error message should be "test error"')
t.equal(task, 42, 'The task executed should be passed')
})
trynode_modules\fastq\test\promise.js (Line 235:34 - Line 244:8), node_modules\fastq\test\promise.js (Line 220:31 - Line 229:5)
, async function (t) {
function handleRejection () {
t.fail('unhandledRejection')
}
process.once('unhandledRejection', handleRejection)
const q = buildQueue(async function (task, cb) {
throw new Error('test error')
}, 1)
q.unshiftnode_modules\fast-json-stable-stringify\test\to-json.js (Line 3:1 - Line 22:2), node_modules\json-stable-stringify-without-jsonify\test\to-json.js (Line 1:1 - Line 20:2)
var test = require('tape');
var stringify = require('../');
test('toJSON function', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } };
t.equal(stringify(obj), '{"one":1}' );
});
test('toJSON returns string', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
t.equal(stringify(obj), '"one"');
});
test('toJSON returns array', function (t) {
t.plan(1);
var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
t.equal(stringify(obj), '["one"]');
});node_modules\fast-json-stable-stringify\test\str.js (Line 3:1 - Line 18:19), node_modules\json-stable-stringify-without-jsonify\test\str.js (Line 1:1 - Line 16:23)
var test = require('tape');
var stringify = require('../');
test('simple object', function (t) {
t.plan(1);
var obj = { c: 6, b: [4,5], a: 3, z: null };
t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
});
test('object with undefined', function (t) {
t.plan(1);
var obj = { a: 3, z: undefined };
t.equal(stringify(obj), '{"a":3}');
});
test('object with null'node_modules\fast-json-stable-stringify\test\str.js (Line 27:28 - Line 46:2), node_modules\json-stable-stringify-without-jsonify\test\str.js (Line 13:10 - Line 32:2)
);
});
test('array with undefined', function (t) {
t.plan(1);
var obj = [4, undefined, 6];
t.equal(stringify(obj), '[4,null,6]');
});
test('object with empty string', function (t) {
t.plan(1);
var obj = { a: 3, z: '' };
t.equal(stringify(obj), '{"a":3,"z":""}');
});
test('array with empty string', function (t) {
t.plan(1);
var obj = [4, '', 6];
t.equal(stringify(obj), '[4,"",6]');
});node_modules\fast-json-stable-stringify\test\nested.js (Line 3:1 - Line 41:2), node_modules\json-stable-stringify-without-jsonify\test\nested.js (Line 1:1 - Line 40:4)
var test = require('tape');
var stringify = require('../');
test('nested', function (t) {
t.plan(1);
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
});
test('cyclic (default)', function (t) {
t.plan(1);
var one = { a: 1 };
var two = { a: 2, one: one };
one.two = two;
try {
stringify(one);
} catch (ex) {
t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
}
});
test('cyclic (specifically allowed)', function (t) {
t.plan(1);
var one = { a: 1 };
var two = { a: 2, one: one };
one.two = two;
t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
});
test('repeated non-cyclic value', function(t) {
t.plan(1);
var one = { x: 1 };
var two = { a: one, b: one };
t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
});
test('acyclic but with reused obj-property pointers', function (t) {
t.plan(1);
var x = { a: 1 };node_modules\fast-json-stable-stringify\test\cmp.js (Line 3:1 - Line 13:2), node_modules\json-stable-stringify-without-jsonify\test\cmp.js (Line 1:1 - Line 11:2)
var test = require('tape');
var stringify = require('../');
test('custom comparison function', function (t) {
t.plan(1);
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
});node_modules\fast-json-stable-stringify\example\value_cmp.js (Line 1:1 - Line 7:2), node_modules\json-stable-stringify-without-jsonify\example\value_cmp.js (Line 1:1 - Line 7:2)
var stringify = require('../');
var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
var s = stringify(obj, function (a, b) {
return a.value < b.value ? 1 : -1;
});
console.log(s);node_modules\fast-json-stable-stringify\example\key_cmp.js (Line 1:1 - Line 7:2), node_modules\json-stable-stringify-without-jsonify\example\key_cmp.js (Line 1:1 - Line 7:2)
var stringify = require('../');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
console.log(s);node_modules\fast-deep-equal\es6\index.js (Line 1:1 - Line 64:2), node_modules\fast-deep-equal\es6\react.js (Line 1:1 - Line 64:4)
'use strict';
// do not edit .js files directly - edit src/index.jst
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if ((a instanceof Map) && (b instanceof Map)) {
if (a.size !== b.size) return false;
for (i of a.entries())
if (!b.has(i[0])) return false;
for (i of a.entries())
if (!equal(i[1], b.get(i[0]))) return false;
return true;
}
if ((a instanceof Set) && (b instanceof Set)) {
if (a.size !== b.size) return false;
for (i of a.entries())
if (!b.has(i[0])) return false;
return true;
}
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (a[i] !== b[i]) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (!node_modules\espree\dist\espree.cjs (Line 33:1 - Line 294:4), node_modules\espree\lib\token-translator.js (Line 1:1 - Line 259:81)
/**
* @fileoverview Translates tokens between Acorn format and Esprima format.
* @author Nicholas C. Zakas
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
// none!
//------------------------------------------------------------------------------
// Private
//------------------------------------------------------------------------------
// Esprima Token Types
const Token = {
Boolean: "Boolean",
EOF: "<end>",
Identifier: "Identifier",
PrivateIdentifier: "PrivateIdentifier",
Keyword: "Keyword",
Null: "Null",
Numeric: "Numeric",
Punctuator: "Punctuator",
String: "String",
RegularExpression: "RegularExpression",
Template: "Template",
JSXIdentifier: "JSXIdentifier",
JSXText: "JSXText"
};
/**
* Converts part of a template into an Esprima token.
* @param {AcornToken[]} tokens The Acorn tokens representing the template.
* @param {string} code The source code.
* @returns {EsprimaToken} The Esprima equivalent of the template token.
* @private
*/
function convertTemplatePart(tokens, code) {
const firstToken = tokens[0],
lastTemplateToken = tokens.at(-1);
const token = {
type: Token.Template,
value: code.slice(firstToken.start, lastTemplateToken.end)
};
if (firstToken.loc) {
token.loc = {
start: firstToken.loc.start,
end: lastTemplateToken.loc.end
};
}
if (firstToken.range) {
token.start = firstToken.range[0];
token.end = lastTemplateToken.range[1];
token.range = [token.start, token.end];
}
return token;
}
/**
* Contains logic to translate Acorn tokens into Esprima tokens.
* @param {Object} acornTokTypes The Acorn token types.
* @param {string} code The source code Acorn is parsing. This is necessary
* to correct the "value" property of some tokens.
* @constructor
*/
function TokenTranslator(acornTokTypes, code) {
// token types
this._acornTokTypes = acornTokTypes;
// token buffer for templates
this._tokens = [];
// track the last curly brace
this._curlyBrace = null;
// the source code
this._code = code;
}
TokenTranslator.prototype = {
constructor: TokenTranslator,
/**
* Translates a single Esprima token to a single Acorn token. This may be
* inaccurate due to how templates are handled differently in Esprima and
* Acorn, but should be accurate for all other tokens.
* @param {AcornToken} token The Acorn token to translate.
* @param {Object} extra Espree extra object.
* @returns {EsprimaToken} The Esprima version of the token.
*/
translate(token, extra) {
const type = token.type,
tt = this._acornTokTypes;
if (type === tt.name) {
token.type = Token.Identifier;
// TODO: See if this is an Acorn bug
if (token.value === "static") {
token.type = Token.Keyword;
}
if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) {
token.type = Token.Keyword;
}
} else if (type === tt.privateId) {
token.type = Token.PrivateIdentifier;
} else if (type === tt.semi || type === tt.comma ||
type === tt.parenL || type === tt.parenR ||
type === tt.braceL || type === tt.braceR ||
type === tt.dot || type === tt.bracketL ||
type === tt.colon || type === tt.question ||
type === tt.bracketR || type === tt.ellipsis ||
type === tt.arrow || type === tt.jsxTagStart ||
type === tt.incDec || type === tt.starstar ||
type === tt.jsxTagEnd || type === tt.prefix ||
type === tt.questionDot ||
(type.binop && !type.keyword) ||
type.isAssign) {
token.type = Token.Punctuator;
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.jsxName) {
token.type = Token.JSXIdentifier;
} else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) {
token.type = Token.JSXText;
} else if (type.keyword) {
if (type.keyword === "true" || type.keyword === "false") {
token.type = Token.Boolean;
} else if (type.keyword === "null") {
token.type = Token.Null;
} else {
token.type = Token.Keyword;
}
} else if (type === tt.num) {
token.type = Token.Numeric;
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.string) {
if (extra.jsxAttrValueToken) {
extra.jsxAttrValueToken = false;
token.type = Token.JSXText;
} else {
token.type = Token.String;
}
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.regexp) {
token.type = Token.RegularExpression;
const value = token.value;
token.regex = {
flags: value.flags,
pattern: value.pattern
};
token.value = `/${value.pattern}/${value.flags}`;
}
return token;
},
/**
* Function to call during Acorn's onToken handler.
* @param {AcornToken} token The Acorn token.
* @param {Object} extra The Espree extra object.
* @returns {void}
*/
onToken(token, extra) {
const tt = this._acornTokTypes,
tokens = extra.tokens,
templateTokens = this._tokens;
/**
* Flushes the buffered template tokens and resets the template
* tracking.
* @returns {void}
* @private
*/
const translateTemplateTokens = () => {
tokens.push(convertTemplatePart(this._tokens, this._code));
this._tokens = [];
};
if (token.type === tt.eof) {
// might be one last curlyBrace
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
}
return;
}
if (token.type === tt.backQuote) {
// if there's already a curly, it's not part of the template
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
this._curlyBrace = null;
}
templateTokens.push(token);
// it's the end
if (templateTokens.length > 1) {
translateTemplateTokens();
}
return;
}
if (token.type === tt.dollarBraceL) {
templateTokens.push(token);
translateTemplateTokens();
return;
}
if (token.type === tt.braceR) {
// if there's already a curly, it's not part of the template
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
}
// store new curly for later
this._curlyBrace = token;
return;
}
if (token.type === tt.template || token.type === tt.invalidTemplate) {
if (this._curlyBrace) {
templateTokens.push(this._curlyBrace);
this._curlyBrace = null;
}
templateTokens.push(token);
return;
}
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
this._curlyBrace = null;
}
tokens.push(this.translate(token, extra));
}
};
/**
* @fileoverview A collection of methods for processing Espree's options.
* @author Kai Cataldo
*/node_modules\espree\dist\espree.cjs (Line 291:1 - Line 321:9), node_modules\espree\lib\options.js (Line 1:1 - Line 31:7)
/**
* @fileoverview A collection of methods for processing Espree's options.
* @author Kai Cataldo
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const SUPPORTED_VERSIONS = [
3,
5,
6, // 2015
7, // 2016
8, // 2017
9, // 2018
10, // 2019
11, // 2020
12, // 2021
13, // 2022
14, // 2023
15, // 2024
16, // 2025
17 // 2026
];
/**
* Get the latest ECMAScript version supported by Espree.
* @returns {number} The latest ECMAScript version.
*/
functionnode_modules\espree\dist\espree.cjs (Line 329:1 - Line 384:9), node_modules\espree\lib\options.js (Line 39:2 - Line 94:7)
function getSupportedEcmaVersions() {
return [...SUPPORTED_VERSIONS];
}
/**
* Normalize ECMAScript version from the initial config
* @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config
* @throws {Error} throws an error if the ecmaVersion is invalid.
* @returns {number} normalized ECMAScript version
*/
function normalizeEcmaVersion(ecmaVersion = 5) {
let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion;
if (typeof version !== "number") {
throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof ecmaVersion} instead.`);
}
// Calculate ECMAScript edition number from official year version starting with
// ES2015, which corresponds with ES6 (or a difference of 2009).
if (version >= 2015) {
version -= 2009;
}
if (!SUPPORTED_VERSIONS.includes(version)) {
throw new Error("Invalid ecmaVersion.");
}
return version;
}
/**
* Normalize sourceType from the initial config
* @param {string} sourceType to normalize
* @throws {Error} throw an error if sourceType is invalid
* @returns {string} normalized sourceType
*/
function normalizeSourceType(sourceType = "script") {
if (sourceType === "script" || sourceType === "module") {
return sourceType;
}
if (sourceType === "commonjs") {
return "script";
}
throw new Error("Invalid sourceType.");
}
/**
* Normalize parserOptions
* @param {Object} options the parser options to normalize
* @throws {Error} throw an error if found invalid option.
* @returns {Object} normalized options
*/
functionnode_modules\espree\dist\espree.cjs (Line 384:1 - Line 415:2), node_modules\espree\lib\options.js (Line 94:2 - Line 125:2)
function normalizeOptions(options) {
const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);
const sourceType = normalizeSourceType(options.sourceType);
const ranges = options.range === true;
const locations = options.loc === true;
if (ecmaVersion !== 3 && options.allowReserved) {
// a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed
throw new Error("`allowReserved` is only supported when ecmaVersion is 3");
}
if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") {
throw new Error("`allowReserved`, when present, must be `true` or `false`");
}
const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false;
const ecmaFeatures = options.ecmaFeatures || {};
const allowReturnOutsideFunction = options.sourceType === "commonjs" ||
Boolean(ecmaFeatures.globalReturn);
if (sourceType === "module" && ecmaVersion < 6) {
throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");
}
return Object.assign({}, options, {
ecmaVersion,
sourceType,
ranges,
locations,
allowReserved,
allowReturnOutsideFunction
});
}node_modules\espree\dist\espree.cjs (Line 420:1 - Line 468:4), node_modules\espree\lib\espree.js (Line 7:1 - Line 55:7)
const STATE = Symbol("espree's internal state");
const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode");
/**
* Converts an Acorn comment to a Esprima comment.
* @param {boolean} block True if it's a block comment, false if not.
* @param {string} text The text of the comment.
* @param {int} start The index at which the comment starts.
* @param {int} end The index at which the comment ends.
* @param {Location} startLoc The location at which the comment starts.
* @param {Location} endLoc The location at which the comment ends.
* @param {string} code The source code being parsed.
* @returns {Object} The comment object.
* @private
*/
function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code) {
let type;
if (block) {
type = "Block";
} else if (code.slice(start, start + 2) === "#!") {
type = "Hashbang";
} else {
type = "Line";
}
const comment = {
type,
value: text
};
if (typeof start === "number") {
comment.start = start;
comment.end = end;
comment.range = [start, end];
}
if (typeof startLoc === "object") {
comment.loc = {
start: startLoc,
end: endLoc
};
}
return comment;
}
varnode_modules\espree\dist\espree.cjs (Line 468:2 - Line 762:2), node_modules\espree\lib\espree.js (Line 55:2 - Line 349:2)
() => Parser => {
const tokTypes = Object.assign({}, Parser.acorn.tokTypes);
if (Parser.acornJsx) {
Object.assign(tokTypes, Parser.acornJsx.tokTypes);
}
return class Espree extends Parser {
constructor(opts, code) {
if (typeof opts !== "object" || opts === null) {
opts = {};
}
if (typeof code !== "string" && !(code instanceof String)) {
code = String(code);
}
// save original source type in case of commonjs
const originalSourceType = opts.sourceType;
const options = normalizeOptions(opts);
const ecmaFeatures = options.ecmaFeatures || {};
const tokenTranslator =
options.tokens === true
? new TokenTranslator(tokTypes, code)
: null;
/*
* Data that is unique to Espree and is not represented internally
* in Acorn.
*
* For ES2023 hashbangs, Espree will call `onComment()` during the
* constructor, so we must define state before having access to
* `this`.
*/
const state = {
originalSourceType: originalSourceType || options.sourceType,
tokens: tokenTranslator ? [] : null,
comments: options.comment === true ? [] : null,
impliedStrict: ecmaFeatures.impliedStrict === true && options.ecmaVersion >= 5,
ecmaVersion: options.ecmaVersion,
jsxAttrValueToken: false,
lastToken: null,
templateElements: []
};
// Initialize acorn parser.
super({
// do not use spread, because we don't want to pass any unknown options to acorn
ecmaVersion: options.ecmaVersion,
sourceType: options.sourceType,
ranges: options.ranges,
locations: options.locations,
allowReserved: options.allowReserved,
// Truthy value is true for backward compatibility.
allowReturnOutsideFunction: options.allowReturnOutsideFunction,
// Collect tokens
onToken(token) {
if (tokenTranslator) {
// Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state.
tokenTranslator.onToken(token, state);
}
if (token.type !== tokTypes.eof) {
state.lastToken = token;
}
},
// Collect comments
onComment(block, text, start, end, startLoc, endLoc) {
if (state.comments) {
const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code);
state.comments.push(comment);
}
}
}, code);
/*
* We put all of this data into a symbol property as a way to avoid
* potential naming conflicts with future versions of Acorn.
*/
this[STATE] = state;
}
tokenize() {
do {
this.next();
} while (this.type !== tokTypes.eof);
// Consume the final eof token
this.next();
const extra = this[STATE];
const tokens = extra.tokens;
if (extra.comments) {
tokens.comments = extra.comments;
}
return tokens;
}
finishNode(...args) {
const result = super.finishNode(...args);
return this[ESPRIMA_FINISH_NODE](result);
}
finishNodeAt(...args) {
const result = super.finishNodeAt(...args);
return this[ESPRIMA_FINISH_NODE](result);
}
parse() {
const extra = this[STATE];
const program = super.parse();
program.sourceType = extra.originalSourceType;
if (extra.comments) {
program.comments = extra.comments;
}
if (extra.tokens) {
program.tokens = extra.tokens;
}
/*
* Adjust opening and closing position of program to match Esprima.
* Acorn always starts programs at range 0 whereas Esprima starts at the
* first AST node's start (the only real difference is when there's leading
* whitespace or leading comments). Acorn also counts trailing whitespace
* as part of the program whereas Esprima only counts up to the last token.
*/
if (program.body.length) {
const [firstNode] = program.body;
if (program.range) {
program.range[0] = firstNode.range[0];
}
if (program.loc) {
program.loc.start = firstNode.loc.start;
}
program.start = firstNode.start;
}
if (extra.lastToken) {
if (program.range) {
program.range[1] = extra.lastToken.range[1];
}
if (program.loc) {
program.loc.end = extra.lastToken.loc.end;
}
program.end = extra.lastToken.end;
}
/*
* https://github.com/eslint/espree/issues/349
* Ensure that template elements have correct range information.
* This is one location where Acorn produces a different value
* for its start and end properties vs. the values present in the
* range property. In order to avoid confusion, we set the start
* and end properties to the values that are present in range.
* This is done here, instead of in finishNode(), because Acorn
* uses the values of start and end internally while parsing, making
* it dangerous to change those values while parsing is ongoing.
* By waiting until the end of parsing, we can safely change these
* values without affect any other part of the process.
*/
this[STATE].templateElements.forEach(templateElement => {
const startOffset = -1;
const endOffset = templateElement.tail ? 1 : 2;
templateElement.start += startOffset;
templateElement.end += endOffset;
if (templateElement.range) {
templateElement.range[0] += startOffset;
templateElement.range[1] += endOffset;
}
if (templateElement.loc) {
templateElement.loc.start.column += startOffset;
templateElement.loc.end.column += endOffset;
}
});
return program;
}
parseTopLevel(node) {
if (this[STATE].impliedStrict) {
this.strict = true;
}
return super.parseTopLevel(node);
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @param {string} message The error message.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
raise(pos, message) {
const loc = Parser.acorn.getLineInfo(this.input, pos);
const err = new SyntaxError(message);
err.index = pos;
err.lineNumber = loc.line;
err.column = loc.column + 1; // acorn uses 0-based columns
throw err;
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @param {string} message The error message.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
raiseRecoverable(pos, message) {
this.raise(pos, message);
}
/**
* Overwrites the default unexpected method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
unexpected(pos) {
let message = "Unexpected token";
if (pos !== null && pos !== void 0) {
this.pos = pos;
if (this.options.locations) {
while (this.pos < this.lineStart) {
this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
--this.curLine;
}
}
this.nextToken();
}
if (this.end > this.start) {
message += ` ${this.input.slice(this.start, this.end)}`;
}
this.raise(this.start, message);
}
/*
* Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
* uses regular tt.string without any distinction between this and regular JS
* strings. As such, we intercept an attempt to read a JSX string and set a flag
* on extra so that when tokens are converted, the next token will be switched
* to JSXText via onToken.
*/
jsx_readString(quote) { // eslint-disable-line camelcase -- required by API
const result = super.jsx_readString(quote);
if (this.type === tokTypes.string) {
this[STATE].jsxAttrValueToken = true;
}
return result;
}
/**
* Performs last-minute Esprima-specific compatibility checks and fixes.
* @param {ASTNode} result The node to check.
* @returns {ASTNode} The finished node.
*/
[ESPRIMA_FINISH_NODE](result) {
// Acorn doesn't count the opening and closing backticks as part of templates
// so we have to adjust ranges/locations appropriately.
if (result.type === "TemplateElement") {
// save template element references to fix start/end later
this[STATE].templateElements.push(result);
}
if (result.type.includes("Function") && !result.generator) {
result.generator = false;
}
return result;
}
};
};node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 9:1 - Line 90:2), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 5:1 - Line 87:2)
/**
* @type {VisitorKeys}
*/
const KEYS = {
ArrayExpression: [
"elements"
],
ArrayPattern: [
"elements"
],
ArrowFunctionExpression: [
"params",
"body"
],
AssignmentExpression: [
"left",
"right"
],
AssignmentPattern: [
"left",
"right"
],
AwaitExpression: [
"argument"
],
BinaryExpression: [
"left",
"right"
],
BlockStatement: [
"body"
],
BreakStatement: [
"label"
],
CallExpression: [
"callee",
"arguments"
],
CatchClause: [
"param",
"body"
],
ChainExpression: [
"expression"
],
ClassBody: [
"body"
],
ClassDeclaration: [
"id",
"superClass",
"body"
],
ClassExpression: [
"id",
"superClass",
"body"
],
ConditionalExpression: [
"test",
"consequent",
"alternate"
],
ContinueStatement: [
"label"
],
DebuggerStatement: [],
DoWhileStatement: [
"body",
"test"
],
EmptyStatement: [],
ExperimentalRestProperty: [
"argument"
],
ExperimentalSpreadProperty: [
"argument"
],
ExportAllDeclaration: [
"exported",
"source",node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 105:5 - Line 141:16), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 99:5 - Line 135:18)
],
ExpressionStatement: [
"expression"
],
ForInStatement: [
"left",
"right",
"body"
],
ForOfStatement: [
"left",
"right",
"body"
],
ForStatement: [
"init",
"test",
"update",
"body"
],
FunctionDeclaration: [
"id",
"params",
"body"
],
FunctionExpression: [
"id",
"params",
"body"
],
Identifier: [],
IfStatement: [
"test",
"consequent",
"alternate"
],
ImportAttributenode_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 156:5 - Line 327:2), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 144:5 - Line 315:2)
],
ImportNamespaceSpecifier: [
"local"
],
ImportSpecifier: [
"imported",
"local"
],
JSXAttribute: [
"name",
"value"
],
JSXClosingElement: [
"name"
],
JSXClosingFragment: [],
JSXElement: [
"openingElement",
"children",
"closingElement"
],
JSXEmptyExpression: [],
JSXExpressionContainer: [
"expression"
],
JSXFragment: [
"openingFragment",
"children",
"closingFragment"
],
JSXIdentifier: [],
JSXMemberExpression: [
"object",
"property"
],
JSXNamespacedName: [
"namespace",
"name"
],
JSXOpeningElement: [
"name",
"attributes"
],
JSXOpeningFragment: [],
JSXSpreadAttribute: [
"argument"
],
JSXSpreadChild: [
"expression"
],
JSXText: [],
LabeledStatement: [
"label",
"body"
],
Literal: [],
LogicalExpression: [
"left",
"right"
],
MemberExpression: [
"object",
"property"
],
MetaProperty: [
"meta",
"property"
],
MethodDefinition: [
"key",
"value"
],
NewExpression: [
"callee",
"arguments"
],
ObjectExpression: [
"properties"
],
ObjectPattern: [
"properties"
],
PrivateIdentifier: [],
Program: [
"body"
],
Property: [
"key",
"value"
],
PropertyDefinition: [
"key",
"value"
],
RestElement: [
"argument"
],
ReturnStatement: [
"argument"
],
SequenceExpression: [
"expressions"
],
SpreadElement: [
"argument"
],
StaticBlock: [
"body"
],
Super: [],
SwitchCase: [
"test",
"consequent"
],
SwitchStatement: [
"discriminant",
"cases"
],
TaggedTemplateExpression: [
"tag",
"quasi"
],
TemplateElement: [],
TemplateLiteral: [
"quasis",
"expressions"
],
ThisExpression: [],
ThrowStatement: [
"argument"
],
TryStatement: [
"block",
"handler",
"finalizer"
],
UnaryExpression: [
"argument"
],
UpdateExpression: [
"argument"
],
VariableDeclaration: [
"declarations"
],
VariableDeclarator: [
"id",
"init"
],
WhileStatement: [
"test",
"body"
],
WithStatement: [
"object",
"body"
],
YieldExpression: [
"argument"
]
};
// Types.
const NODE_TYPES = Object.keys(KEYS);
// Freeze the keys.
for (const type of NODE_TYPES) {
Object.freeze(KEYS[type]);
}
Object.freeze(KEYS);
export default KEYS;node_modules\eslint-visitor-keys\lib\index.js (Line 51:7 - Line 67:2), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\lib\index.js (Line 49:5 - Line 65:2)
(retv, type)) {
const keys = new Set(additionalKeys[type]);
for (const key of retv[type]) {
keys.add(key);
}
retv[type] = Object.freeze(Array.from(keys));
} else {
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
}
}
return Object.freeze(retv);
}
export { KEYS };node_modules\eslint-visitor-keys\dist\eslint-visitor-keys.cjs (Line 3:1 - Line 357:3), node_modules\eslint-visitor-keys\lib\visitor-keys.js (Line 1:1 - Line 348:4)
/* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
*/
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/* eslint-enable jsdoc/valid-types -- doesn't allow `readonly string[]`. TODO: check why */
/**
* @type {VisitorKeys}
*/
const KEYS = {
ArrayExpression: [
"elements"
],
ArrayPattern: [
"elements"
],
ArrowFunctionExpression: [
"params",
"body"
],
AssignmentExpression: [
"left",
"right"
],
AssignmentPattern: [
"left",
"right"
],
AwaitExpression: [
"argument"
],
BinaryExpression: [
"left",
"right"
],
BlockStatement: [
"body"
],
BreakStatement: [
"label"
],
CallExpression: [
"callee",
"arguments"
],
CatchClause: [
"param",
"body"
],
ChainExpression: [
"expression"
],
ClassBody: [
"body"
],
ClassDeclaration: [
"id",
"superClass",
"body"
],
ClassExpression: [
"id",
"superClass",
"body"
],
ConditionalExpression: [
"test",
"consequent",
"alternate"
],
ContinueStatement: [
"label"
],
DebuggerStatement: [],
DoWhileStatement: [
"body",
"test"
],
EmptyStatement: [],
ExperimentalRestProperty: [
"argument"
],
ExperimentalSpreadProperty: [
"argument"
],
ExportAllDeclaration: [
"exported",
"source",
"attributes"
],
ExportDefaultDeclaration: [
"declaration"
],
ExportNamedDeclaration: [
"declaration",
"specifiers",
"source",
"attributes"
],
ExportSpecifier: [
"local",
"exported"
],
ExpressionStatement: [
"expression"
],
ForInStatement: [
"left",
"right",
"body"
],
ForOfStatement: [
"left",
"right",
"body"
],
ForStatement: [
"init",
"test",
"update",
"body"
],
FunctionDeclaration: [
"id",
"params",
"body"
],
FunctionExpression: [
"id",
"params",
"body"
],
Identifier: [],
IfStatement: [
"test",
"consequent",
"alternate"
],
ImportAttribute: [
"key",
"value"
],
ImportDeclaration: [
"specifiers",
"source",
"attributes"
],
ImportDefaultSpecifier: [
"local"
],
ImportExpression: [
"source",
"options"
],
ImportNamespaceSpecifier: [
"local"
],
ImportSpecifier: [
"imported",
"local"
],
JSXAttribute: [
"name",
"value"
],
JSXClosingElement: [
"name"
],
JSXClosingFragment: [],
JSXElement: [
"openingElement",
"children",
"closingElement"
],
JSXEmptyExpression: [],
JSXExpressionContainer: [
"expression"
],
JSXFragment: [
"openingFragment",
"children",
"closingFragment"
],
JSXIdentifier: [],
JSXMemberExpression: [
"object",
"property"
],
JSXNamespacedName: [
"namespace",
"name"
],
JSXOpeningElement: [
"name",
"attributes"
],
JSXOpeningFragment: [],
JSXSpreadAttribute: [
"argument"
],
JSXSpreadChild: [
"expression"
],
JSXText: [],
LabeledStatement: [
"label",
"body"
],
Literal: [],
LogicalExpression: [
"left",
"right"
],
MemberExpression: [
"object",
"property"
],
MetaProperty: [
"meta",
"property"
],
MethodDefinition: [
"key",
"value"
],
NewExpression: [
"callee",
"arguments"
],
ObjectExpression: [
"properties"
],
ObjectPattern: [
"properties"
],
PrivateIdentifier: [],
Program: [
"body"
],
Property: [
"key",
"value"
],
PropertyDefinition: [
"key",
"value"
],
RestElement: [
"argument"
],
ReturnStatement: [
"argument"
],
SequenceExpression: [
"expressions"
],
SpreadElement: [
"argument"
],
StaticBlock: [
"body"
],
Super: [],
SwitchCase: [
"test",
"consequent"
],
SwitchStatement: [
"discriminant",
"cases"
],
TaggedTemplateExpression: [
"tag",
"quasi"
],
TemplateElement: [],
TemplateLiteral: [
"quasis",
"expressions"
],
ThisExpression: [],
ThrowStatement: [
"argument"
],
TryStatement: [
"block",
"handler",
"finalizer"
],
UnaryExpression: [
"argument"
],
UpdateExpression: [
"argument"
],
VariableDeclaration: [
"declarations"
],
VariableDeclarator: [
"id",
"init"
],
WhileStatement: [
"test",
"body"
],
WithStatement: [
"object",
"body"
],
YieldExpression: [
"argument"
]
};
// Types.
const NODE_TYPES = Object.keys(KEYS);
// Freeze the keys.
for (const type of NODE_TYPES) {
Object.freeze(KEYS[type]);
}
Object.freeze(KEYS);
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
/**
* @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
*/
// List to ignore keys.
const KEY_BLACKLIST = new Set([
"parent",
"leadingComments",
"trailingComments"
]);
/**
* Check whether a given key should be used or not.
* @param {string} key The key to check.
* @returns {boolean} `true` if the key should be used.
*/
function filterKey(key) {
return !KEY_BLACKLIST.has(key) && key[0] !== "_";
}
/* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
*/node_modules\eslint-visitor-keys\dist\eslint-visitor-keys.cjs (Line 373:1 - Line 396:2), node_modules\eslint-visitor-keys\lib\index.js (Line 46:2 - Line 384:2)
function unionWith(additionalKeys) {
const retv = /** @type {{ [type: string]: ReadonlyArray<string> }} */
(Object.assign({}, KEYS));
for (const type of Object.keys(additionalKeys)) {
if (Object.hasOwn(retv, type)) {
const keys = new Set(additionalKeys[type]);
for (const key of retv[type]) {
keys.add(key);
}
retv[type] = Object.freeze(Array.from(keys));
} else {
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
}
}
return Object.freeze(retv);
}
exports.KEYS = KEYS;
exports.getKeys = getKeys;
exports.unionWith = unionWith;node_modules\eslint-scope\lib\scope-manager.js (Line 121:6 - Line 141:2), node_modules\@typescript-eslint\scope-manager\dist\ScopeManager.js (Line 81:4 - Line 97:7)
(node);
if (!scopes || scopes.length === 0) {
return null;
}
// Heuristic selection from all scopes.
// If you would like to get all scopes, please use ScopeManager#acquireAll.
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
}node_modules\eslint-scope\lib\referencer.js (Line 369:2 - Line 380:2), node_modules\eslint-scope\lib\referencer.js (Line 322:2 - Line 333:5)
{
this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
let maybeImplicitGlobal = null;
if (!this.currentScope().isStrict) {
maybeImplicitGlobal = {
pattern,
node
};
}
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !node_modules\eslint-plugin-jsx-a11y\lib\index.js (Line 1:13 - Line 8:36), node_modules\@babel\runtime\helpers\esm\objectSpread2.js (Line 1:22 - Line 14:4)
;
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/* eslint-disable global-require */node_modules\eslint-plugin-jsx-a11y\lib\index.js (Line 124:3 - Line 143:14), node_modules\eslint-plugin-jsx-a11y\lib\index.js (Line 59:3 - Line 78:12)
'jsx-a11y/anchor-has-content': 'error',
'jsx-a11y/anchor-is-valid': 'error',
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
'jsx-a11y/aria-props': 'error',
'jsx-a11y/aria-proptypes': 'error',
'jsx-a11y/aria-role': 'error',
'jsx-a11y/aria-unsupported-elements': 'error',
'jsx-a11y/autocomplete-valid': 'error',
'jsx-a11y/click-events-have-key-events': 'error',
'jsx-a11y/control-has-associated-label': ['off', {
ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
ignoreRoles: ['grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'row', 'tablist', 'toolbar', 'tree', 'treegrid'],
includeRoles: ['alert', 'dialog']
}],
'jsx-a11y/heading-has-content': 'error',
'jsx-a11y/html-has-lang': 'error',
'jsx-a11y/iframe-has-title': 'error',
'jsx-a11y/img-redundant-alt': 'error',
'jsx-a11y/interactive-supports-focus': ['error', {
tabbable: ['button', 'checkbox', 'link', 'progressbar'node_modules\escalade\sync\index.js (Line 4:2 - Line 18:2), node_modules\escalade\sync\index.mjs (Line 4:2 - Line 18:2)
function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = statSync(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = callback(dir, readdirSync(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}node_modules\escalade\dist\index.js (Line 8:2 - Line 22:2), node_modules\escalade\dist\index.mjs (Line 8:2 - Line 22:2)
async function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = await toStats(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = await callback(dir, await toRead(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}node_modules\es-to-primitive\test\es5.js (Line 11:1 - Line 35:10), node_modules\es-to-primitive\test\es6.js (Line 13:1 - Line 37:10)
test('function properties', function (t) {
t.equal(toPrimitive.length, 1, 'length is 1');
t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
t.end();
});
test('primitives', function (t) {
forEach(v.primitives, function (i) {
t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value');
t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value');
t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value');
});
t.end();
});
test('Symbols', { skip: !v.hasSymbols }, function (t) {
forEach(v.symbols, function (sym) {
t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value');
t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value');
t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value');
});
var primitiveSym = Symbol('primitiveSym');
var stringSymnode_modules\es-to-primitive\test\es5.js (Line 40:10 - Line 48:3), node_modules\es-to-primitive\test\es6.js (Line 39:13 - Line 47:6)
));
t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym));
t.end();
});
test('Arrays', function (t) {
var arrays = [[], ['a', 'b'], [1, 2]];
forEach(arrays, function (arr) {
t.oknode_modules\es-to-primitive\test\es5.js (Line 50:34 - Line 58:5), node_modules\es-to-primitive\test\es6.js (Line 49:44 - Line 57:7)
);
});
t.end();
});
test('Dates', function (t) {
var dates = [new Date(), new Date(0), new Date(NaN)];
forEach(dates, function (date) {
t.equal(toPrimitive(date), datenode_modules\es-to-primitive\test\es5.js (Line 60:32 - Line 67:7), node_modules\es-to-primitive\test\es6.js (Line 59:43 - Line 66:7)
);
});
t.end();
});
test('Objects', function (t) {
t.equal(toPrimitive(v.coercibleObject), v.coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf');
t.equal(toPrimitive(v.coercibleObject, Stringnode_modules\es-to-primitive\test\es2015.js (Line 4:12 - Line 140:2), node_modules\es-to-primitive\test\es6.js (Line 4:9 - Line 140:2)
);
var is = require('object-is');
var forEach = require('for-each');
var functionName = require('function.prototype.name');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
/** @typedef {{ toString?: unknown, valueOf?: unknown, [Symbol.toPrimitive]?: unknown }} Coercible */
test('function properties', function (t) {
t.equal(toPrimitive.length, 1, 'length is 1');
t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
t.end();
});
test('primitives', function (t) {
forEach(v.primitives, function (i) {
t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value');
t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value');
t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value');
});
t.end();
});
test('Symbols', { skip: !v.hasSymbols }, function (t) {
forEach(v.symbols, function (sym) {
t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value');
t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value');
t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value');
});
var primitiveSym = Symbol('primitiveSym');
var objectSym = Object(primitiveSym);
t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym));
t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym));
t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym));
t.end();
});
test('Arrays', function (t) {
var arrays = [[], ['a', 'b'], [1, 2]];
forEach(arrays, function (arr) {
t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array');
t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array');
t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array');
});
t.end();
});
test('Dates', function (t) {
var dates = [new Date(), new Date(0), new Date(NaN)];
forEach(dates, function (date) {
t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date');
t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date');
t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date');
});
t.end();
});
test('Objects', function (t) {
t.equal(toPrimitive(v.coercibleObject), v.coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf');
t.equal(toPrimitive(v.coercibleObject, Number), v.coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf');
t.equal(toPrimitive(v.coercibleObject, String), v.coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString');
t.equal(toPrimitive(v.coercibleFnObject), v.coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString');
t.equal(toPrimitive(v.coercibleFnObject, Number), v.coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString');
t.equal(toPrimitive(v.coercibleFnObject, String), v.coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString');
t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString');
t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString');
t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString');
t.equal(toPrimitive(v.toStringOnlyObject), v.toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString');
t.equal(toPrimitive(v.toStringOnlyObject, Number), v.toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString');
t.equal(toPrimitive(v.toStringOnlyObject, String), v.toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString');
t.equal(toPrimitive(v.valueOfOnlyObject), v.valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf');
t.equal(toPrimitive(v.valueOfOnlyObject, Number), v.valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf');
t.equal(toPrimitive(v.valueOfOnlyObject, String), v.valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf');
t.test('Symbol.toPrimitive', { skip: !v.hasSymbols || !Symbol.toPrimitive }, function (st) {
/** @type {Coercible} */
var overriddenObject = { toString: st.fail, valueOf: st.fail };
overriddenObject[Symbol.toPrimitive] = /** @type {(hint: string) => unknown} */ function (hint) {
return String(hint);
};
st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that');
st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that');
st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that');
/** @type {Coercible} */
var nullToPrimitive = { toString: v.coercibleObject.toString, valueOf: v.coercibleObject.valueOf };
nullToPrimitive[Symbol.toPrimitive] = null;
st.equal(toPrimitive(nullToPrimitive), toPrimitive(v.coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it');
st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(v.coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it');
st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(v.coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it');
st.test('exceptions', function (sst) {
/** @type {Coercible} */
var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail };
nonFunctionToPrimitive[Symbol.toPrimitive] = {};
sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws');
/** @type {Coercible} */
var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail };
uncoercibleToPrimitive[Symbol.toPrimitive] = /** @type {(hint: string) => unknown} */ function (hint) {
return { toString: function () { return hint; } };
};
sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws');
/** @type {Coercible} */
var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail };
throwingToPrimitive[Symbol.toPrimitive] = /** @type {(hint: string) => unknown} */ function (hint) {
throw new RangeError(hint);
};
sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws');
sst.end();
});
st.end();
});
t.test('exceptions', function (st) {
st['throws'](toPrimitive.bind(null, v.uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError');
st['throws'](toPrimitive.bind(null, v.uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError');
st['throws'](toPrimitive.bind(null, v.uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError');
st['throws'](toPrimitive.bind(null, v.uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError');
st['throws'](toPrimitive.bind(null, v.uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError');
st['throws'](toPrimitive.bind(null, v.uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError');
st.end();
});
t.end();
});node_modules\es-iterator-helpers\test\Iterator.zip.js (Line 1:1 - Line 13:18), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 1:1 - Line 13:23)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var mockProperty = require('mock-property');
var index = require('../Iterator.zip'node_modules\es-iterator-helpers\test\Iterator.zip.js (Line 39:4 - Line 48:4), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 56:4 - Line 65:9)
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
forEach(v.nonFunctions, function (nonFunction) {
if (nonFunction != null) {
var badIterable = {};
badIterable[Symbol.iterator] = nonFunction;
st['throws'](
function () { zipnode_modules\es-iterator-helpers\test\Iterator.zip.js (Line 68:2 - Line 85:4), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 89:6 - Line 109:9)
], s2t, 'array iterator + array yields combined results');
s2t.end();
});
st.test('observability in a replaced String iterator', function (s2t) {
var originalStringIterator = String.prototype[Symbol.iterator];
var observedType;
s2t.teardown(mockProperty(String.prototype, Symbol.iterator, {
get: function () {
'use strict'; // eslint-disable-line strict, lines-around-directive
observedType = typeof this;
return originalStringIterator;
}
}));
zipnode_modules\es-iterator-helpers\test\Iterator.zip.js (Line 87:4 - Line 97:22), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 111:9 - Line 121:27)
([from(Object(''))]);
s2t.equal(observedType, 'object', 'boxed string -> boxed string in Symbol.iterator getter');
s2t.end();
});
st.end();
});
},
index: function () {
test('Iterator.zip: index'node_modules\es-iterator-helpers\test\Iterator.prototype.take.js (Line 1:1 - Line 14:29), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 14:32)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.take'node_modules\es-iterator-helpers\test\Iterator.prototype.take.js (Line 75:9 - Line 117:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 1:1 - Line 14:29), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 14:32)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.some'node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 51:4 - Line 59:5), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 43:4 - Line 51:8)
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new somenode_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 72:45 - Line 114:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.reduce.js (Line 1:1 - Line 14:31), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 14:32)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.reduce'node_modules\es-iterator-helpers\test\Iterator.prototype.reduce.js (Line 48:7 - Line 59:7), node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 48:5 - Line 51:8)
({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new reducenode_modules\es-iterator-helpers\test\Iterator.prototype.reduce.js (Line 109:4 - Line 151:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.map.js (Line 1:1 - Line 12:11), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 12:8)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var generatorsnode_modules\es-iterator-helpers\test\Iterator.prototype.map.js (Line 86:3 - Line 93:4), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 44:2 - Line 51:8)
);
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new mapnode_modules\es-iterator-helpers\test\Iterator.prototype.map.js (Line 116:2 - Line 137:6), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 79:5)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.equalnode_modules\es-iterator-helpers\test\Iterator.prototype.map.js (Line 139:4 - Line 160:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 79:4 - Line 100:2)
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.forEach.js (Line 48:8 - Line 59:8), node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 48:5 - Line 51:8)
({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new forEachnode_modules\es-iterator-helpers\test\Iterator.prototype.forEach.js (Line 64:8 - Line 72:8), node_modules\es-iterator-helpers\test\Iterator.prototype.reduce.js (Line 64:7 - Line 72:7)
(iterator(), function () {}); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` iterator is not a constructor'
);
testIterator(iterator(), [1, 2, 3], st, 'original');
var results = [];
var ret = forEachnode_modules\es-iterator-helpers\test\Iterator.prototype.forEach.js (Line 90:4 - Line 132:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.flatMap.js (Line 1:1 - Line 14:19), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 14:6)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var StringToCodePointsnode_modules\es-iterator-helpers\test\Iterator.prototype.flatMap.js (Line 50:8 - Line 61:8), node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 48:5 - Line 51:8)
({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new flatMapnode_modules\es-iterator-helpers\test\Iterator.prototype.flatMap.js (Line 193:68 - Line 238:2), node_modules\es-iterator-helpers\test\Iterator.prototype.map.js (Line 113:2 - Line 100:2)
);
s2t.end();
});
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.find.js (Line 1:1 - Line 14:29), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 14:32)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.find'node_modules\es-iterator-helpers\test\Iterator.prototype.find.js (Line 48:5 - Line 59:5), node_modules\es-iterator-helpers\test\Iterator.prototype.some.js (Line 48:5 - Line 51:8)
({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new findnode_modules\es-iterator-helpers\test\Iterator.prototype.find.js (Line 72:46 - Line 114:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 1:1 - Line 12:23), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 12:8)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var hasPropertyDescriptorsnode_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 77:2 - Line 85:7), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 43:4 - Line 51:8)
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new filternode_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 292:2 - Line 334:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.every.js (Line 1:1 - Line 15:30), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 15:31)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var hasPropertyDescriptors = require('has-property-descriptors')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.every'node_modules\es-iterator-helpers\test\Iterator.prototype.every.js (Line 49:6 - Line 71:6), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 49:7 - Line 71:7)
({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('observable lookups', { skip: !hasPropertyDescriptors }, function (st) {
var effects = [];
var obj = {};
Object.defineProperty(obj, 'next', {
configurable: true,
enumerable: true,
get: function next() {
effects.push('get next');
return function () {
return { done: true, value: undefined };
};
}
});
st['throws'](
function () { everynode_modules\es-iterator-helpers\test\Iterator.prototype.every.js (Line 71:6 - Line 85:6), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 71:7 - Line 51:8)
(obj, null); },
TypeError
);
st.deepEqual(effects, []);
st.end();
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new everynode_modules\es-iterator-helpers\test\Iterator.prototype.every.js (Line 98:47 - Line 140:2), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 58:10 - Line 100:2)
);
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 1:1 - Line 15:29), node_modules\es-iterator-helpers\test\Iterator.prototype.toArray.js (Line 1:1 - Line 15:31)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var hasPropertyDescriptors = require('has-property-descriptors')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.drop'node_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 44:4 - Line 61:5), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 52:4 - Line 70:3)
);
});
t.test('observable lookups', { skip: !hasPropertyDescriptors }, function (st) {
var effects = [];
var obj = {};
Object.defineProperty(obj, 'next', {
configurable: true,
enumerable: true,
get: function next() {
effects.push('get next');
return function () {
return { done: true, value: undefined };
};
}
});
dropnode_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 73:3 - Line 81:5), node_modules\es-iterator-helpers\test\Iterator.prototype.take.js (Line 46:3 - Line 54:5)
});
var arr = [1, 2, 3];
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { dropnode_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 123:2 - Line 138:16), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 215:2 - Line 230:12)
);
iter.next();
st['throws'](
function () { iter['return'](); },
SyntaxError,
'gets the `return` method, whose getter throws'
);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/drop/return-is-forwarded', function (st) {
var returnCount = 0;
var makeBadIteratornode_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 182:24 - Line 202:5), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 246:24 - Line 266:7)
);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/drop/return-is-not-forwarded-after-exhaustion', { skip: !hasPropertyDescriptors }, function (st) {
var makeBadIterator = function makeBadIterator() {
return {
next: function next() {
return {
done: true,
value: undefined
};
},
'return': function () {
throw new SyntaxError();
}
};
};
var iter1 = dropnode_modules\es-iterator-helpers\test\Iterator.prototype.drop.js (Line 252:6 - Line 294:2), node_modules\es-iterator-helpers\test\Iterator.prototype.filter.js (Line 292:6 - Line 100:2)
['return']();
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};node_modules\es-iterator-helpers\test\Iterator.from.js (Line 7:12 - Line 14:19), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 6:23 - Line 13:23)
)();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var mockProperty = require('mock-property');
var index = require('../Iterator.from'node_modules\es-iterator-helpers\test\Iterator.from.js (Line 110:5 - Line 127:5), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 92:5 - Line 109:9)
);
s2t.end();
});
st.test('observability in a replaced String iterator', function (s2t) {
var originalStringIterator = String.prototype[Symbol.iterator];
var observedType;
s2t.teardown(mockProperty(String.prototype, Symbol.iterator, {
get: function () {
'use strict'; // eslint-disable-line strict, lines-around-directive
observedType = typeof this;
return originalStringIterator;
}
}));
fromnode_modules\es-iterator-helpers\test\Iterator.concat.js (Line 1:1 - Line 12:23), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 1:1 - Line 13:6)
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var mockProperty = require('mock-property');
var hasPropertyDescriptorsnode_modules\es-iterator-helpers\test\Iterator.concat.js (Line 43:33 - Line 50:7), node_modules\es-iterator-helpers\test\Iterator.from.js (Line 62:2 - Line 69:5)
);
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
forEach(v.nonFunctions, function (nonFunction) {
var badIterable = {};
badIterable[Symbol.iterator] = nonFunction;
st['throws'](
function () { concatnode_modules\es-iterator-helpers\test\Iterator.concat.js (Line 76:2 - Line 81:7), node_modules\es-iterator-helpers\test\Iterator.zip.js (Line 63:2 - Line 68:4)
]);
st.equal(typeof arrayIt.next, 'function', 'has a `next` function');
st.test('real iterators', { skip: !hasSymbols }, function (s2t) {
var iter = [1, 2][Symbol.iterator]();
testIterator(concatnode_modules\es-iterator-helpers\test\Iterator.concat.js (Line 81:2 - Line 98:7), node_modules\es-iterator-helpers\test\Iterator.zipKeyed.js (Line 89:6 - Line 109:9)
], s2t, 'array iterator + array yields combined results');
s2t.end();
});
st.test('observability in a replaced String iterator', function (s2t) {
var originalStringIterator = String.prototype[Symbol.iterator];
var observedType;
s2t.teardown(mockProperty(String.prototype, Symbol.iterator, {
get: function () {
'use strict'; // eslint-disable-line strict, lines-around-directive
observedType = typeof this;
return originalStringIterator;
}
}));
concatnode_modules\es-iterator-helpers\test\Iterator.concat.js (Line 366:8 - Line 390:61), node_modules\es-iterator-helpers\test\Iterator.concat.js (Line 304:7 - Line 328:82)
, {
get: function () {
throw new EvalError();
}
});
return result;
},
'return': function () {
throw new Error();
}
};
var iterable = {};
iterable[Symbol.iterator] = function () {
return throwingIterator;
};
var iterator = concat(iterable);
s2t['throws'](function () { iterator.next(); }, EvalError);
s2t.end();
});
st.test('test262: test/built-ins/Iterator/concat/next-method-throws'node_modules\es-iterator-helpers\test\Iterator.concat.js (Line 393:10 - Line 409:83), node_modules\es-iterator-helpers\test\Iterator.concat.js (Line 312:6 - Line 328:82)
();
}
};
var iterable = {};
iterable[Symbol.iterator] = function () {
return throwingIterator;
};
var iterator = concat(iterable);
s2t['throws'](function () { iterator.next(); }, EvalError);
s2t.end();
});
st.test('test262: test/built-ins/Iterator/concat/return-is-not-forwarded-after-exhaustion'node_modules\es-iterator-helpers\test\Iterator.concat.js (Line 440:7 - Line 453:2), node_modules\es-iterator-helpers\test\Iterator.concat.js (Line 415:7 - Line 428:2)
};
},
'return': function () {
throw new EvalError();
}
};
var iterable = {};
iterable[Symbol.iterator] = function () {
return testIterator1;
};
var iterator = concat(iterable);
iterator[node_modules\es-iterator-helpers\test\index.js (Line 1:13 - Line 13:8), node_modules\es-iterator-helpers\test\shimmed.js (Line 3:2 - Line 15:5)
;
var test = require('tape');
var forEach = require('for-each');
var shims = require('../');
forEach(shims, function (shim) {
var shimTests;
try {
shimTests = require('./' + shim); // eslint-disable-line global-require
} catch (e) {
consolenode_modules\es-iterator-helpers\test\implementation.js (Line 1:1 - Line 13:19), node_modules\es-iterator-helpers\test\index.js (Line 1:1 - Line 15:12)
'use strict';
var test = require('tape');
var forEach = require('for-each');
var shims = require('../');
forEach(shims, function (shim) {
var shimTests;
try {
shimTests = require('./' + shim); // eslint-disable-line global-require
} catch (e) {
test(shim + ': implementation'node_modules\es-iterator-helpers\Iterator.zip\implementation.js (Line 18:4 - Line 41:14), node_modules\es-iterator-helpers\Iterator.zipKeyed\implementation.js (Line 25:9 - Line 47:10)
) {
throw new $TypeError('`Iterator.zip` is not a constructor');
}
if (Type(iterables) !== 'Object') {
throw new $TypeError('`iterables` must be an Object'); // step 1
}
var options = GetOptionsObject(arguments.length > 1 ? arguments[1] : undefined); // step 2
var mode = Get(options, 'mode'); // step 3
if (typeof mode === 'undefined') {
mode = 'shortest'; // step 4
}
if (mode !== 'shortest' && mode !== 'longest' && mode !== 'strict') {
throw new $TypeError('`mode` must be one of "shortest", "longest", or "strict"'); // step 5
}
var paddingOption; // step 6
if (mode === 'longest') {
paddingOptionnode_modules\es-iterator-helpers\Iterator.prototype.take\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.some\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.reduce\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.reduce\implementation.js (Line 1:1 - Line 10:16), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 1:1 - Line 10:17)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletionnode_modules\es-iterator-helpers\Iterator.prototype.map\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 7:35 - Line 15:4), node_modules\es-iterator-helpers\Iterator.prototype.reduce\implementation.js (Line 5:24 - Line 13:7)
);
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var Type = require('es-abstract/2024/Type');
varnode_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 66:3 - Line 76:2), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 74:3 - Line 84:2)
// }
};
SLOT.set(closure, '[[Sentinel]]', sentinel); // for the userland implementation
SLOT.set(closure, '[[CloseIfAbrupt]]', closeIfAbrupt); // for the userland implementation
var result = CreateIteratorFromClosure(closure, 'Iterator Helper', iterHelperProto, ['[[UnderlyingIterators]]']); // step 7
SLOT.set(result, '[[UnderlyingIterators]]', [iterated]); // step 8
return result; // step 9
};node_modules\es-iterator-helpers\Iterator.prototype.forEach\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.forEach\implementation.js (Line 1:1 - Line 13:8), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 1:1 - Line 13:7)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var Type = require('es-abstract/2024/Type');
module.exports = function forEachnode_modules\es-iterator-helpers\Iterator.prototype.flatMap\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.flatMap\implementation.js (Line 9:32 - Line 20:8), node_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 8:27 - Line 19:4)
);
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var Type = require('es-abstract/2024/Type');
var iterHelperProto = require('../IteratorHelperPrototype');
var SLOT = require('internal-slot');
module.exports = function flatMapnode_modules\es-iterator-helpers\Iterator.prototype.flatMap\implementation.js (Line 22:33 - Line 36:9), node_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 21:29 - Line 35:14)
);
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(mapper)) {
throw new $TypeError('`mapper` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var sentinelnode_modules\es-iterator-helpers\Iterator.prototype.flatMap\implementation.js (Line 109:2 - Line 118:2), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 75:2 - Line 84:2)
};
SLOT.set(closure, '[[Sentinel]]', sentinel); // for the userland implementation
SLOT.set(closure, '[[CloseIfAbrupt]]', closeIfAbrupt); // for the userland implementation
var result = CreateIteratorFromClosure(closure, 'Iterator Helper', iterHelperProto, ['[[UnderlyingIterators]]']); // step 7
SLOT.set(result, '[[UnderlyingIterators]]', [iterated]); // step 8
return result; // step 9
};node_modules\es-iterator-helpers\Iterator.prototype.find\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.find\implementation.js (Line 1:1 - Line 15:5), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 1:1 - Line 15:5)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var NormalCompletion = require('es-abstract/2024/NormalCompletion');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var ToBoolean = require('es-abstract/2024/ToBoolean');
var Type = require('es-abstract/2024/Type');
module.exports = function findnode_modules\es-iterator-helpers\Iterator.prototype.find\implementation.js (Line 17:30 - Line 38:5), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 17:30 - Line 37:6)
);
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(predicate)) {
throw new $TypeError('`predicate` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var counter = 0; // step 5
// eslint-disable-next-line no-constant-condition
while (true) { // step 6
var value = IteratorStepValue(iterated); // step 6.a
if (iterated['[[Done]]']) {
return voidnode_modules\es-iterator-helpers\Iterator.prototype.find\implementation.js (Line 38:10 - Line 55:6), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 37:6 - Line 54:5)
; // step 6.b
}
var result;
try {
result = Call(predicate, void undefined, [value, counter]); // step 6.c
} catch (e) {
// close iterator // step 6.d
IteratorClose(
iterated,
ThrowCompletion(e)
);
} finally {
counter += 1; // step 6.f
}
if (ToBoolean(result)) {
return IteratorClose(
iterated,
NormalCompletion(valuenode_modules\es-iterator-helpers\Iterator.prototype.filter\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.filter\implementation.js (Line 1:1 - Line 13:10), node_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 1:1 - Line 13:5)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var CompletionRecord = require('es-abstract/2024/CompletionRecord');
var CreateIteratorFromClosure = require('../aos/CreateIteratorFromClosure');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var ToBooleannode_modules\es-iterator-helpers\Iterator.prototype.filter\implementation.js (Line 22:32 - Line 36:14), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 17:30 - Line 31:8)
);
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(predicate)) {
throw new $TypeError('`predicate` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var closeIfAbruptnode_modules\es-iterator-helpers\Iterator.prototype.filter\implementation.js (Line 31:33 - Line 49:50), node_modules\es-iterator-helpers\Iterator.prototype.map\implementation.js (Line 30:30 - Line 48:30)
); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var closeIfAbrupt = function (abruptCompletion) {
if (!(abruptCompletion instanceof CompletionRecord)) {
throw new $TypeError('`abruptCompletion` must be a Completion Record');
}
IteratorClose(
iterated,
abruptCompletion
);
};
var sentinel = {};
var counter = 0; // step 6.a
var closure = function () {
// eslint-disable-next-line no-constant-conditionnode_modules\es-iterator-helpers\Iterator.prototype.filter\implementation.js (Line 71:2 - Line 80:2), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 75:2 - Line 84:2)
};
SLOT.set(closure, '[[Sentinel]]', sentinel); // for the userland implementation
SLOT.set(closure, '[[CloseIfAbrupt]]', closeIfAbrupt); // for the userland implementation
var result = CreateIteratorFromClosure(closure, 'Iterator Helper', iterHelperProto, ['[[UnderlyingIterators]]']); // step 7
SLOT.set(result, '[[UnderlyingIterators]]', [iterated]); // step 8
return result; // step 9
};node_modules\es-iterator-helpers\Iterator.prototype.every\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.every\implementation.js (Line 1:1 - Line 15:6), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 1:1 - Line 15:5)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var NormalCompletion = require('es-abstract/2024/NormalCompletion');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var ToBoolean = require('es-abstract/2024/ToBoolean');
var Type = require('es-abstract/2024/Type');
module.exports = function everynode_modules\es-iterator-helpers\Iterator.prototype.every\implementation.js (Line 17:31 - Line 37:5), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 17:30 - Line 37:6)
);
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(predicate)) {
throw new $TypeError('`predicate` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var counter = 0; // step 5
// eslint-disable-next-line no-constant-condition
while (true) { // step 6
var value = IteratorStepValue(iterated); // step 6.a
if (iterated['[[Done]]']) {
return truenode_modules\es-iterator-helpers\Iterator.prototype.every\implementation.js (Line 37:5 - Line 51:2), node_modules\es-iterator-helpers\Iterator.prototype.some\implementation.js (Line 37:6 - Line 51:10)
; // step 6.b
}
var result;
try {
result = Call(predicate, void undefined, [value, counter]); // step 6.c
} catch (e) {
// close iterator // step 6.d
IteratorClose(
iterated,
ThrowCompletion(e)
);
} finally {
counter += 1; // step 6.f
}
if (!node_modules\es-iterator-helpers\Iterator.prototype.drop\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-iterator-helpers\Iterator.prototype.drop\implementation.js (Line 1:1 - Line 10:13), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 1:1 - Line 10:18)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var CompletionRecord = require('es-abstract/2024/CompletionRecord');
var CreateIteratorFromClosure = require('../aos/CreateIteratorFromClosure');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepnode_modules\es-iterator-helpers\Iterator.prototype.drop\implementation.js (Line 12:35 - Line 23:5), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 11:36 - Line 22:5)
);
var ToIntegerOrInfinity = require('es-abstract/2024/ToIntegerOrInfinity');
var ToNumber = require('es-abstract/2024/ToNumber');
var Type = require('es-abstract/2024/Type');
var iterHelperProto = require('../IteratorHelperPrototype');
var isNaN = require('es-abstract/helpers/isNaN');
var SLOT = require('internal-slot');
module.exports = function dropnode_modules\es-iterator-helpers\Iterator.prototype.drop\implementation.js (Line 25:30 - Line 40:10), node_modules\es-iterator-helpers\Iterator.prototype.take\implementation.js (Line 24:30 - Line 39:10)
);
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
var numLimit = ToNumber(limit); // step 2
if (isNaN(numLimit)) {
throw new $RangeError('`limit` must be a non-NaN number'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var integerLimit = ToIntegerOrInfinity(numLimit); // step 4node_modules\es-iterator-helpers\Iterator.from\shim.js (Line 1:1 - Line 13:5), node_modules\es-iterator-helpers\Iterator.prototype\shim.js (Line 1:1 - Line 13:10)
'use strict';
var getPolyfill = require('./polyfill');
var define = require('define-properties');
var getIteratorPolyfill = require('../Iterator/polyfill');
module.exports = function shimIteratorFrom() {
var $Iterator = getIteratorPolyfill();
var polyfill = getPolyfill();
define(
$Iterator,
{ fromnode_modules\es-iterator-helpers\Iterator.concat\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.from\index.js (Line 1:1 - Line 18:2)
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var bound = callBind(getPolyfill(), null);
define(bound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = bound;node_modules\es-iterator-helpers\Iterator\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill());
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\es-abstract\helpers\valueToFloat16Bytes.js (Line 1:1 - Line 11:17), node_modules\es-abstract\helpers\valueToFloat32Bytes.js (Line 1:1 - Line 11:17)
'use strict';
var $abs = require('math-intrinsics/abs');
var $floor = require('math-intrinsics/floor');
var $pow = require('math-intrinsics/pow');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var maxFiniteFloat16node_modules\es-abstract\2025\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2025\TypedArrayCreateSameType.js (Line 16:25 - Line 29:12), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 17:24 - Line 30:19)
(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var constructornode_modules\es-abstract\2025\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2025\ToBigInt64.js (Line 1:1 - Line 13:116), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 14:116)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGERnode_modules\es-abstract\2025\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2025\SetTypedArrayFromArrayLike.js (Line 21:27 - Line 31:3), node_modules\es-abstract\2025\SetTypedArrayFromTypedArray.js (Line 29:28 - Line 39:4)
(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: `target` must be a Typed Array');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: `targetOffset` must be a non-negative integer or +Infinity');
}
ifnode_modules\es-abstract\2025\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2025\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2025\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2025\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2025\MakeDay.js (Line 1:1 - Line 14:20), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 14:10)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToIntegerOrInfinitynode_modules\es-abstract\2025\MakeDay.js (Line 14:24 - Line 23:20), node_modules\es-abstract\5\MakeDay.js (Line 14:14 - Line 23:10)
);
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToIntegerOrInfinitynode_modules\es-abstract\2025\MakeDay.js (Line 30:2 - Line 36:2), node_modules\es-abstract\5\MakeDay.js (Line 27:2 - Line 33:2)
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2025\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2025\IsLessThan.js (Line 22:11 - Line 36:3), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 18:29 - Line 31:4)
(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
ifnode_modules\es-abstract\2025\IsGenericDescriptor.js (Line 12:1 - Line 26:2), node_modules\es-abstract\5\IsGenericDescriptor.js (Line 12:1 - Line 26:2)
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2025\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2025\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2025\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2025\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2025\GetMatchIndexPair.js (Line 9:18 - Line 23:2), node_modules\es-abstract\2025\GetMatchString.js (Line 11:15 - Line 25:10)
(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return [node_modules\es-abstract\2025\GetIteratorFlattenable.js (Line 28:2 - Line 44:2), node_modules\es-iterator-helpers\aos\GetIteratorFlattenable.js (Line 30:2 - Line 46:5)
method = getIteratorMethod(
{
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod,
IsArray: IsArray
},
obj
);
var iterator;
if (typeof method === 'undefined') { // step 3
iterator = obj; // step 3.a
} else { // step 4
iterator = Call(method, obj); // step 4.a
}
if (!node_modules\es-abstract\2025\GeneratorValidate.js (Line 9:1 - Line 19:12), node_modules\es-iterator-helpers\aos\GeneratorValidate.js (Line 7:1 - Line 17:12)
module.exports = function GeneratorValidate(generator, generatorBrand) {
SLOT.assert(generator, '[[GeneratorState]]'); // step 1
SLOT.assert(generator, '[[GeneratorBrand]]'); // step 2
var brand = SLOT.get(generator, '[[GeneratorBrand]]');
if (brand !== generatorBrand) {
throw new $TypeError('Assertion failed: generator brand is unexpected: ' + brand);
}
SLOT.assert(generator, '[[GeneratorContext]]'); // step 4
var state = SLOT.get(generator, '[[GeneratorState]]'); // step 5
if (state === 'EXECUTING'node_modules\es-abstract\2025\GeneratorStart.js (Line 13:1 - Line 25:2), node_modules\es-iterator-helpers\aos\GeneratorStart.js (Line 11:1 - Line 23:5)
module.exports = function GeneratorStart(generator, closure) {
SLOT.assert(generator, '[[GeneratorState]]');
SLOT.assert(generator, '[[GeneratorContext]]');
SLOT.assert(generator, '[[GeneratorBrand]]');
SLOT.assert(generator, '[[Sentinel]]'); // our userland slot
SLOT.assert(generator, '[[CloseIfAbrupt]]'); // our second userland slot
if (!IsCallable(closure) || closure.length !== 0) {
throw new $TypeError('`closure` must be a function that takes no arguments');
}
var sentinel = SLOT.get(closure, '[[Sentinel]]');
if (!node_modules\es-abstract\2025\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2025\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2025\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2025\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2025\CreateIteratorFromClosure.js (Line 33:2 - Line 39:19), node_modules\es-iterator-helpers\aos\CreateIteratorFromClosure.js (Line 28:2 - Line 34:6)
if (arguments.length > 3) {
if (!IsArray(extraSlots) || !every(extraSlots, isString)) {
throw new $TypeError('`extraSlots` must be a List of String internal slot names');
}
}
var internalSlotsList = safeConcat(extraSlots, ['[[GeneratorContext]]', '[[GeneratorBrand]]', '[[GeneratorState]]']); // step 3
var generator = OrdinaryObjectCreate(generatorPrototypenode_modules\es-abstract\2025\CreateIteratorFromClosure.js (Line 43:2 - Line 48:11), node_modules\es-iterator-helpers\aos\CreateIteratorFromClosure.js (Line 37:2 - Line 42:11)
SLOT.assert(closure, '[[Sentinel]]'); // our userland slot
SLOT.set(generator, '[[Sentinel]]', SLOT.get(closure, '[[Sentinel]]')); // our userland slot
SLOT.assert(closure, '[[CloseIfAbrupt]]'); // our second userland slot
SLOT.set(generator, '[[CloseIfAbrupt]]', SLOT.get(closure, '[[CloseIfAbrupt]]')); // our second userland slot
GeneratorStart(generator, closure); // step 14node_modules\es-abstract\2025\CreateDataProperty.js (Line 11:19 - Line 20:5), node_modules\es-abstract\2025\CreateNonEnumerableDataPropertyOrThrow.js (Line 12:39 - Line 23:6)
(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': truenode_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 80:8 - Line 95:12), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 45:9 - Line 59:15)
: function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethodnode_modules\es-abstract\2024\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2024\WordCharacters.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 47:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var isRegExpRecord = require('../helpers/records/regexp-record');
var OwnPropertyKeys = require('own-keys');
var basicWordChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(rer) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
var extraWordChars = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(basicWordChars, c) === -1 // c not in A
&& $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A
) {
extraWordChars += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(basicWordChars, c) === -1 // c not in A
&& $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A
) {
extraWordChars += caseFolding.S[c]; // step 3
}
});
if ((!rer['[[Unicode]]'] || !rer['[[IgnoreCase]]']) && extraWordChars.length > 0) {
throw new $TypeError('Assertion failed: `extraWordChars` must be empty when `rer.[[IgnoreCase]]` and `rer.[[Unicode]]` are not both true'); // step 3
}
return basicWordChars + extraWordChars; // step 4
};node_modules\es-abstract\2024\WeakRefDeref.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\WeakRefDeref.js (Line 1:1 - Line 23:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var $deref = callBound('WeakRef.prototype.deref', true);
var isWeakRef = require('is-weakref');
var AddToKeptObjects = require('./AddToKeptObjects');
// https://262.ecma-international.org/12.0/#sec-weakrefderef
module.exports = function WeakRefDeref(weakRef) {
if (!isWeakRef(weakRef)) {
throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef');
}
var target = $deref(weakRef);
if (target) {
AddToKeptObjects(target);
}
return target;
};node_modules\es-abstract\2024\ValidateTypedArray.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\ValidateTypedArray.js (Line 1:1 - Line 32:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var isTypedArray = require('is-typed-array');
// https://262.ecma-international.org/15.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O, order) {
if (order !== 'SEQ-CST' && order !== 'UNORDERED') {
throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~');
}
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 1 - 2
}
var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, order); // step 3
if (IsTypedArrayOutOfBounds(taRecord)) {
throw new $TypeError('`O` must be in-bounds and backed by a non-detached buffer'); // step 4
}
return taRecord; // step 5
};node_modules\es-abstract\2024\ValidateIntegerTypedArray.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\ValidateIntegerTypedArray.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var TypedArrayElementType = require('./TypedArrayElementType');
var ValidateTypedArray = require('./ValidateTypedArray');
// https://262.ecma-international.org/15.0/#sec-validateintegertypedarray
module.exports = function ValidateIntegerTypedArray(typedArray, waitable) {
if (typeof waitable !== 'boolean') {
throw new $TypeError('Assertion failed: `waitable` must be a Boolean');
}
var taRecord = ValidateTypedArray(typedArray, 'UNORDERED'); // step 1
// 2. NOTE: Bounds checking is not a synchronizing operation when typedArray's backing buffer is a growable SharedArrayBuffer.
var type = TypedArrayElementType(typedArray); // step 4.a
if (waitable) { // step 3
if (type !== 'INT32' && type !== 'BIGINT64') {
throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a
}
} else if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { // step 4
throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 4.b
}
return taRecord; // step 5
};node_modules\es-abstract\2024\ValidateAtomicAccessOnIntegerTypedArray.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ValidateAtomicAccessOnIntegerTypedArray.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var ValidateAtomicAccess = require('./ValidateAtomicAccess');
var ValidateIntegerTypedArray = require('./ValidateIntegerTypedArray');
// https://262.ecma-international.org/15.0/#sec-availablenamedtimezoneidentifiers
module.exports = function ValidateAtomicAccessOnIntegerTypedArray(typedArray, requestIndex) {
var waitable = arguments.length > 2 ? arguments[2] : false; // step 1
if (typeof waitable !== 'boolean') {
throw new $TypeError('waitable must be a boolean');
}
var taRecord = ValidateIntegerTypedArray(typedArray, waitable); // step 2
return ValidateAtomicAccess(taRecord, requestIndex); // step 3
};node_modules\es-abstract\2024\ValidateAtomicAccess.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\ValidateAtomicAccess.js (Line 1:1 - Line 43:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayLength = require('./TypedArrayLength');
var isTypedArrayWithBufferWitnessRecord = require('../helpers/records/typed-array-with-buffer-witness-record');
var typedArrayByteOffset = require('typed-array-byte-offset');
// https://262.ecma-international.org/15.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(taRecord, requestIndex) {
if (!isTypedArrayWithBufferWitnessRecord(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record');
}
var length = TypedArrayLength(taRecord); // step 1
var accessIndex = ToIndex(requestIndex); // step 2
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 4
}
var typedArray = taRecord['[[Object]]']; // step 5
var elementSize = TypedArrayElementSize(typedArray); // step 6
var offset = typedArrayByteOffset(typedArray); // step 7
return (accessIndex * elementSize) + offset; // step 8
};node_modules\es-abstract\2024\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2), node_modules\es-abstract\2025\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor
// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof current === 'undefined') { // step 2
if (!extensible) {
return false; // step 2.a
}
if (typeof O === 'undefined') {
return true; // step 2.b
}
if (IsAccessorDescriptor(Desc)) { // step 2.c
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
// step 2.d
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!Desc['[[Configurable]]'],
'[[Enumerable]]': !!Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': !!Desc['[[Writable]]']
}
);
}
// 3. Assert: current is a fully populated Property Descriptor.
if (
!isFullyPopulatedPropertyDescriptor(
{
IsAccessorDescriptor: IsAccessorDescriptor,
IsDataDescriptor: IsDataDescriptor
},
current
)
) {
throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor');
}
// 4. If every field in Desc is absent, return true.
// this can't really match the assertion that it's a Property Descriptor in our JS implementation
// 5. If current.[[Configurable]] is false, then
if (!current['[[Configurable]]']) {
if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) {
// step 5.a
return false;
}
if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) {
// step 5.b
return false;
}
if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) {
// step 5.c
return false;
}
if (IsAccessorDescriptor(current)) { // step 5.d
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
} else if (!current['[[Writable]]']) { // step 5.e
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
}
}
// 6. If O is not undefined, then
if (typeof O !== 'undefined') {
var configurable;
var enumerable;
if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'],
'[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]']
}
);
} else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) {
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'],
'[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]']
}
);
}
// For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true; // step 7
};node_modules\es-abstract\2024\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2024\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-utf16encoding
module.exports = function UTF16EncodeCodePoint(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2024\UnicodeEscape.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UnicodeEscape.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/11.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start');
};node_modules\es-abstract\2024\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreateFromConstructor = require('./TypedArrayCreateFromConstructor');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/15.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreateFromConstructor(constructor, argumentList); // step 4
};node_modules\es-abstract\2024\TypedArraySetElement.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\TypedArraySetElement.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
// http://www.ecma-international.org/ecma-262/15.0/#sec-typedarraysetelement
module.exports = function TypedArraySetElement(O, index, value) {
var which = whichTypedArray(O);
if (!which) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
var contentType = which === 'BigInt64Array' || which === 'BigUint64Array' ? 'BIGINT' : 'NUMBER';
var numValue = contentType === 'BIGINT' ? ToBigInt(value) : ToNumber(value); // steps 1 - 2
if (IsValidIntegerIndex(O, index)) { // step 3
var offset = typedArrayByteOffset(O); // step 3.a
var elementSize = TypedArrayElementSize(O); // step 3.b
var byteIndexInBuffer = (index * elementSize) + offset; // step 3.c
var elementType = TypedArrayElementType(O); // step 3.d
SetValueInBuffer(typedArrayBuffer(O), byteIndexInBuffer, elementType, numValue, true, 'UNORDERED'); // step 3.e
}
};node_modules\es-abstract\2024\TypedArrayLength.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2025\TypedArrayLength.js (Line 1:1 - Line 51:2)
'use strict';
var $TypeError = require('es-errors/type');
var floor = require('./floor');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var isTypedArrayWithBufferWitnessRecord = require('../helpers/records/typed-array-with-buffer-witness-record');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
// https://www.ecma-international.org/ecma-262/15.0/#sec-typedarraylength
module.exports = function TypedArrayLength(taRecord) {
if (!isTypedArrayWithBufferWitnessRecord(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record');
}
if (IsTypedArrayOutOfBounds(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` is out of bounds'); // step 1
}
var O = taRecord['[[Object]]']; // step 2
var isFixed = IsFixedLengthArrayBuffer(typedArrayBuffer(O));
var length = isFixed ? typedArrayLength(O) : 'AUTO';
if (length !== 'AUTO') {
return length; // step 3
}
if (isFixed) {
throw new $TypeError('Assertion failed: array buffer is not fixed length'); // step 4
}
var byteOffset = typedArrayByteOffset(O); // step 5
var elementSize = TypedArrayElementSize(O); // step 6
var byteLength = taRecord['[[CachedBufferByteLength]]']; // step 7
if (byteLength === 'DETACHED') {
throw new $TypeError('Assertion failed: typed array is detached'); // step 8
}
return floor((byteLength - byteOffset) / elementSize); // step 9
};node_modules\es-abstract\2024\TypedArrayGetElement.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArrayGetElement.js (Line 1:1 - Line 37:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
// https://262.ecma-international.org/15.0/#sec-typedarraygetelement
module.exports = function TypedArrayGetElement(O, index) {
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray instance');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
if (!IsValidIntegerIndex(O, index)) {
return undefined; // step 1
}
var offset = typedArrayByteOffset(O); // step 2
var elementSize = TypedArrayElementSize(O); // step 3
var byteIndexInBuffer = (index * elementSize) + offset; // step 4
var elementType = TypedArrayElementType(O); // step 5
return GetValueFromBuffer(typedArrayBuffer(O), byteIndexInBuffer, elementType, true, 'UNORDERED'); // step 6
};node_modules\es-abstract\2024\TypedArrayElementType.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementType.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementType(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var result = tableTAO.name['$' + type];
if (typeof result !== 'string') {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return result;
};node_modules\es-abstract\2024\TypedArrayElementSize.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementSize.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementSize(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var size = tableTAO.size['$' + tableTAO.name['$' + type]];
if (!isInteger(size) || size < 0) {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return size;
};node_modules\es-abstract\2024\TypedArrayCreateSameType.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2025\TypedArrayCreateSameType.js (Line 1:1 - Line 35:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var TypedArrayCreateFromConstructor = require('./TypedArrayCreateFromConstructor');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/15.0/#sec-typedarray-create-same-type
module.exports = function TypedArrayCreateSameType(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var constructor = getConstructor(kind); // step 2
if (typeof constructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
return TypedArrayCreateFromConstructor(constructor, argumentList); // steps 3 - 6
};node_modules\es-abstract\2024\TypedArrayCreateFromConstructor.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\TypedArrayCreateFromConstructor.js (Line 1:1 - Line 52:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var TypedArrayLength = require('./TypedArrayLength');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
// https://262.ecma-international.org/15.0/#typedarraycreatefromconstructor
module.exports = function TypedArrayCreateFromConstructor(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
var taRecord = ValidateTypedArray(newTypedArray, 'SEQ-CST'); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (IsTypedArrayOutOfBounds(taRecord)) {
throw new $TypeError('new Typed Array is out of bounds'); // step 3.a
}
var length = TypedArrayLength(taRecord); // step 3.b
if (length < argumentList[0]) {
throw new $TypeError('`argumentList[0]` must be <= `newTypedArray.length`'); // step 3.c
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2024\TypedArrayByteLength.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\TypedArrayByteLength.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayLength = require('./TypedArrayLength');
var isTypedArrayWithBufferWitnessRecord = require('../helpers/records/typed-array-with-buffer-witness-record');
var typedArrayByffer = require('typed-array-buffer');
var typedArrayByteLength = require('typed-array-byte-length');
// https://262.ecma-international.org/15.0/#sec-typedarraybytelength
module.exports = function TypedArrayByteLength(taRecord) {
if (!isTypedArrayWithBufferWitnessRecord(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record');
}
if (IsTypedArrayOutOfBounds(taRecord)) {
return 0; // step 1
}
var length = TypedArrayLength(taRecord); // step 2
if (length === 0) {
return 0; // step 3
}
var O = taRecord['[[Object]]']; // step 4
var isFixed = IsFixedLengthArrayBuffer(typedArrayByffer(O));
var byteLength = isFixed ? typedArrayByteLength(O) : 'AUTO';
if (byteLength !== 'AUTO') {
return byteLength; // step 5
}
var elementSize = TypedArrayElementSize(O); // step 6
return length * elementSize; // step 7
};node_modules\es-abstract\2024\truncate.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\truncate.js (Line 1:1 - Line 15:2)
'use strict';
var floor = require('./floor');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/14.0/#eqn-truncate
module.exports = function truncate(x) {
if (typeof x !== 'number' && typeof x !== 'bigint') {
throw new $TypeError('argument must be a Number or a BigInt');
}
var result = x < 0 ? -floor(-x) : floor(x);
return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2024\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2024\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $RangeError = require('es-errors/range');
var isInteger = require('math-intrinsics/isInteger');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring
module.exports = function ToZeroPaddedDecimalString(n, minLength) {
if (!isInteger(n) || n < 0) {
throw new $RangeError('Assertion failed: `q` must be a non-negative integer');
}
var S = $String(n);
return StringPad(S, minLength, '0', 'start');
};node_modules\es-abstract\2024\ToUint8Clamp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\ToUint8Clamp.js (Line 1:1 - Line 26:2)
'use strict';
var clamp = require('./clamp');
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/15.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument); // step 1
if ($isNaN(number)) { return 0; } // step 2
var clamped = clamp(number, 0, 255); // step 4
var f = floor(clamped); // step 5
if (clamped < (f + 0.5)) { return f; } // step 6
if (clamped > (f + 0.5)) { return f + 1; } // step 7
return f % 2 === 0 ? f : f + 1; // step 8
};node_modules\es-abstract\2024\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
// https://262.ecma-international.org/14.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int8bit = modulo(int, 0x100);
return int8bit;
};node_modules\es-abstract\2024\ToUint32.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToUint32.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-touint32
var two32 = 0x100000000; // Math.pow(2, 32);
module.exports = function ToUint32(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int32bit = modulo(int, two32);
return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2024\ToUint16.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToUint16.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-touint16
var two16 = 0x10000; // Math.pow(2, 16)
module.exports = function ToUint16(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int16bit = modulo(int, two16);
return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2024\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2024\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2024\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2024\ToNumeric.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToNumeric.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/11.0/#sec-tonumeric
module.exports = function ToNumeric(argument) {
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof primValue === 'bigint') {
return primValue;
}
return ToNumber(primValue);
};node_modules\es-abstract\2024\ToNumber.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\ToNumber.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var StringToNumber = require('./StringToNumber');
// https://262.ecma-international.org/13.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
return StringToNumber(value);
}
return +value;
};node_modules\es-abstract\2024\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2024\ToIntegerOrInfinity.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\ToIntegerOrInfinity.js (Line 1:1 - Line 16:2)
'use strict';
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity
module.exports = function ToIntegerOrInfinity(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0) { return 0; }
if (!$isFinite(number)) { return number; }
return truncate(number);
};node_modules\es-abstract\2024\ToInt8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToInt8.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint8
module.exports = function ToInt8(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int8bit = modulo(int, 0x100);
return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
};node_modules\es-abstract\2024\ToInt32.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToInt32.js (Line 1:1 - Line 23:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint32
var two31 = 0x80000000; // Math.pow(2, 31);
var two32 = 0x100000000; // Math.pow(2, 32);
module.exports = function ToInt32(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int32bit = modulo(int, two32);
var result = int32bit >= two31 ? int32bit - two32 : int32bit;
return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2024\ToInt16.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToInt16.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint16
var two16 = 0x10000; // Math.pow(2, 16);
module.exports = function ToInt16(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int16bit = modulo(int, two16);
return int16bit >= 0x8000 ? int16bit - two16 : int16bit;
};node_modules\es-abstract\2024\ToIndex.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToIndex.js (Line 1:1 - Line 20:2)
'use strict';
var $RangeError = require('es-errors/range');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
// https://262.ecma-international.org/15.0/#sec-toindex
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integer = ToIntegerOrInfinity(value);
if (integer < 0 || integer >= MAX_SAFE_INTEGER) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return integer;
};node_modules\es-abstract\2024\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2024\ToBigUint64.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobiguint64
module.exports = function ToBigUint64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit;
};node_modules\es-abstract\2024\ToBigInt64.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31)));
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobigint64
module.exports = function ToBigInt64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit;
};node_modules\es-abstract\2024\ToBigInt.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2025\ToBigInt.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var StringToBigInt = require('./StringToBigInt');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/13.0/#sec-tobigint
module.exports = function ToBigInt(argument) {
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
var prim = ToPrimitive(argument, $Number);
if (prim == null) {
throw new $TypeError('Cannot convert null or undefined to a BigInt');
}
if (typeof prim === 'boolean') {
return prim ? $BigInt(1) : $BigInt(0);
}
if (typeof prim === 'number') {
throw new $TypeError('Cannot convert a Number value to a BigInt');
}
if (typeof prim === 'string') {
var n = StringToBigInt(prim);
if (typeof n === 'undefined') {
throw new $TypeError('Failed to parse String to BigInt');
}
return n;
}
if (typeof prim === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a BigInt');
}
if (typeof prim !== 'bigint') {
throw new $SyntaxError('Assertion failed: unknown primitive type');
}
return prim;
};node_modules\es-abstract\2024\TimeZoneString.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\TimeZoneString.js (Line 1:1 - Line 41:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/14.0/#sec-timezoneestring
module.exports = function TimeZoneString(tv) {
if (!isInteger(tv)) {
throw new $TypeError('Assertion failed: `tv` must be an integral Number');
}
// 1. Let localTimeZone be DefaultTimeZone().
// 2. If IsTimeZoneOffsetString(localTimeZone) is true, then
// a. Let offsetNs be ParseTimeZoneOffsetString(localTimeZone).
// 3. Else,
// a. Let offsetNs be GetNamedTimeZoneOffsetNanoseconds(localTimeZone, ℤ(ℝ(tv) × 106)).
// 4. Let offset be 𝔽(truncate(offsetNs / 106)).
// 5. If offset is +0𝔽 or offset > +0𝔽, then
// a. Let offsetSign be "+".
// b. Let absOffset be offset.
// 6. Else,
// a. Let offsetSign be "-".
// b. Let absOffset be -offset.
// 7. Let offsetMin be ToZeroPaddedDecimalString(ℝ(MinFromTime(absOffset)), 2).
// 8. Let offsetHour be ToZeroPaddedDecimalString(ℝ(HourFromTime(absOffset)), 2).
// 9. Let tzName be an implementation-defined string that is either the empty String or the string-concatenation of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT PARENTHESIS), an implementation-defined timezone name, and the code unit 0x0029 (RIGHT PARENTHESIS).
// 10. Return the string-concatenation of offsetSign, offsetHour, offsetMin, and tzName.
// hack until DefaultTimeZone, IsTimeZoneOffsetString, ParseTimeZoneOffsetString, GetNamedTimeZoneOffsetNanoseconds, and "implementation-defined string" are available
var ts = $toTimeString(new $Date(tv));
return $slice(ts, $indexOf(ts, '(') + 1, $indexOf(ts, ')'));
};node_modules\es-abstract\2024\TimeString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\TimeString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
var ToZeroPaddedDecimalString = require('./ToZeroPaddedDecimalString');
// https://262.ecma-international.org/13.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = ToZeroPaddedDecimalString(HourFromTime(tv), 2); // step 1
var minute = ToZeroPaddedDecimalString(MinFromTime(tv), 2); // step 2
var second = ToZeroPaddedDecimalString(SecFromTime(tv), 2); // step 3
return hour + ':' + minute + ':' + second + ' GMT'; // step 4
};node_modules\es-abstract\2024\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2024\ThisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ThisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/15.0/#sec-thissymbolvalue
module.exports = function ThisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2024\ThisBigIntValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ThisBigIntValue.js (Line 1:1 - Line 20:2)
'use strict';
var callBound = require('call-bound');
var $SyntaxError = require('es-errors/syntax');
var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
// https://262.ecma-international.org/15.0/#sec-thisbigintvalue
module.exports = function ThisBigIntValue(value) {
if (typeof value === 'bigint') {
return value;
}
if (!$bigIntValueOf) {
throw new $SyntaxError('BigInt is not supported');
}
return $bigIntValueOf(value);
};node_modules\es-abstract\2024\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2024\SystemTimeZoneIdentifier.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\SystemTimeZoneIdentifier.js (Line 1:1 - Line 18:2)
'use strict';
var callBind = require('call-bind');
var I402 = typeof Intl === 'undefined' ? null : Intl;
var DateTimeFormat = I402 && I402.DateTimeFormat;
var resolvedOptions = DateTimeFormat && callBind(DateTimeFormat.prototype.resolvedOptions);
// https://262.ecma-international.org/15.0/#sec-systemtimezoneidentifier
module.exports = function SystemTimeZoneIdentifier() {
if (DateTimeFormat && resolvedOptions) {
return resolvedOptions(new DateTimeFormat()).timeZone; // steps 2 - 3
}
return 'UTC'; // step 1
};node_modules\es-abstract\2024\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2024\substring.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\substring.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#substring
module.exports = function substring(S, inclusiveStart, exclusiveEnd) {
if (typeof S !== 'string' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers');
}
return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length);
};node_modules\es-abstract\2024\StringToNumber.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\StringToNumber.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
var $TypeError = require('es-errors/type');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
// https://262.ecma-international.org/13.0/#sec-stringtonumber
module.exports = function StringToNumber(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` is not a String');
}
if (isBinary(argument)) {
return +$parseInteger($strSlice(argument, 2), 2);
}
if (isOctal(argument)) {
return +$parseInteger($strSlice(argument, 2), 8);
}
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
return NaN;
}
var trimmed = $trim(argument);
if (trimmed !== argument) {
return StringToNumber(trimmed);
}
return +argument;
};node_modules\es-abstract\2024\StringToCodePoints.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\StringToCodePoints.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var CodePointAt = require('./CodePointAt');
// https://262.ecma-international.org/12.0/#sec-stringtocodepoints
module.exports = function StringToCodePoints(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var codePoints = [];
var size = string.length;
var position = 0;
while (position < size) {
var cp = CodePointAt(string, position);
codePoints[codePoints.length] = cp['[[CodePoint]]'];
position += cp['[[CodeUnitCount]]'];
}
return codePoints;
};node_modules\es-abstract\2024\StringToBigInt.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\StringToBigInt.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
// https://262.ecma-international.org/14.0/#sec-stringtobigint
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return void undefined;
}
};node_modules\es-abstract\2024\StringPaddingBuiltinsImpl.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\StringPaddingBuiltinsImpl.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var StringPad = require('./StringPad');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
// https://262.ecma-international.org/15.0/#sec-stringpaddingbuiltinsimpl
module.exports = function StringPaddingBuiltinsImpl(O, maxLength, fillString, placement) {
if (placement !== 'start' && placement !== 'end' && placement !== 'START' && placement !== 'END') {
throw new $TypeError('Assertion failed: `placement` must be ~START~ or ~END~');
}
var S = ToString(O); // step 1
var intMaxLength = ToLength(maxLength); // step 2
var stringLength = S.length; // step 3
if (intMaxLength <= stringLength) { return S; } // step 4
var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); // steps 5-6
return StringPad(S, intMaxLength, filler, placement); // step 7
};node_modules\es-abstract\2024\StringPad.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\StringPad.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $strSlice = callBound('String.prototype.slice');
// https://262.ecma-international.org/15.0/#sec-stringpad
module.exports = function StringPad(S, maxLength, fillString, placement) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(maxLength) || maxLength < 0) {
throw new $TypeError('Assertion failed: `maxLength` must be a non-negative integer');
}
if (typeof fillString !== 'string') {
throw new $TypeError('Assertion failed: `fillString` must be a String');
}
if (placement !== 'start' && placement !== 'end' && placement !== 'START' && placement !== 'END') {
throw new $TypeError('Assertion failed: `placement` must be ~START~ or ~END~');
}
var stringLength = S.length; // step 1
if (maxLength <= stringLength) { return S; } // step 2
if (fillString === '') { return S; } // step 3
var fillLen = maxLength - stringLength; // step 4
// 5. Let _truncatedStringFiller_ be the String value consisting of repeated concatenations of _fillString_ truncated to length _fillLen_.
var truncatedStringFiller = '';
while (truncatedStringFiller.length < fillLen) {
truncatedStringFiller += fillString;
}
truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen);
if (placement === 'start' || placement === 'START') { return truncatedStringFiller + S; } // step 6
return S + truncatedStringFiller; // step 7
};node_modules\es-abstract\2024\StringIndexOf.js (Line 12:1 - Line 24:3), node_modules\es-abstract\2025\StringIndexOf.js (Line 12:1 - Line 23:10)
module.exports = function StringIndexOf(string, searchValue, fromIndex) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (typeof searchValue !== 'string') {
throw new $TypeError('Assertion failed: `searchValue` must be a String');
}
if (!isInteger(fromIndex) || fromIndex < 0) {
throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer');
}
var len = string.length;
ifnode_modules\es-abstract\2024\StringGetOwnProperty.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var isPropertyKey = require('../helpers/isPropertyKey');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !isInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2024\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2024\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2024\SortIndexedProperties.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\SortIndexedProperties.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var ToString = require('./ToString');
var isAbstractClosure = require('../helpers/isAbstractClosure');
var $sort = callBound('Array.prototype.sort');
// https://262.ecma-international.org/14.0/#sec-sortindexedproperties
module.exports = function SortIndexedProperties(obj, len, SortCompare, holes) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(obj) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: `len` must be an integer >= 0');
}
if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) {
throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments');
}
if (holes !== 'skip-holes' && holes !== 'read-through-holes') {
throw new $TypeError('Assertion failed: `holes` must be either ~skip-holes~ or ~read-through-holes~');
}
var items = []; // step 1
var k = 0; // step 2
while (k < len) { // step 3
var Pk = ToString(k);
var kRead = holes === 'skip-holes' ? HasProperty(obj, Pk) : true; // step 3.b - 3.c
if (kRead) { // step 3.d
var kValue = Get(obj, Pk);
items[items.length] = kValue;
}
k += 1; // step 3.e
}
$sort(items, SortCompare); // step 4
return items; // step 5
};node_modules\es-abstract\2024\SetValueInBuffer.js (Line 1:1 - Line 92:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 1:1 - Line 92:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumericToRawBytes = require('./NumericToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/15.0/#sec-setvalueinbuffer
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex) || byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SEQ-CST' && order !== 'UNORDERED' && order !== 'INIT') {
throw new $TypeError('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3
throw new $TypeError('Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number');
}
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
var elementSize = tableTAO.size['$' + type]; // step 5
// 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6
var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7
if (isSAB) { // step 8
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 10. Return NormalCompletion(undefined).
};node_modules\es-abstract\2024\SetTypedArrayFromTypedArray.js (Line 1:1 - Line 133:2), node_modules\es-abstract\2025\SetTypedArrayFromTypedArray.js (Line 1:1 - Line 133:2)
'use strict';
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var CloneArrayBuffer = require('./CloneArrayBuffer');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsSharedArrayBuffer = require('./IsSharedArrayBuffer');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var SameValue = require('./SameValue');
var SetValueInBuffer = require('./SetValueInBuffer');
var TypedArrayByteLength = require('./TypedArrayByteLength');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var TypedArrayLength = require('./TypedArrayLength');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var GetIntrinsic = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
// https://262.ecma-international.org/15.0/#sec-settypedarrayfromtypedarray
module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: `target` must be a Typed Array');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: `targetOffset` must be a non-negative integer or +Infinity');
}
var whichSource = whichTypedArray(source);
if (!whichSource) {
throw new $TypeError('Assertion failed: `source` must be a Typed Array');
}
var targetBuffer = typedArrayBuffer(target); // step 1
var targetRecord = MakeTypedArrayWithBufferWitnessRecord(target, 'SEQ-CST'); // step 2
if (IsTypedArrayOutOfBounds(targetRecord)) {
throw new $TypeError('target is out of bounds'); // step 3
}
var targetLength = TypedArrayLength(targetRecord); // step 4
var srcBuffer = typedArrayBuffer(source); // step 5
var srcRecord = MakeTypedArrayWithBufferWitnessRecord(source, 'SEQ-CST'); // step 6
if (IsTypedArrayOutOfBounds(srcRecord)) {
throw new $TypeError('target is out of bounds'); // step 7
}
var srcLength = TypedArrayLength(srcRecord); // step 8
var targetType = TypedArrayElementType(target); // step 9
var targetElementSize = TypedArrayElementSize(target); // step 10
var targetByteOffset = typedArrayByteOffset(target); // step 11
var srcType = TypedArrayElementType(source); // step 12
var srcElementSize = TypedArrayElementSize(source); // step 13
var srcByteOffset = typedArrayByteOffset(source); // step 14
if (targetOffset === Infinity) {
throw new $RangeError('targetOffset must be a non-negative integer or +Infinity'); // step 15
}
if (srcLength + targetOffset > targetLength) {
throw new $RangeError('targetOffset + source.length must not be greater than target.length'); // step 16
}
var targetContentType = whichTarget === 'BigInt64Array' || whichTarget === 'BigUint64Array' ? 'BIGINT' : 'NUMBER';
var sourceContentType = whichSource === 'BigInt64Array' || whichSource === 'BigUint64Array' ? 'BIGINT' : 'NUMBER';
if (targetContentType !== sourceContentType) {
throw new $TypeError('source and target must have the same content type'); // step 17
}
var sameSharedArrayBuffer = false;
if (IsSharedArrayBuffer(srcBuffer) && IsSharedArrayBuffer(targetBuffer)) { // step 18
// a. If srcBuffer.[[ArrayBufferData]] and targetBuffer.[[ArrayBufferData]] are the same Shared Data Block values, let same be true; else let same be false.
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
}
var srcByteIndex;
if (SameValue(srcBuffer, targetBuffer) || sameSharedArrayBuffer) { // step 19
var srcByteLength = TypedArrayByteLength(srcRecord); // step 19.a
srcBuffer = CloneArrayBuffer(srcBuffer, srcByteOffset, srcByteLength, $ArrayBuffer); // step 19.b
srcByteIndex = 0; // step 19.c
} else { // step 20
srcByteIndex = srcByteOffset; // step 20.a
}
var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 21
var limit = targetByteIndex + (targetElementSize * srcLength); // step 22
var value;
if (srcType === targetType) { // step 23
// a. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data.
while (targetByteIndex < limit) { // step 23.b
value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'UINT8', true, 'UNORDERED'); // step 23.b.i
SetValueInBuffer(targetBuffer, targetByteIndex, 'UINT8', value, true, 'UNORDERED'); // step 23.b.ii
srcByteIndex += 1; // step 23.b.iii
targetByteIndex += 1; // step 23.b.iv
}
} else { // step 24
while (targetByteIndex < limit) { // step 24.a
value = GetValueFromBuffer(srcBuffer, srcByteIndex, srcType, true, 'UNORDERED'); // step 24.a.i
SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'UNORDERED'); // step 24.a.ii
srcByteIndex += srcElementSize; // step 24.a.iii
targetByteIndex += targetElementSize; // step 24.a.iv
}
}
};node_modules\es-abstract\2024\SetTypedArrayFromArrayLike.js (Line 1:1 - Line 64:2), node_modules\es-abstract\2025\SetTypedArrayFromArrayLike.js (Line 1:1 - Line 64:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isTypedArray = require('is-typed-array');
var whichTypedArray = require('which-typed-array');
var Get = require('./Get');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
var TypedArrayLength = require('./TypedArrayLength');
var TypedArraySetElement = require('./TypedArraySetElement');
// https://262.ecma-international.org/15.0/#sec-settypedarrayfromarraylike
module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: `target` must be a Typed Array');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: `targetOffset` must be a non-negative integer or +Infinity');
}
if (isTypedArray(source)) {
throw new $TypeError('Assertion failed: `source` must not be a Typed Array');
}
var targetRecord = MakeTypedArrayWithBufferWitnessRecord(target, 'SEQ-CST'); // step 1
if (IsTypedArrayOutOfBounds(targetRecord)) {
throw new $TypeError('target is out of bounds'); // step 2
}
var targetLength = TypedArrayLength(targetRecord); // step 3
var src = ToObject(source); // step 4
var srcLength = LengthOfArrayLike(src); // step 5
if (targetOffset === Infinity) {
throw new $RangeError('targetOffset must be a finite integer'); // step 6
}
if (srcLength + targetOffset > targetLength) {
throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 7
}
var k = 0; // step 8
while (k < srcLength) { // step 9
var Pk = ToString(k); // step 9.a
var value = Get(src, Pk); // step 9.b
var targetIndex = targetOffset + k; // step 9.c
TypedArraySetElement(target, targetIndex, value); // step 9.d
k += 1; // step 9.e
}
};node_modules\es-abstract\2024\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2024\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2024\SetFunctionLength.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/12.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length !== Infinity && (!isInteger(length) || length < 0)) {
throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};node_modules\es-abstract\2024\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2024\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2024\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2024\RegExpHasFlag.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\RegExpHasFlag.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%');
var SameValue = require('./SameValue');
var $indexOf = callBound('String.prototype.indexOf');
var hasRegExpMatcher = require('is-regex');
var getFlags = require('regexp.prototype.flags');
// https://262.ecma-international.org/13.0/#sec-regexphasflag
module.exports = function RegExpHasFlag(R, codeUnit) {
if (typeof codeUnit !== 'string' || codeUnit.length !== 1) {
throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1');
}
if (!isObject(R)) {
throw new $TypeError('Assertion failed: Type(R) is not Object');
}
if (!hasRegExpMatcher(R)) { // step 2
if (SameValue(R, $RegExpPrototype)) {
return void undefined; // step 2.a
}
throw new $TypeError('`R` must be a RegExp object'); // step 2.b
}
var flags = getFlags(R); // step 3
return $indexOf(flags, codeUnit) > -1; // steps 4-5
};node_modules\es-abstract\2024\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2024\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2024\RawBytesToNumeric.js (Line 1:1 - Line 16:15), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 1:1 - Line 16:15)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32node_modules\es-abstract\2024\RawBytesToNumeric.js (Line 14:26 - Line 58:10), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 16:28 - Line 59:10)
);
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/15.0/#sec-rawbytestonumeric
module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {
if (!hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'FLOAT32'node_modules\es-abstract\2024\QuoteJSONString.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var StringToCodePoints = require('./StringToCodePoints');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var hasOwn = require('hasown');
// https://262.ecma-international.org/12.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(StringToCodePoints(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16EncodeCodePoint(cCharCode);
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2024\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2024\ParseHexOctet.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\ParseHexOctet.js (Line 1:1 - Line 40:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isInteger = require('math-intrinsics/isInteger');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-parsehexoctet
module.exports = function ParseHexOctet(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer');
}
var len = string.length; // step 1
if ((position + 2) > len) { // step 2
var error = new $SyntaxError('requested a position on a string that does not contain 2 characters at that position'); // step 2.a
return [error]; // step 2.b
}
var hexDigits = substring(string, position, position + 2); // step 3
var n = +('0x' + hexDigits);
if (isNaN(n)) {
return [new $SyntaxError('Invalid hexadecimal characters')];
}
return n;
/*
4. Let _parseResult_ be ParseText(StringToCodePoints(_hexDigits_), |HexDigits[~Sep]|).
5. If _parseResult_ is not a Parse Node, return _parseResult_.
6. Let _n_ be the unsigned 8-bit value corresponding with the MV of _parseResult_.
7. Return _n_.
*/
};node_modules\es-abstract\2024\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2024\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2024\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};node_modules\es-abstract\2024\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2024\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2024\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2024\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var hasOwn = require('hasown');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2024\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2024\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return OrdinaryObjectCreate(proto, slots);
};node_modules\es-abstract\2024\ObjectDefineProperties.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 33:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/15.0/#sec-objectdefineproperties
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = { '[[Key]]': nextKey, '[[Descriptor]]': desc }; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
DefinePropertyOrThrow(O, pair['[[Key]]'], pair['[[Descriptor]]']); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2024\NumericToRawBytes.js (Line 1:1 - Line 16:20), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 1:1 - Line 16:20)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToBigInt64 = require('./ToBigInt64');
var ToBigUint64 = require('./ToBigUint64');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytesnode_modules\es-abstract\2024\NumericToRawBytes.js (Line 14:17 - Line 36:66), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 16:33 - Line 37:66)
);
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors
var TypeToAO = {
__proto__: null,
$INT8: ToInt8,
$UINT8: ToUint8,
$UINT8C: ToUint8Clamp,
$INT16: ToInt16,
$UINT16: ToUint16,
$INT32: ToInt32,
$UINT32: ToUint32,
$BIGINT64: ToBigInt64,
$BIGUINT64: ToBigUint64
};
// https://262.ecma-international.org/15.0/#sec-numerictorawbytesnode_modules\es-abstract\2024\NumericToRawBytes.js (Line 38:1 - Line 49:10), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 39:1 - Line 50:10)
module.exports = function NumericToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'FLOAT32'node_modules\es-abstract\2024\NumberToBigInt.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\NumberToBigInt.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-numbertobigint
module.exports = function NumberToBigInt(number) {
if (typeof number !== 'number') {
throw new $TypeError('Assertion failed: `number` must be a String');
}
if (!isInteger(number)) {
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt(number);
};node_modules\es-abstract\2024\NumberBitwiseOp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\NumberBitwiseOp.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};node_modules\es-abstract\2024\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2024\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2024\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2024\MakeTypedArrayWithBufferWitnessRecord.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\MakeTypedArrayWithBufferWitnessRecord.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ArrayBufferByteLength = require('./ArrayBufferByteLength');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/15.0/#sec-maketypedarraywithbufferwitnessrecord
module.exports = function MakeTypedArrayWithBufferWitnessRecord(obj, order) {
if (!isTypedArray(obj)) {
throw new $TypeError('Assertion failed: `obj` must be a Typed Array');
}
if (order !== 'SEQ-CST' && order !== 'UNORDERED') {
throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~');
}
var buffer = typedArrayBuffer(obj); // step 1
var byteLength = IsDetachedBuffer(buffer) ? 'DETACHED' : ArrayBufferByteLength(buffer, order); // steps 2 - 3
return { '[[Object]]': obj, '[[CachedBufferByteLength]]': byteLength }; // step 4
};node_modules\es-abstract\2024\MakeTime.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\MakeTime.js (Line 1:1 - Line 23:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-maketime
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToIntegerOrInfinity(hour);
var m = ToIntegerOrInfinity(min);
var s = ToIntegerOrInfinity(sec);
var milli = ToIntegerOrInfinity(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2024\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2), node_modules\es-abstract\2025\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2)
'use strict';
var $TypeError = require('es-errors/type');
var ArrayCreate = require('./ArrayCreate');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var GetMatchIndexPair = require('./GetMatchIndexPair');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isMatchRecord = require('../helpers/records/match-record');
var isStringOrUndefined = function isStringOrUndefined(s) {
return typeof s === 'undefined' || typeof s === 'string';
};
var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) {
return typeof m === 'undefined' || isMatchRecord(m);
};
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) {
throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`');
}
if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`');
}
if (typeof hasGroups !== 'boolean') {
throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean');
}
var n = indices.length; // step 1
if (!(n < MAX_ARRAY_LENGTH)) {
throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1');
}
if (groupNames.length !== n - 1) {
throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`');
}
var A = ArrayCreate(n); // step 5
var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7
CreateDataPropertyOrThrow(A, 'groups', groups); // step 8
for (var i = 0; i < n; i += 1) { // step 9
var matchIndices = indices[i]; // step 9.a
// eslint-disable-next-line no-negated-condition
var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c
CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d
if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e
if (!groups) {
throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values');
}
CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i
}
}
return A; // step 10
};node_modules\es-abstract\2024\MakeFullYear.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\MakeFullYear.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/15.0/#sec-makefullyear
module.exports = function MakeFullYear(year) {
if (typeof year !== 'number') {
throw new $TypeError('Assertion failed: `year` must be a Number');
}
if (isNaN(year)) {
return NaN; // step 1
}
var truncated = ToIntegerOrInfinity(year); // step 2
if (0 <= truncated && truncated <= 99) {
return 1900 + truncated; // step 3
}
return truncated; // step 4
};node_modules\es-abstract\2024\MakeDay.js (Line 1:1 - Line 36:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToIntegerOrInfinity(year);
var m = ToIntegerOrInfinity(month);
var dt = ToIntegerOrInfinity(date);
var ym = y + floor(m / 12);
if (!$isFinite(ym)) {
return NaN;
}
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2024\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2024\MakeDataViewWithBufferWitnessRecord.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\MakeDataViewWithBufferWitnessRecord.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ArrayBufferByteLength = require('./ArrayBufferByteLength');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var dataViewBuffer = require('data-view-buffer');
var isDataView = require('is-data-view');
// https://262.ecma-international.org/15.0/#sec-makedataviewwithbufferwitnessrecord
module.exports = function MakeDataViewWithBufferWitnessRecord(obj, order) {
if (!isDataView(obj)) {
throw new $TypeError('MakeDataViewWithBufferWitnessRecord called with non-DataView');
}
if (order !== 'SEQ-CST' && order !== 'UNORDERED') {
throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~');
}
var buffer = dataViewBuffer(obj); // step 1
var byteLength = IsDetachedBuffer(buffer) ? 'DETACHED' : ArrayBufferByteLength(buffer, order); // steps 2 - 3
return { '[[Object]]': obj, '[[CachedBufferByteLength]]': byteLength }; // step 4
};node_modules\es-abstract\2024\LengthOfArrayLike.js (Line 1:1 - Line 18:27), node_modules\es-abstract\2025\LengthOfArrayLike.js (Line 1:1 - Line 18:27)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all overnode_modules\es-abstract\2024\KeyForSymbol.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\KeyForSymbol.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $keyFor = callBound('Symbol.keyFor', true);
// https://262.ecma-international.org/14.0/#sec-keyforsymbol
module.exports = function KeyForSymbol(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $keyFor(sym);
};node_modules\es-abstract\2024\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2024\IteratorToList.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\IteratorToList.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var isIteratorRecord = require('../helpers/records/iterator-record');
// https://262.ecma-international.org/15.0/#sec-iteratortolist
module.exports = function IteratorToList(iteratorRecord) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
var values = []; // step 1
var next = true; // step 2
while (next) { // step 3
next = IteratorStep(iteratorRecord); // step 3.a
if (next) {
var nextValue = IteratorValue(next); // step 3.b.i
values[values.length] = nextValue; // step 3.b.ii
}
}
return values; // step 4
};node_modules\es-abstract\2024\IteratorNext.js (Line 18:2 - Line 24:3), node_modules\es-abstract\2025\IteratorNext.js (Line 19:3 - Line 24:2)
if (arguments.length < 2) { // step 1
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]']); // step 1.a
} else { // step 2
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]'], [arguments[1]]); // step 2.a
}
ifnode_modules\es-abstract\2024\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2024\IteratorClose.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var isIteratorRecord = require('../helpers/records/iterator-record');
// https://262.ecma-international.org/15.0/#sec-iteratorclose
module.exports = function IteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!isObject(iteratorRecord['[[Iterator]]'])) {
throw new $TypeError('Assertion failed: iteratorRecord.[[Iterator]] must be an Object'); // step 1
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { // step 2
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iterator = iteratorRecord['[[Iterator]]']; // step 3
var iteratorReturn;
try {
iteratorReturn = GetMethod(iterator, 'return'); // step 4
} catch (e) {
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
throw e; // step 7
}
if (typeof iteratorReturn === 'undefined') {
return completionThunk(); // step 5.a - 5.b
}
var innerResult;
try {
innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e; // step 7
}
var completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2024\IsWordChar.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\IsWordChar.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isRegExpRecord = require('../helpers/records/regexp-record');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-iswordchar-abstract-operation
module.exports = function IsWordChar(rer, Input, e) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (!isInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
var InputLength = Input.length; // step 1
if (e === -1 || e === InputLength) {
return false; // step 2
}
var c = Input[e]; // step 3
return $indexOf(WordCharacters(rer), c) > -1; // steps 4-5
};node_modules\es-abstract\2024\IsViewOutOfBounds.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\IsViewOutOfBounds.js (Line 1:1 - Line 48:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var isDataViewWithBufferWitnessRecord = require('../helpers/records/data-view-with-buffer-witness-record');
var dataViewBuffer = require('data-view-buffer');
var dataViewByteLength = require('data-view-byte-length');
var dataViewByteOffset = require('data-view-byte-offset');
// https://262.ecma-international.org/15.0/#sec-isviewoutofbounds
module.exports = function IsViewOutOfBounds(viewRecord) {
if (!isDataViewWithBufferWitnessRecord(viewRecord)) {
throw new $TypeError('Assertion failed: `viewRecord` must be a DataView With Buffer Witness Record');
}
var view = viewRecord['[[Object]]']; // step 1
var bufferByteLength = viewRecord['[[CachedBufferByteLength]]']; // step 2
if (IsDetachedBuffer(dataViewBuffer(view)) !== (bufferByteLength === 'DETACHED')) {
// step 3
throw new $TypeError('Assertion failed: `IsDetachedBuffer(dataViewBuffer(view))` must be true if and only if `bufferByteLength === ~DETACHED~');
}
if (bufferByteLength === 'DETACHED') {
return true; // step 4
}
var byteOffsetStart = dataViewByteOffset(view); // step 5
var isFixed = IsFixedLengthArrayBuffer(dataViewBuffer(view));
var viewByteLength = isFixed ? dataViewByteLength(view) : 'AUTO'; // view.[[ByteLength]]
var byteOffsetEnd = viewByteLength === 'AUTO' ? bufferByteLength : byteOffsetStart + viewByteLength; // steps 6 - 7
if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) {
return true; // step 8
}
// 9. NOTE: 0-length DataViews are not considered out-of-bounds.
return false; // step 10
};node_modules\es-abstract\2024\IsValidIntegerIndex.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\IsValidIntegerIndex.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var TypedArrayLength = require('./TypedArrayLength');
var isInteger = require('math-intrinsics/isInteger');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/15.0/#sec-isvalidintegerindex
module.exports = function IsValidIntegerIndex(O, index) {
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` is not a TypedArray object');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` is not a Number');
}
var buffer = typedArrayBuffer(O);
if (IsDetachedBuffer(buffer)) { return false; } // step 1
if (!isInteger(index)) { return false; } // step 2
if (isNegativeZero(index)) { return false; } // step 3
var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, 'UNORDERED'); // step 4
if (IsTypedArrayOutOfBounds(taRecord)) {
return false; // step 6
}
var length = TypedArrayLength(taRecord); // step 7
if (index < 0 || index >= length) { return false; } // step 8
return true; // step 9
};node_modules\es-abstract\2024\IsTypedArrayOutOfBounds.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\IsTypedArrayOutOfBounds.js (Line 1:1 - Line 57:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var isTypedArrayWithBufferWitnessRecord = require('../helpers/records/typed-array-with-buffer-witness-record');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/15.0/#sec-istypedarrayoutofbounds
module.exports = function IsTypedArrayOutOfBounds(taRecord) {
if (!isTypedArrayWithBufferWitnessRecord(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record');
}
var O = taRecord['[[Object]]']; // step 1
var bufferByteLength = taRecord['[[CachedBufferByteLength]]']; // step 2
if (IsDetachedBuffer(typedArrayBuffer(O)) && bufferByteLength !== 'DETACHED') {
throw new $TypeError('Assertion failed: typed array is detached only if the byte length is ~DETACHED~'); // step 3
}
if (bufferByteLength === 'DETACHED') {
return true; // step 4
}
var byteOffsetStart = typedArrayByteOffset(O); // step 5
var isFixed = IsFixedLengthArrayBuffer(typedArrayBuffer(O));
var byteOffsetEnd;
var length = isFixed ? typedArrayLength(O) : 'AUTO';
// TODO: probably use package for array length
// seems to apply when TA is backed by a resizable/growable AB
if (length === 'AUTO') { // step 6
byteOffsetEnd = bufferByteLength; // step 6.a
} else {
var elementSize = TypedArrayElementSize(O); // step 7.a
byteOffsetEnd = byteOffsetStart + (length * elementSize); // step 7.b
}
if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) {
return true; // step 8
}
// 9. NOTE: 0-length TypedArrays are not considered out-of-bounds.
return false; // step 10
};node_modules\es-abstract\2024\IsTimeZoneOffsetString.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\IsTimeZoneOffsetString.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var regexTester = require('safe-regex-test');
// https://tc39.es/ecma262/#sec-istimezoneoffsetstring
// implementation taken from https://github.com/tc39/proposal-temporal/blob/21ee5b13f0672990c807475ba094092d19dd6dc5/polyfill/lib/ecmascript.mjs#L2140
var OFFSET = /^([+\u2212-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?$/;
var testOffset = regexTester(OFFSET);
module.exports = function IsTimeZoneOffsetString(offsetString) {
if (typeof offsetString !== 'string') {
throw new $TypeError('Assertion failed: `offsetString` must be a String');
}
return testOffset(offsetString);
};node_modules\es-abstract\2024\IsStringWellFormedUnicode.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\IsStringWellFormedUnicode.js (Line 1:1 - Line 23:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/14.0/#sec-isstringwellformedunicode
module.exports = function IsStringWellFormedUnicode(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var len = string.length; // step 1
var k = 0; // step 2
while (k < len) { // step 3
var cp = CodePointAt(string, k); // step 3.a
if (cp['[[IsUnpairedSurrogate]]']) {
return false; // step 3.b
}
k += cp['[[CodeUnitCount]]']; // step 3.c
}
return true; // step 4
};node_modules\es-abstract\2024\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2024\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2024\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2024\IsNoTearConfiguration.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsNoTearConfiguration.js (Line 1:1 - Line 16:2)
'use strict';
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var IsBigIntElementType = require('./IsBigIntElementType');
// https://262.ecma-international.org/15.0/#sec-isnotearconfiguration
module.exports = function IsNoTearConfiguration(type, order) {
if (IsUnclampedIntegerElementType(type)) {
return true;
}
if (IsBigIntElementType(type) && order !== 'INIT' && order !== 'UNORDERED') {
return true;
}
return false;
};node_modules\es-abstract\2024\IsLooselyEqual.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2025\IsLooselyEqual.js (Line 1:1 - Line 58:2)
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var isObject = require('es-object-atoms/isObject');
var IsStrictlyEqual = require('./IsStrictlyEqual');
var StringToBigInt = require('./StringToBigInt');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/13.0/#sec-islooselyequal
module.exports = function IsLooselyEqual(x, y) {
if (isSameType(x, y)) {
return IsStrictlyEqual(x, y);
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return IsLooselyEqual(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof x === 'bigint' && typeof y === 'string') {
var n = StringToBigInt(y);
if (typeof n === 'undefined') {
return false;
}
return IsLooselyEqual(x, n);
}
if (typeof x === 'string' && typeof y === 'bigint') {
return IsLooselyEqual(y, x);
}
if (typeof x === 'boolean') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return IsLooselyEqual(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol' || typeof x === 'bigint') && isObject(y)) {
return IsLooselyEqual(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol' || typeof y === 'bigint')) {
return IsLooselyEqual(ToPrimitive(x), y);
}
if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
if (!isFinite(x) || !isFinite(y)) {
return false;
}
// eslint-disable-next-line eqeqeq
return x == y; // shortcut for step 13.b.
}
return false;
};node_modules\es-abstract\2024\IsLessThan.js (Line 1:1 - Line 97:2), node_modules\es-abstract\2025\IsLessThan.js (Line 1:1 - Line 97:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var min = require('math-intrinsics/min');
var $isNaN = require('math-intrinsics/isNaN');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
var StringToBigInt = require('./StringToBigInt');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var BigIntLessThan = require('./BigInt/lessThan');
var NumberLessThan = require('./Number/lessThan');
// https://262.ecma-international.org/14.0/#sec-islessthan
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function IsLessThan(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') { // step 3
// a. Let lx be the length of px.
// b. Let ly be the length of py.
// c. For each integer i starting with 0 such that i < min(lx, ly), in ascending order, do
// i. Let cx be the integer that is the numeric value of the code unit at index i within px.
// ii. Let cy be the integer that is the numeric value of the code unit at index i within py.
// iii. If cx < cy, return true.
// iv. If cx > cy, return false.
// d. If lx < ly, return true. Otherwise, return false.
var lx = px.length; // step 3.a
var ly = py.length; // step 3.b
for (var i = 0; i < min(lx, ly); i++) { // step 3.c
var cx = $charCodeAt(px, i); // step 3.c.i
var cy = $charCodeAt(py, i); // step 3.c.ii
if (cx < cy) {
return true; // step 3.c.iii
}
if (cx > cy) {
return false; // step 3.c.iv
}
}
return lx < ly; // step 3.d
}
var nx;
var ny;
if (typeof px === 'bigint' && typeof py === 'string') {
ny = StringToBigInt(py);
if (typeof ny === 'undefined') {
return void undefined;
}
return BigIntLessThan(px, ny);
}
if (typeof px === 'string' && typeof py === 'bigint') {
nx = StringToBigInt(px);
if (typeof nx === 'undefined') {
return void undefined;
}
return BigIntLessThan(nx, py);
}
nx = ToNumeric(px);
ny = ToNumeric(py);
if (typeof nx === typeof ny) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both finite, and the same type
};node_modules\es-abstract\2024\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2024\IsFixedLengthArrayBuffer.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\IsFixedLengthArrayBuffer.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true);
var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true);
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer
module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) {
var isAB = isArrayBuffer(arrayBuffer);
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isAB && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer');
}
if (isAB && $arrayBufferResizable) {
return !$arrayBufferResizable(arrayBuffer); // step 1
}
if (isSAB && $sharedArrayGrowable) {
return !$sharedArrayGrowable(arrayBuffer); // step 1
}
return true; // step 2
};node_modules\es-abstract\2024\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2024\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2024\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2024\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2024\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2024\IsArrayBufferViewOutOfBounds.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\IsArrayBufferViewOutOfBounds.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var IsViewOutOfBounds = require('./IsViewOutOfBounds');
var MakeDataViewWithBufferWitnessRecord = require('./MakeDataViewWithBufferWitnessRecord');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var isDataView = require('is-data-view');
var isTypedArray = require('is-typed-array');
// https://262.ecma-international.org/15.0/#sec-isarraybufferviewoutofbounds
module.exports = function IsArrayBufferViewOutOfBounds(O) {
var isDV = isDataView(O);
if (!isTypedArray(O) && !isDV) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray or DataView');
}
if (isDV) { // step 1
var viewRecord = MakeDataViewWithBufferWitnessRecord(O, 'SEQ-CST'); // step 1.a
return IsViewOutOfBounds(viewRecord); // step 1.b
}
var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, 'SEQ-CST'); // step 2
return IsTypedArrayOutOfBounds(taRecord); // step 3
};node_modules\es-abstract\2024\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2024\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2024\InternalizeJSONProperty.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnProperties = require('./EnumerableOwnProperties');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/14.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = LengthOfArrayLike(val); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnProperties(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2024\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2024\InstallErrorCause.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\InstallErrorCause.js (Line 1:1 - Line 21:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
// https://262.ecma-international.org/13.0/#sec-installerrorcause
module.exports = function InstallErrorCause(O, options) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (isObject(options) && HasProperty(options, 'cause')) {
var cause = Get(options, 'cause');
CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
}
};node_modules\es-abstract\2024\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2024\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2024\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2024\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2024\HasEitherUnicodeFlag.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasEitherUnicodeFlag.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isRegExpRecord = require('../helpers/records/regexp-record');
// https://262.ecma-international.org/15.0/#sec-runtime-semantics-haseitherunicodeflag-abstract-operation
module.exports = function HasEitherUnicodeFlag(rer) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (rer['[[Unicode]]'] || rer['[[UnicodeSets]]']) { // step 1
return true; // step 1.a
}
return false; // step 2
};node_modules\es-abstract\2024\GroupBy.js (Line 9:16 - Line 18:56), node_modules\es-abstract\2025\GroupBy.js (Line 9:26 - Line 18:4)
);
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ThrowCompletion = require('./ThrowCompletion');
var ToPropertyKey = require('./ToPropertyKey');
// https://262.ecma-international.org/15.0/#sec-groupbynode_modules\es-abstract\2024\GroupBy.js (Line 22:67 - Line 39:17), node_modules\es-abstract\2025\GroupBy.js (Line 24:73 - Line 41:15)
);
}
RequireObjectCoercible(items); // step 1
if (!IsCallable(callbackfn)) {
throw new $TypeError('callbackfn must be callable'); // step 2
}
var groups = []; // step 3
var iteratorRecord = GetIterator(items, 'SYNC'); // step 4
var k = 0; // step 5
// eslint-disable-next-line no-constant-condition
while (true) { // step 6
if (k >= MAX_SAFE_INTEGERnode_modules\es-abstract\2024\GroupBy.js (Line 41:2 - Line 54:7), node_modules\es-abstract\2025\GroupBy.js (Line 43:2 - Line 56:22)
IteratorClose(iteratorRecord, error); // step 6.a.ii
}
var next = IteratorStep(iteratorRecord); // step 6.b
if (!next) { // step 6.c
return groups; // step 6.c.i
}
var value = IteratorValue(next); // step 6.dv
var key;
try {
key = Call(callbackfn, undefined, [value, k]); // step 6.e
} catch (e) {
returnnode_modules\es-abstract\2024\GetViewByteLength.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\GetViewByteLength.js (Line 1:1 - Line 47:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var IsViewOutOfBounds = require('./IsViewOutOfBounds');
var isDataViewWithBufferWitnessRecord = require('../helpers/records/data-view-with-buffer-witness-record');
var dataViewBuffer = require('data-view-buffer');
var dataViewByteLength = require('data-view-byte-length');
var dataViewByteOffset = require('data-view-byte-offset');
// https://262.ecma-international.org/15.0/#sec-getviewbytelength
module.exports = function GetViewByteLength(viewRecord) {
if (!isDataViewWithBufferWitnessRecord(viewRecord)) {
throw new $TypeError('Assertion failed: `viewRecord` must be a DataView with Buffer Witness Record');
}
if (IsViewOutOfBounds(viewRecord)) {
throw new $TypeError('Assertion failed: `viewRecord` is out of bounds'); // step 1
}
var view = viewRecord['[[Object]]']; // step 2
var isFixed = IsFixedLengthArrayBuffer(dataViewBuffer(view));
var viewByteLength = isFixed ? dataViewByteLength(view) : 'AUTO'; // view.[[ByteLength]]
if (viewByteLength !== 'AUTO') {
return viewByteLength; // step 3
}
if (isFixed) {
throw new $TypeError('Assertion failed: DataView’s ArrayBuffer is not fixed length'); // step 4
}
var byteOffset = dataViewByteOffset(view); // step 5
var byteLength = viewRecord['[[CachedBufferByteLength]]']; // step 6
if (byteLength === 'DETACHED') {
throw new $TypeError('Assertion failed: DataView’s ArrayBuffer is detached'); // step 7
}
return byteLength - byteOffset; // step 8
};node_modules\es-abstract\2024\GetValueFromBuffer.js (Line 1:1 - Line 95:2), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 1:1 - Line 95:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/15.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SEQ-CST' && order !== 'UNORDERED') {
throw new $TypeError('Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};node_modules\es-abstract\2024\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2024\GetUTCEpochNanoseconds.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2025\GetUTCEpochNanoseconds.js (Line 1:1 - Line 68:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var MakeDay = require('./MakeDay');
var MakeTime = require('./MakeTime');
var MakeDate = require('./MakeDate');
var isInteger = require('math-intrinsics/isInteger');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $SyntaxError = GetIntrinsic('%SyntaxError%');
var $TypeError = GetIntrinsic('%TypeError%');
// https://tc39.es/ecma262/#sec-getutcepochnanoseconds
// eslint-disable-next-line max-params
module.exports = function GetUTCEpochNanoseconds(
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
) {
if (!isInteger(year)) {
throw new $TypeError('Assertion failed: `year` must be an integral Number');
}
if (!isInteger(month) || month < 1 || month > 12) {
throw new $TypeError('Assertion failed: `month` must be an integral Number between 1 and 12, inclusive');
}
if (!isInteger(day) || day < 1 || day > 31) {
throw new $TypeError('Assertion failed: `day` must be an integral Number between 1 and 31, inclusive');
}
if (!isInteger(hour) || hour < 0 || hour > 23) {
throw new $TypeError('Assertion failed: `hour` must be an integral Number between 0 and 23, inclusive');
}
if (!isInteger(minute) || minute < 0 || minute > 59) {
throw new $TypeError('Assertion failed: `minute` must be an integral Number between 0 and 59, inclusive');
}
if (!isInteger(second) || second < 0 || second > 59) {
throw new $TypeError('Assertion failed: `second` must be an integral Number between 0 and 59, inclusive');
}
if (!isInteger(millisecond) || millisecond < 0 || millisecond > 999) {
throw new $TypeError('Assertion failed: `millisecond` must be an integral Number between 0 and 999, inclusive');
}
if (!isInteger(microsecond) || microsecond < 0 || microsecond > 999) {
throw new $TypeError('Assertion failed: `microsecond` must be an integral Number between 0 and 999, inclusive');
}
if (!isInteger(nanosecond) || nanosecond < 0 || nanosecond > 999) {
throw new $TypeError('Assertion failed: `nanosecond` must be an integral Number between 0 and 999, inclusive');
}
var date = MakeDay(year, month - 1, day); // step 1
var time = MakeTime(hour, minute, second, millisecond); // step 2
var ms = MakeDate(date, time); // step 3
if (!isInteger(ms)) {
throw new $TypeError('Assertion failed: `ms` from MakeDate is not an integral Number'); // step 4
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt((ms * 1e6) + (microsecond * 1e3) + nanosecond); // step 5
};node_modules\es-abstract\2024\GetSubstitution.js (Line 1:1 - Line 148:2), node_modules\es-abstract\2025\GetSubstitution.js (Line 1:1 - Line 148:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var regexTester = require('safe-regex-test');
var Get = require('./Get');
var IsArray = require('./IsArray');
var min = require('./min');
var StringIndexOf = require('./StringIndexOf');
var StringToNumber = require('./StringToNumber');
var substring = require('./substring');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isPrefixOf = require('../helpers/isPrefixOf');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
var startsWithDollarDigit = regexTester(/^\$[0-9]/);
var startsWithDollarTwoDigit = regexTester(/^\$[0-9][0-9]/);
// http://www.ecma-international.org/ecma-262/15.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacementTemplate) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof namedCaptures !== 'undefined' && !isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: `namedCaptures` must be `undefined` or an Object');
}
if (typeof replacementTemplate !== 'string') {
throw new $TypeError('Assertion failed: `replacementTemplate` must be a String');
}
var stringLength = str.length; // step 1
if (position > stringLength) {
throw new $TypeError('Assertion failed: position > stringLength, got ' + inspect(position)); // step 2
}
var templateRemainder = replacementTemplate; // step 3
var result = ''; // step 4
while (templateRemainder !== '') { // step 5
// 5.a NOTE: The following steps isolate ref (a prefix of templateRemainder), determine refReplacement (its replacement), and then append that replacement to result.
var ref, refReplacement, capture;
if (isPrefixOf('$$', templateRemainder)) { // step 5.b
ref = '$$'; // step 5.b.i
refReplacement = '$'; // step 5.b.ii
} else if (isPrefixOf('$`', templateRemainder)) { // step 5.c
ref = '$`'; // step 5.c.i
refReplacement = substring(str, 0, position); // step 5.c.ii
} else if (isPrefixOf('$&', templateRemainder)) { // step 5.d
ref = '$&'; // step 5.d.i
refReplacement = matched; // step 5.d.ii
} else if (isPrefixOf('$\'', templateRemainder)) { // step 5.e
ref = '$\''; // step 5.e.i
var matchLength = matched.length; // step 5.e.ii
var tailPos = position + matchLength; // step 5.e.iii
refReplacement = substring(str, min(tailPos, stringLength)); // step 5.e.iv
// 5.e.v NOTE: tailPos can exceed stringLength only if this abstract operation was invoked by a call to the intrinsic @@replace method of %RegExp.prototype% on an object whose "exec" property is not the intrinsic %RegExp.prototype.exec%.
} else if (startsWithDollarDigit(templateRemainder)) { // step 5.f
var digitCount = startsWithDollarTwoDigit(templateRemainder) ? 2 : 1; // step 5.f.i
var digits = substring(templateRemainder, 1, 1 + digitCount); // step 5.f.ii
var index = StringToNumber(digits); // step 5.f.iii
if (index < 0 || index > 99) {
throw new $TypeError('Assertion failed: `index` must be >= 0 and <= 99'); // step 5.f.iv
}
var captureLen = captures.length; // step 5.f.v
if (index > captureLen && digitCount === 2) { // step 5.f.vi
// 1. NOTE: When a two-digit replacement pattern specifies an index exceeding the count of capturing groups, it is treated as a one-digit replacement pattern followed by a literal digit.
digitCount = 1; // step 5.f.vi.2
digits = substring(digits, 0, 1); // step 5.f.vi.3
index = StringToNumber(digits); // step 5.f.vi.4
}
ref = substring(templateRemainder, 0, 1 + digitCount); // step 5.f.vii
if (1 <= index && index <= captureLen) { // step 5.f.viii
capture = captures[index - 1]; // step 5.f.viii.1
if (typeof capture === 'undefined') { // step 5.f.viii.2
refReplacement = ''; // step 5.f.viii.2.a
} else { // step 5.f.viii.3
refReplacement = capture; // step 5.f.viii.3.a
}
} else { // step 5.f.ix
refReplacement = ref; // step 5.f.ix.1
}
} else if (isPrefixOf('$<', templateRemainder)) { // step 5.g
var gtPos = StringIndexOf(templateRemainder, '>', 0); // step 5.g.i
if (!(gtPos > -1) || typeof namedCaptures === 'undefined') { // step 5.g.ii
ref = '$<'; // step 5.g.ii.1
refReplacement = ref; // step 5.g.ii.2
} else { // step 5.g.iii
ref = substring(templateRemainder, 0, gtPos + 1); // step 5.g.iii.1
var groupName = substring(templateRemainder, 2, gtPos); // step 5.g.iii.2
if (!isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: Type(namedCaptures) is not Object'); // step 5.g.iii.3
}
capture = Get(namedCaptures, groupName); // step 5.g.iii.4
if (typeof capture === 'undefined') { // step 5.g.iii.5
refReplacement = ''; // step 5.g.iii.5.a
} else { // step 5.g.iii.6
refReplacement = ToString(capture); // step 5.g.iii.6.a
}
}
} else { // step 5.h
ref = substring(templateRemainder, 0, 1); // step 5.h.i
refReplacement = ref; // step 5.h.ii
}
var refLength = ref.length; // step 5.i
templateRemainder = substring(templateRemainder, refLength); // step 5.j
result += refReplacement; // step 5.k
}
return result; // step 6
};node_modules\es-abstract\2024\GetStringIndex.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\GetStringIndex.js (Line 1:1 - Line 27:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var StringToCodePoints = require('./StringToCodePoints');
var $indexOf = callBound('String.prototype.indexOf');
// https://262.ecma-international.org/13.0/#sec-getstringindex
module.exports = function GetStringIndex(S, e) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(e) || e < 0) {
throw new $TypeError('Assertion failed: `e` must be a non-negative integer');
}
if (S === '') {
return 0;
}
var codepoints = StringToCodePoints(S);
var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]);
return eUTF;
};node_modules\es-abstract\2024\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2024\GetPromiseResolve.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\GetPromiseResolve.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-getpromiseresolve
module.exports = function GetPromiseResolve(promiseConstructor) {
if (!IsConstructor(promiseConstructor)) {
throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor');
}
var promiseResolve = Get(promiseConstructor, 'resolve');
if (IsCallable(promiseResolve) === false) {
throw new $TypeError('`resolve` method is not callable');
}
return promiseResolve;
};node_modules\es-abstract\2024\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2024\GetNamedTimeZoneEpochNanoseconds.js (Line 1:1 - Line 72:2), node_modules\es-abstract\2025\GetNamedTimeZoneEpochNanoseconds.js (Line 1:1 - Line 72:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetUTCEpochNanoseconds = require('./GetUTCEpochNanoseconds');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/14.0/#sec-getnamedtimezoneepochnanoseconds
// eslint-disable-next-line max-params
module.exports = function GetNamedTimeZoneEpochNanoseconds(
timeZoneIdentifier,
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
) {
if (typeof timeZoneIdentifier !== 'string') {
throw new $TypeError('Assertion failed: `timeZoneIdentifier` must be a string');
}
if (!isInteger(year)) {
throw new $TypeError('Assertion failed: `year` must be an integral number');
}
if (!isInteger(month) || month < 1 || month > 12) {
throw new $TypeError('Assertion failed: `month` must be an integral number between 1 and 12, inclusive');
}
if (!isInteger(day) || day < 1 || day > 31) {
throw new $TypeError('Assertion failed: `day` must be an integral number between 1 and 31, inclusive');
}
if (!isInteger(hour) || hour < 0 || hour > 23) {
throw new $TypeError('Assertion failed: `hour` must be an integral number between 0 and 23, inclusive');
}
if (!isInteger(minute) || minute < 0 || minute > 59) {
throw new $TypeError('Assertion failed: `minute` must be an integral number between 0 and 59, inclusive');
}
if (!isInteger(second) || second < 0 || second > 999) {
throw new $TypeError('Assertion failed: `second` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(millisecond) || millisecond < 0 || millisecond > 999) {
throw new $TypeError('Assertion failed: `millisecond` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(microsecond) || microsecond < 0 || microsecond > 999) {
throw new $TypeError('Assertion failed: `microsecond` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(nanosecond) || nanosecond < 0 || nanosecond > 999) {
throw new $TypeError('Assertion failed: `nanosecond` must be an integral number between 0 and 999, inclusive');
}
if (timeZoneIdentifier !== 'UTC') {
throw new $TypeError('Assertion failed: only UTC time zone is supported'); // step 1
}
var epochNanoseconds = GetUTCEpochNanoseconds(
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
); // step 2
return [epochNanoseconds]; // step 3
};node_modules\es-abstract\2024\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2024\GetMatchString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\GetMatchString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchstring
module.exports = function GetMatchString(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']);
};node_modules\es-abstract\2024\GetMatchIndexPair.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\GetMatchIndexPair.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function GetMatchIndexPair(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return [match['[[StartIndex]]'], match['[[EndIndex]]']];
};node_modules\es-abstract\2024\GetIteratorFromMethod.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\GetIteratorFromMethod.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/15.0/#sec-getiteratorfrommethod
module.exports = function GetIteratorFromMethod(obj, method) {
if (!IsCallable(method)) {
throw new $TypeError('method must be a function');
}
var iterator = Call(method, obj); // step 1
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object'); // step 2
}
var nextMethod = Get(iterator, 'next'); // step 3
return { // steps 4-5
'[[Iterator]]': iterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2024\GetIterator.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\GetIterator.js (Line 1:1 - Line 53:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true);
var inspect = require('object-inspect');
var hasSymbols = require('has-symbols')();
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateAsyncFromSyncIterator = require('./CreateAsyncFromSyncIterator');
var GetIteratorFromMethod = require('./GetIteratorFromMethod');
var GetMethod = require('./GetMethod');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
var getIteratorMethod = require('../helpers/getIteratorMethod');
// https://262.ecma-international.org/14.0/#sec-getiterator
module.exports = function GetIterator(obj, kind) {
if (kind !== 'SYNC' && kind !== 'ASYNC') {
throw new $TypeError("Assertion failed: `kind` must be one of 'sync' or 'async', got " + inspect(kind));
}
var method;
if (kind === 'ASYNC') { // step 1
if (hasSymbols && $asyncIterator) {
method = GetMethod(obj, $asyncIterator); // step 1.a
}
}
if (typeof method === 'undefined') { // step 1.b
// var syncMethod = GetMethod(obj, $iterator); // step 1.b.i
var syncMethod = getIteratorMethod(ES, obj);
if (kind === 'ASYNC') {
if (typeof syncMethod === 'undefined') {
throw new $TypeError('iterator method is `undefined`'); // step 1.b.ii
}
var syncIteratorRecord = GetIteratorFromMethod(obj, syncMethod); // step 1.b.iii
return CreateAsyncFromSyncIterator(syncIteratorRecord); // step 1.b.iv
}
method = syncMethod; // step 2, kind of
}
if (typeof method === 'undefined') {
throw new $TypeError('iterator method is `undefined`'); // step 3
}
return GetIteratorFromMethod(obj, method); // step 4
};node_modules\es-abstract\2024\GetArrayBufferMaxByteLengthOption.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\GetArrayBufferMaxByteLengthOption.js (Line 1:1 - Line 22:2)
'use strict';
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToIndex = require('./ToIndex');
// https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption
module.exports = function GetArrayBufferMaxByteLengthOption(options) {
if (!isObject(options)) {
return 'EMPTY'; // step 1
}
var maxByteLength = Get(options, 'maxByteLength'); // step 2
if (typeof maxByteLength === 'undefined') {
return 'EMPTY'; // step 3
}
return ToIndex(maxByteLength); // step 4
};node_modules\es-abstract\2024\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2024\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2024\FlattenIntoArray.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
// https://262.ecma-international.org/11.0/#sec-flattenintoarray
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = LengthOfArrayLike(element);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2024\FindViaPredicate.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\FindViaPredicate.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
var IsCallable = require('./IsCallable');
var ToString = require('./ToString');
// https://262.ecma-international.org/15.0/#sec-findviapredicate
module.exports = function FindViaPredicate(O, len, direction, predicate, thisArg) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: len must be a non-negative integer');
}
if (direction !== 'ascending' && direction !== 'descending' && direction !== 'DESCENDING' && direction !== 'ASCENDING') {
throw new $TypeError('Assertion failed: direction must be ~ASCENDING~ or ~DESCENDING~');
}
if (!IsCallable(predicate)) {
throw new $TypeError('predicate must be callable'); // step 1
}
for ( // steps 2-4
var k = direction === 'ascending' || direction === 'ASCENDING' ? 0 : len - 1;
direction === 'ascending' || direction === 'ASCENDING' ? k < len : k >= 0;
k += 1
) {
var Pk = ToString(k); // step 4.a
var kValue = Get(O, Pk); // step 4.c
var testResult = Call(predicate, thisArg, [kValue, k, O]); // step 4.d
if (ToBoolean(testResult)) {
return { '[[Index]]': k, '[[Value]]': kValue }; // step 4.e
}
}
return { '[[Index]]': -1, '[[Value]]': void undefined }; // step 5
};node_modules\es-abstract\2024\EnumerableOwnProperties.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/14.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnProperties(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2024\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2024\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2024\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2024\DefineMethodProperty.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\DefineMethodProperty.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-definemethodproperty
module.exports = function DefineMethodProperty(homeObject, key, closure, enumerable) {
if (!isObject(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an Object');
}
if (!isPropertyKey(key)) {
throw new $TypeError('Assertion failed: `key` is not a Property Key or a Private Name');
}
if (typeof closure !== 'function') {
throw new $TypeError('Assertion failed: `closure` is not a function');
}
if (typeof enumerable !== 'boolean') {
throw new $TypeError('Assertion failed: `enumerable` is not a Boolean');
}
// 1. Assert: homeObject is an ordinary, extensible object with no non-configurable properties.
if (!IsExtensible(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an ordinary, extensible object, with no non-configurable properties');
}
// 2. If key is a Private Name, then
// a. Return PrivateElement { [[Key]]: key, [[Kind]]: method, [[Value]]: closure }.
// 3. Else,
var desc = { // step 3.a
'[[Value]]': closure,
'[[Writable]]': true,
'[[Enumerable]]': enumerable,
'[[Configurable]]': true
};
DefinePropertyOrThrow(homeObject, key, desc); // step 3.b
};node_modules\es-abstract\2024\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2024\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2024\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2024\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2024\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2024\CreateRegExpStringIterator.js (Line 1:1 - Line 11:23), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 1:1 - Line 11:27)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateIterResultObjectnode_modules\es-abstract\2024\CreateRegExpStringIterator.js (Line 11:27 - Line 60:23), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 11:31 - Line 60:27)
);
var DefineMethodProperty = require('./DefineMethodProperty');
var Get = require('./Get');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var RegExpExec = require('./RegExpExec');
var Set = require('./Set');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var SLOT = require('internal-slot');
var setToStringTag = require('es-set-tostringtag');
var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {
if (typeof S !== 'string') {
throw new $TypeError('`S` must be a string');
}
if (typeof global !== 'boolean') {
throw new $TypeError('`global` must be a boolean');
}
if (typeof fullUnicode !== 'boolean') {
throw new $TypeError('`fullUnicode` must be a boolean');
}
SLOT.set(this, '[[IteratingRegExp]]', R);
SLOT.set(this, '[[IteratedString]]', S);
SLOT.set(this, '[[Global]]', global);
SLOT.set(this, '[[Unicode]]', fullUnicode);
SLOT.set(this, '[[Done]]', false);
};
if (IteratorPrototype) {
RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
}
var RegExpStringIteratorNext = function next() {
var O = this; // eslint-disable-line no-invalid-this
if (!isObject(O)) {
throw new $TypeError('receiver must be an object');
}
if (
!(O instanceof RegExpStringIterator)
|| !SLOT.has(O, '[[IteratingRegExp]]')
|| !SLOT.has(O, '[[IteratedString]]')
|| !SLOT.has(O, '[[Global]]')
|| !SLOT.has(O, '[[Unicode]]')
|| !SLOT.has(O, '[[Done]]')
) {
throw new $TypeError('"this" value must be a RegExpStringIterator instance');
}
if (SLOT.get(O, '[[Done]]')) {
return CreateIterResultObjectnode_modules\es-abstract\2024\CreateRegExpStringIterator.js (Line 60:23 - Line 69:23), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 60:27 - Line 69:27)
(undefined, true);
}
var R = SLOT.get(O, '[[IteratingRegExp]]');
var S = SLOT.get(O, '[[IteratedString]]');
var global = SLOT.get(O, '[[Global]]');
var fullUnicode = SLOT.get(O, '[[Unicode]]');
var match = RegExpExec(R, S);
if (match === null) {
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObjectnode_modules\es-abstract\2024\CreateRegExpStringIterator.js (Line 69:23 - Line 78:23), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 69:27 - Line 78:27)
(undefined, true);
}
if (global) {
var matchStr = ToString(Get(match, '0'));
if (matchStr === '') {
var thisIndex = ToLength(Get(R, 'lastIndex'));
var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);
Set(R, 'lastIndex', nextIndex, true);
}
return CreateIterResultObjectnode_modules\es-abstract\2024\CreateRegExpStringIterator.js (Line 81:23 - Line 101:2), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 81:27 - Line 101:2)
(match, false);
};
DefineMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext, false);
if (hasSymbols) {
setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');
if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {
var iteratorFn = function SymbolIterator() {
return this;
};
DefineMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn, false);
}
}
// https://262.ecma-international.org/15.0/#sec-createregexpstringiterator
module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {
// assert R.global === global && R.unicode === fullUnicode?
return new RegExpStringIterator(R, S, global, fullUnicode);
};node_modules\es-abstract\2024\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow
module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefinePropertyOrThrow(O, P, newDesc);
};node_modules\es-abstract\2024\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2024\CreateDataPropertyOrThrow.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\CreateDataPropertyOrThrow.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/14.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
};node_modules\es-abstract\2024\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2024\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 12:23), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 12:27)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObjectnode_modules\es-abstract\2024\CreateAsyncFromSyncIterator.js (Line 12:27 - Line 62:23), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 12:31 - Line 62:27)
);
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var isIteratorRecord = require('../helpers/records/iterator-record');
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord, value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObjectnode_modules\es-abstract\2024\CreateAsyncFromSyncIterator.js (Line 62:23 - Line 118:76), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 62:27 - Line 118:76)
(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/15.0/#sec-createasyncfromsynciteratornode_modules\es-abstract\2024\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2)
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
if (!isIteratorRecord(syncIteratorRecord)) {
throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
}
// var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2024\CopyDataProperties.js (Line 1:1 - Line 69:2), node_modules\es-abstract\2025\CopyDataProperties.js (Line 1:1 - Line 69:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var forEach = require('../helpers/forEach');
var every = require('../helpers/every');
var some = require('../helpers/some');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var keys = OwnPropertyKeys(from);
forEach(keys, function (nextKey) {
var excluded = some(excludedItems, function (e) {
return SameValue(e, nextKey) === true;
});
/*
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
*/
var enumerable = $isEnumerable(from, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& isInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(from, nextKey);
CreateDataPropertyOrThrow(target, nextKey, propValue);
}
});
return target;
};node_modules\es-abstract\2024\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2024\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2024\CompareTypedArrayElements.js (Line 1:1 - Line 60:2), node_modules\es-abstract\2025\CompareTypedArrayElements.js (Line 1:1 - Line 60:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparetypedarrayelements
module.exports = function CompareTypedArrayElements(x, y, compareFn) {
if ((typeof x !== 'number' && typeof x !== 'bigint') || typeof x !== typeof y) {
throw new $TypeError('Assertion failed: `x` and `y` must be either a BigInt or a Number, and both must be the same type');
}
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof compareFn !== 'undefined') { // step 2
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 2.a
if (isNaN(v)) {
return 0; // step 2.b
}
return v; // step 2.c
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN && yNaN) {
return 0; // step 3
}
if (xNaN) {
return 1; // step 4
}
if (yNaN) {
return -1; // step 5
}
if (x < y) {
return -1; // step 6
}
if (x > y) {
return 1; // step 7
}
if (SameValue(x, -0) && SameValue(y, 0)) {
return -1; // step 8
}
if (SameValue(x, 0) && SameValue(y, -0)) {
return 1; // step 9
}
return 0; // step 10
};node_modules\es-abstract\2024\CompareArrayElements.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\CompareArrayElements.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsLessThan = require('./IsLessThan');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparearrayelements
module.exports = function CompareArrayElements(x, y, compareFn) {
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof x === 'undefined' && typeof y === 'undefined') {
return 0; // step 1
}
if (typeof x === 'undefined') {
return 1; // step 2
}
if (typeof y === 'undefined') {
return -1; // step 3
}
if (typeof compareFn !== 'undefined') { // step 4
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 4.a
if (isNaN(v)) {
return 0; // step 4.b
}
return v; // step 4.c
}
var xString = ToString(x); // step 5
var yString = ToString(y); // step 6
var xSmaller = IsLessThan(xString, yString, true); // step 7
if (xSmaller) {
return -1; // step 8
}
var ySmaller = IsLessThan(yString, xString, true); // step 9
if (ySmaller) {
return 1; // step 10
}
return 0; // step 11
};node_modules\es-abstract\2024\CodePointsToString.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CodePointsToString.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-codepointstostring
module.exports = function CodePointsToString(text) {
if (!IsArray(text)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
var result = '';
forEach(text, function (cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
result += UTF16EncodeCodePoint(cp);
});
return result;
};node_modules\es-abstract\2024\CodePointAt.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\CodePointAt.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');
var $charAt = callBound('String.prototype.charAt');
var $charCodeAt = callBound('String.prototype.charCodeAt');
// https://262.ecma-international.org/12.0/#sec-codepointat
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),
'[[CodeUnitCount]]': 2,
'[[IsUnpairedSurrogate]]': false
};
};node_modules\es-abstract\2024\CloneArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\CloneArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsConstructor = require('./IsConstructor');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf');
var isInteger = require('math-intrinsics/isInteger');
var isArrayBuffer = require('is-array-buffer');
var arrayBufferSlice = require('arraybuffer.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-clonearraybuffer
module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) {
if (!isArrayBuffer(srcBuffer)) {
throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance');
}
if (!isInteger(srcByteOffset) || srcByteOffset < 0) {
throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer');
}
if (!isInteger(srcLength) || srcLength < 0) {
throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer');
}
if (!IsConstructor(cloneConstructor)) {
throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor');
}
// 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength).
var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda
if (IsDetachedBuffer(srcBuffer)) {
throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4
}
/*
5. Let srcBlock be srcBuffer.[[ArrayBufferData]].
6. Let targetBlock be targetBuffer.[[ArrayBufferData]].
7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength).
*/
var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7
OrdinarySetPrototypeOf(targetBuffer, proto); // step 3
return targetBuffer; // step 8
};node_modules\es-abstract\2024\clamp.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\clamp.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var max = require('math-intrinsics/max');
var min = require('math-intrinsics/min');
// https://262.ecma-international.org/12.0/#clamping
module.exports = function clamp(x, lower, upper) {
if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) {
throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`');
}
return min(max(lower, x), upper);
};node_modules\es-abstract\2024\CharacterRange.js (Line 1:1 - Line 12:7), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 12:100)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
modulenode_modules\es-abstract\2024\CharacterRange.js (Line 41:2 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 35:2 - Line 47:2)
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2024\CharacterComplement.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\CharacterComplement.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var AllCharacters = require('./AllCharacters');
var CharSet = require('../helpers/CharSet').CharSet;
var isRegExpRecord = require('../helpers/records/regexp-record');
// https://262.ecma-international.org/15.0/#sec-charactercomplement
module.exports = function CharacterComplement(rer, S) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (!(S instanceof CharSet)) {
throw new $TypeError('Assertion failed: S must be a CharSet');
}
var A = AllCharacters(rer); // step 1
// 2. Return the CharSet containing the CharSetElements of A which are not also CharSetElements of S.
return new CharSet(
function (x) { return !S.test(x) && A.test(x); },
function (emit) {
A.yield(function (x) {
if (!S.test(x)) {
emit(x);
}
});
}
);
};node_modules\es-abstract\2024\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2024\Canonicalize.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\Canonicalize.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var isRegExpRecord = require('../helpers/records/regexp-record');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(rer, ch) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (rer['[[Unicode]]'] && rer['[[IgnoreCase]]']) { // step 1
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 1.b
}
if (!rer['[[IgnoreCase]]']) {
return ch; // step 2
}
var u = $toUpperCase(ch); // step 5
if (u.length !== 1) {
return ch; // step 7
}
var cu = u; // step 8
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 9
}
return cu; // step 10
};node_modules\es-abstract\2024\CanBeHeldWeakly.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\CanBeHeldWeakly.js (Line 1:1 - Line 17:2)
'use strict';
var isObject = require('es-object-atoms/isObject');
var KeyForSymbol = require('./KeyForSymbol');
// https://262.ecma-international.org/14.0/#sec-canbeheldweakly
module.exports = function CanBeHeldWeakly(v) {
if (isObject(v)) {
return true; // step 1
}
if (typeof v === 'symbol' && typeof KeyForSymbol(v) === 'undefined') {
return true; // step 2
}
return false; // step 3
};node_modules\es-abstract\2024\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2024\ByteListEqual.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\ByteListEqual.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistequal
module.exports = function ByteListEqual(xBytes, yBytes) {
if (!IsArray(xBytes) || !IsArray(yBytes)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xBytes.length !== yBytes.length) {
return false;
}
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xByte !== yByte) {
return false;
}
}
return true;
};node_modules\es-abstract\2024\ByteListBitwiseOp.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\ByteListBitwiseOp.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop
module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) {
if (op !== '&' && op !== '^' && op !== '|') {
throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`');
}
if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var result = [];
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var resultByte;
if (op === '&') {
resultByte = xByte & yByte;
} else if (op === '^') {
resultByte = xByte ^ yByte;
} else {
resultByte = xByte | yByte;
}
result[result.length] = resultByte;
}
return result;
};node_modules\es-abstract\2024\BinaryXor.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryXor.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};node_modules\es-abstract\2024\BinaryOr.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryOr.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x | y;
};node_modules\es-abstract\2024\BinaryAnd.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryAnd.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryand
module.exports = function BinaryAnd(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x & y;
};node_modules\es-abstract\2024\BigIntBitwiseOp.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2025\BigIntBitwiseOp.js (Line 1:1 - Line 63:2)
'use strict';
var $TypeError = require('es-errors/type');
// var $BigInt = GetIntrinsic('%BigInt%', true);
// var $pow = require('math-intrinsics/pow');
// var BinaryAnd = require('./BinaryAnd');
// var BinaryOr = require('./BinaryOr');
// var BinaryXor = require('./BinaryXor');
// var modulo = require('./modulo');
// var zero = $BigInt && $BigInt(0);
// var negOne = $BigInt && $BigInt(-1);
// var two = $BigInt && $BigInt(2);
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
module.exports = function BigIntBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('`x` and `y` must be BigInts');
}
if (op === '&') {
return x & y;
}
if (op === '|') {
return x | y;
}
return x ^ y;
/*
var result = zero;
var shift = 0;
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
var xDigit = modulo(x, two);
var yDigit = modulo(y, two);
if (op === '&') {
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
} else if (op === '|') {
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
} else if (op === '^') {
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
}
shift += 1;
x = (x - xDigit) / two;
y = (y - yDigit) / two;
}
var tmp;
if (op === '&') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else if (op === '|') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else {
tmp = BinaryXor(modulo(x, two), modulo(y, two));
}
if (tmp !== 0) {
result -= $pow(2, shift);
}
return result;
*/
};node_modules\es-abstract\2024\AsyncIteratorClose.js (Line 1:1 - Line 70:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 70:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/15.0/#sec-asynciteratorclose
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return $then(
$then(
$then(
new $Promise(function (resolve) {
resolve(GetMethod(iterator, 'return')); // step 4
// resolve(Call(ret, iterator, [])); // step 6
}),
function (returnV) { // step 5.a
if (typeof returnV === 'undefined') {
return completion; // step 5.b
}
return Call(returnV, iterator); // step 5.c, 5.d.
}
),
null,
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 6
} else {
throw e; // step 7
}
}
),
function (innerResult) { // step 8
if (completion.type() === 'throw') {
completion['?'](); // step 6
}
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
}
);
};node_modules\es-abstract\2024\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 12:23), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 12:27)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObjectnode_modules\es-abstract\2024\AsyncFromSyncIteratorContinuation.js (Line 21:1 - Line 41:23), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 21:1 - Line 41:27)
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObjectnode_modules\es-abstract\2024\ArraySpeciesCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\ArraySpeciesCreate.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var ArrayCreate = require('./ArrayCreate');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var isArray = IsArray(originalArray);
if (!isArray) {
return ArrayCreate(length);
}
var C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
if (typeof C === 'undefined') {
return ArrayCreate(length);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(length); // Construct(C, length);
};node_modules\es-abstract\2024\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2024\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/12.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 3, 5
if (proto !== $ArrayPrototype) { // step 4
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 6
A.length = length;
}
/* step 6, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2024\ArrayBufferCopyAndDetach.js (Line 1:1 - Line 101:2), node_modules\es-abstract\2025\ArrayBufferCopyAndDetach.js (Line 1:1 - Line 101:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var min = require('math-intrinsics/min');
var $TypeError = require('es-errors/type');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var callBound = require('call-bound');
var byteLength = require('array-buffer-byte-length');
var $maxByteLength = callBound('%ArrayBuffer.prototype.maxByteLength%', true);
var copy = function copyAB(src, start, end) {
var that = new $Uint8Array(src);
if (typeof end === 'undefined') {
end = that.length; // eslint-disable-line no-param-reassign
}
var result = new $ArrayBuffer(end - start);
var resultArray = new $Uint8Array(result);
for (var i = 0; i < resultArray.length; i++) {
resultArray[i] = that[i + start];
}
return result;
};
var $abSlice = callBound('%ArrayBuffer.prototype.slice%', true)
|| function slice(ab, a, b) { // in node < 0.11, slice is an own nonconfigurable property
return ab.slice ? ab.slice(a, b) : copy(ab, a, b); // node 0.8 lacks `slice`
};
var DetachArrayBuffer = require('./DetachArrayBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var ToIndex = require('./ToIndex');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/15.0/#sec-arraybuffercopyanddetach
module.exports = function ArrayBufferCopyAndDetach(arrayBuffer, newLength, preserveResizability) {
if (preserveResizability !== 'PRESERVE-RESIZABILITY' && preserveResizability !== 'FIXED-LENGTH') {
throw new $TypeError('`preserveResizability` must be ~PRESERVE-RESIZABILITY~ or ~FIXED-LENGTH~');
}
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('`arrayBuffer` must be a non-shared ArrayBuffer'); // steps 1 - 2
}
var abByteLength;
var newByteLength;
if (typeof newLength === 'undefined') { // step 3
newByteLength = byteLength(arrayBuffer); // step 3.a
abByteLength = newByteLength;
} else { // step 4
newByteLength = ToIndex(newLength); // step 4.a
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('`arrayBuffer` must not be detached'); // step 5
}
var newMaxByteLength;
if (preserveResizability === 'PRESERVE-RESIZABILITY' && !IsFixedLengthArrayBuffer(arrayBuffer)) { // step 6
newMaxByteLength = $maxByteLength(arrayBuffer); // step 6.a
} else { // step 7
newMaxByteLength = 'EMPTY'; // step 7.a
}
// commented out since there's no way to set or access this key
// 8. If arrayBuffer.[[ArrayBufferDetachKey]] is not undefined, throw a TypeError exception.
// 9. Let newBuffer be ? AllocateArrayBuffer(%ArrayBuffer%, newByteLength, newMaxByteLength).
var newBuffer = newMaxByteLength === 'EMPTY' ? new $ArrayBuffer(newByteLength) : new $ArrayBuffer(newByteLength, { maxByteLength: newMaxByteLength });
if (typeof abByteLength !== 'number') {
abByteLength = byteLength(arrayBuffer);
}
var copyLength = min(newByteLength, abByteLength); // step 10
if (newByteLength > copyLength || newMaxByteLength !== 'EMPTY') {
var taNew = new $Uint8Array(newBuffer);
var taOld = new $Uint8Array(arrayBuffer);
for (var i = 0; i < copyLength; i++) {
taNew[i] = taOld[i];
}
} else {
newBuffer = $abSlice(arrayBuffer, 0, copyLength); // ? optimization for when the new buffer will not be larger than the old one
}
/*
11. Let fromBlock be arrayBuffer.[[ArrayBufferData]].
12. Let toBlock be newBuffer.[[ArrayBufferData]].
13. Perform CopyDataBlockBytes(toBlock, 0, fromBlock, 0, copyLength).
14. NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations may implement this method as a zero-copy move or a realloc.
*/
DetachArrayBuffer(arrayBuffer); // step 15
return newBuffer; // step 16
};node_modules\es-abstract\2024\ArrayBufferByteLength.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\ArrayBufferByteLength.js (Line 1:1 - Line 41:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/15.0/#sec-arraybufferbytelength
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var arrayBufferByteLength = require('array-buffer-byte-length');
var callBound = require('call-bound');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
var isGrowable = false; // TODO: support this
module.exports = function ArrayBufferByteLength(arrayBuffer, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (order !== 'SEQ-CST' && order !== 'UNORDERED') {
throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~');
}
// 1. If IsSharedArrayBuffer(arrayBuffer) is true and arrayBuffer has an [[ArrayBufferByteLengthData]] internal slot, then
// TODO: see if IsFixedLengthArrayBuffer can be used here in the spec instead
if (isSAB && isGrowable) { // step 1
// a. Let bufferByteLengthBlock be arrayBuffer.[[ArrayBufferByteLengthData]].
// b. Let rawLength be GetRawBytesFromSharedBlock(bufferByteLengthBlock, 0, BIGUINT64, true, order).
// c. Let isLittleEndian be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
// d. Return ℝ(RawBytesToNumeric(BIGUINT64, rawLength, isLittleEndian)).
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must not be detached'); // step 2
}
return isSAB ? $sabByteLength(arrayBuffer) : arrayBufferByteLength(arrayBuffer);
};node_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 9:9 - Line 36:83), node_modules\es-abstract\2025\ApplyStringOrNumericBinaryOperator.js (Line 9:13 - Line 36:101)
);
var NumberAdd = require('./Number/add');
var NumberBitwiseAND = require('./Number/bitwiseAND');
var NumberBitwiseOR = require('./Number/bitwiseOR');
var NumberBitwiseXOR = require('./Number/bitwiseXOR');
var NumberDivide = require('./Number/divide');
var NumberExponentiate = require('./Number/exponentiate');
var NumberLeftShift = require('./Number/leftShift');
var NumberMultiply = require('./Number/multiply');
var NumberRemainder = require('./Number/remainder');
var NumberSignedRightShift = require('./Number/signedRightShift');
var NumberSubtract = require('./Number/subtract');
var NumberUnsignedRightShift = require('./Number/unsignedRightShift');
var BigIntAdd = require('./BigInt/add');
var BigIntBitwiseAND = require('./BigInt/bitwiseAND');
var BigIntBitwiseOR = require('./BigInt/bitwiseOR');
var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR');
var BigIntDivide = require('./BigInt/divide');
var BigIntExponentiate = require('./BigInt/exponentiate');
var BigIntLeftShift = require('./BigInt/leftShift');
var BigIntMultiply = require('./BigInt/multiply');
var BigIntRemainder = require('./BigInt/remainder');
var BigIntSignedRightShift = require('./BigInt/signedRightShift');
var BigIntSubtract = require('./BigInt/subtract');
var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift');
// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperatornode_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 39:1 - Line 54:7), node_modules\es-abstract\2025\ApplyStringOrNumericBinaryOperator.js (Line 37:1 - Line 52:83)
var table = {
'**': [NumberExponentiate, BigIntExponentiate],
'*': [NumberMultiply, BigIntMultiply],
'/': [NumberDivide, BigIntDivide],
'%': [NumberRemainder, BigIntRemainder],
'+': [NumberAdd, BigIntAdd],
'-': [NumberSubtract, BigIntSubtract],
'<<': [NumberLeftShift, BigIntLeftShift],
'>>': [NumberSignedRightShift, BigIntSignedRightShift],
'>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift],
'&': [NumberBitwiseAND, BigIntBitwiseAND],
'^': [NumberBitwiseXOR, BigIntBitwiseXOR],
'|': [NumberBitwiseOR, BigIntBitwiseOR]
};
modulenode_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 54:1 - Line 72:5), node_modules\es-abstract\2025\ApplyStringOrNumericBinaryOperator.js (Line 54:1 - Line 72:2)
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
if (typeof opText !== 'string' || !HasOwnProperty(table, opText)) {
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
}
if (opText === '+') {
var lprim = ToPrimitive(lval);
var rprim = ToPrimitive(rval);
if (typeof lprim === 'string' || typeof rprim === 'string') {
var lstr = ToString(lprim);
var rstr = ToString(rprim);
return lstr + rstr;
}
/* eslint no-param-reassign: 1 */
lval = lprim;
rval = rprim;
}
var lnum = ToNumeric(lval);
var rnum = ToNumeric(rval);
if (Typenode_modules\es-abstract\2024\AllCharacters.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\AllCharacters.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var HasEitherUnicodeFlag = require('./HasEitherUnicodeFlag');
var isRegExpRecord = require('../helpers/records/regexp-record');
var CharSet = require('../helpers/CharSet');
// https://262.ecma-international.org/15.0/#sec-allcharacters
module.exports = function AllCharacters(rer) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (rer['[[UnicodeSets]]'] && rer['[[IgnoreCase]]']) { // step 1
// 1. Return the CharSet containing all Unicode code points _c_ that do not have a <a href="https://www.unicode.org/reports/tr44/#Simple_Case_Folding">Simple Case Folding</a> mapping (that is, scf(_c_)=_c_).
return CharSet.getNonSimpleCaseFoldingCodePoints(); // step 1.a
} else if (HasEitherUnicodeFlag(rer)) { // step 2
// 1. Return the CharSet containing all code point values.
return CharSet.getCodePoints(); // step 3.a
// eslint-disable-next-line no-else-return
} else { // step 3
// 1. Return the CharSet containing all code unit values.
return CharSet.getCodeUnits(); // step 3.a
}
};node_modules\es-abstract\2024\AdvanceStringIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 1:1 - Line 30:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
// https://262.ecma-international.org/12.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var cp = CodePointAt(S, index);
return index + cp['[[CodeUnitCount]]'];
};node_modules\es-abstract\2024\AddValueToKeyedGroup.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AddValueToKeyedGroup.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var IsArray = require('../helpers/IsArray');
var every = require('../helpers/every');
var forEach = require('../helpers/forEach');
var hasOwn = require('hasown');
var isKeyedGroup = function (group) {
return hasOwn(group, '[[Key]]')
&& hasOwn(group, '[[Elements]]')
&& IsArray(group['[[Elements]]']);
};
// https://262.ecma-international.org/15.0/#sec-add-value-to-keyed-group
module.exports = function AddValueToKeyedGroup(groups, key, value) {
if (!IsArray(groups) || (groups.length > 0 && !every(groups, isKeyedGroup))) {
throw new $TypeError('Assertion failed: `groups` must be a List of Records with [[Key]] and [[Elements]]');
}
var matched = 0;
forEach(groups, function (g) { // step 1
if (SameValue(g['[[Key]]'], key)) { // step 2
matched += 1;
if (matched > 1) {
throw new $TypeError('Assertion failed: Exactly one element of groups meets this criterion'); // step 2.a
}
var arr = g['[[Elements]]'];
arr[arr.length] = value; // step 2.b
}
});
if (matched === 0) {
var group = { '[[Key]]': key, '[[Elements]]': [value] }; // step 2
// eslint-disable-next-line no-param-reassign
groups[groups.length] = group; // step 3
}
};node_modules\es-abstract\2024\AddToKeptObjects.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\AddToKeptObjects.js (Line 1:1 - Line 18:2)
'use strict';
var SLOT = require('internal-slot');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var ClearKeptObjects = require('./ClearKeptObjects');
// https://262.ecma-international.org/12.0/#sec-addtokeptobjects
module.exports = function AddToKeptObjects(object) {
if (!isObject(object)) {
throw new $TypeError('Assertion failed: `object` must be an Object');
}
var arr = SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]');
arr[arr.length] = object;
};node_modules\es-abstract\2024\AddEntriesFromIterable.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 44:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/15.0/#sec-add-entries-from-iterable
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable, 'SYNC');
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2023\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2023\WordCharacters.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 47:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var isRegExpRecord = require('../helpers/records/regexp-record');
var OwnPropertyKeys = require('own-keys');
var basicWordChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(rer) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
var extraWordChars = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(basicWordChars, c) === -1 // c not in A
&& $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A
) {
extraWordChars += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(basicWordChars, c) === -1 // c not in A
&& $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A
) {
extraWordChars += caseFolding.S[c]; // step 3
}
});
if ((!rer['[[Unicode]]'] || !rer['[[IgnoreCase]]']) && extraWordChars.length > 0) {
throw new $TypeError('Assertion failed: `extraWordChars` must be empty when `rer.[[IgnoreCase]]` and `rer.[[Unicode]]` are not both true'); // step 3
}
return basicWordChars + extraWordChars; // step 4
};node_modules\es-abstract\2023\WeakRefDeref.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\WeakRefDeref.js (Line 1:1 - Line 23:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var $deref = callBound('WeakRef.prototype.deref', true);
var isWeakRef = require('is-weakref');
var AddToKeptObjects = require('./AddToKeptObjects');
// https://262.ecma-international.org/12.0/#sec-weakrefderef
module.exports = function WeakRefDeref(weakRef) {
if (!isWeakRef(weakRef)) {
throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef');
}
var target = $deref(weakRef);
if (target) {
AddToKeptObjects(target);
}
return target;
};node_modules\es-abstract\2023\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2), node_modules\es-abstract\2025\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor
// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof current === 'undefined') { // step 2
if (!extensible) {
return false; // step 2.a
}
if (typeof O === 'undefined') {
return true; // step 2.b
}
if (IsAccessorDescriptor(Desc)) { // step 2.c
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
// step 2.d
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!Desc['[[Configurable]]'],
'[[Enumerable]]': !!Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': !!Desc['[[Writable]]']
}
);
}
// 3. Assert: current is a fully populated Property Descriptor.
if (
!isFullyPopulatedPropertyDescriptor(
{
IsAccessorDescriptor: IsAccessorDescriptor,
IsDataDescriptor: IsDataDescriptor
},
current
)
) {
throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor');
}
// 4. If every field in Desc is absent, return true.
// this can't really match the assertion that it's a Property Descriptor in our JS implementation
// 5. If current.[[Configurable]] is false, then
if (!current['[[Configurable]]']) {
if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) {
// step 5.a
return false;
}
if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) {
// step 5.b
return false;
}
if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) {
// step 5.c
return false;
}
if (IsAccessorDescriptor(current)) { // step 5.d
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
} else if (!current['[[Writable]]']) { // step 5.e
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
}
}
// 6. If O is not undefined, then
if (typeof O !== 'undefined') {
var configurable;
var enumerable;
if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'],
'[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]']
}
);
} else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) {
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'],
'[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]']
}
);
}
// For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true; // step 7
};node_modules\es-abstract\2023\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2023\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-utf16encoding
module.exports = function UTF16EncodeCodePoint(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2023\UnicodeEscape.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UnicodeEscape.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/11.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start');
};node_modules\es-abstract\2023\TypedArraySpeciesCreate.js (Line 1:1 - Line 11:17), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 11:32)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreatenode_modules\es-abstract\2023\TypedArraySpeciesCreate.js (Line 17:1 - Line 36:17), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 17:1 - Line 36:32)
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreatenode_modules\es-abstract\2023\TypedArrayElementType.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementType.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementType(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var result = tableTAO.name['$' + type];
if (typeof result !== 'string') {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return result;
};node_modules\es-abstract\2023\TypedArrayElementSize.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementSize.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementSize(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var size = tableTAO.size['$' + tableTAO.name['$' + type]];
if (!isInteger(size) || size < 0) {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return size;
};node_modules\es-abstract\2023\TypedArrayCreateSameType.js (Line 16:1 - Line 34:17), node_modules\es-abstract\2025\TypedArrayCreateSameType.js (Line 16:1 - Line 34:32)
module.exports = function TypedArrayCreateSameType(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var constructor = getConstructor(kind); // step 2
if (typeof constructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
return TypedArrayCreatenode_modules\es-abstract\2023\TypedArrayCreate.js (Line 15:17 - Line 38:19), node_modules\es-abstract\2025\TypedArrayCreateFromConstructor.js (Line 16:32 - Line 39:4)
(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArraynode_modules\es-abstract\2023\Type.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\Type.js (Line 1:1 - Line 15:2)
'use strict';
var ES5Type = require('../5/Type');
// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
module.exports = function Type(x) {
if (typeof x === 'symbol') {
return 'Symbol';
}
if (typeof x === 'bigint') {
return 'BigInt';
}
return ES5Type(x);
};node_modules\es-abstract\2023\truncate.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\truncate.js (Line 1:1 - Line 15:2)
'use strict';
var floor = require('./floor');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/14.0/#eqn-truncate
module.exports = function truncate(x) {
if (typeof x !== 'number' && typeof x !== 'bigint') {
throw new $TypeError('argument must be a Number or a BigInt');
}
var result = x < 0 ? -floor(-x) : floor(x);
return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2023\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2023\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $RangeError = require('es-errors/range');
var isInteger = require('math-intrinsics/isInteger');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring
module.exports = function ToZeroPaddedDecimalString(n, minLength) {
if (!isInteger(n) || n < 0) {
throw new $RangeError('Assertion failed: `q` must be a non-negative integer');
}
var S = $String(n);
return StringPad(S, minLength, '0', 'start');
};node_modules\es-abstract\2023\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
// https://262.ecma-international.org/14.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int8bit = modulo(int, 0x100);
return int8bit;
};node_modules\es-abstract\2023\ToUint32.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToUint32.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-touint32
var two32 = 0x100000000; // Math.pow(2, 32);
module.exports = function ToUint32(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int32bit = modulo(int, two32);
return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2023\ToUint16.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToUint16.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-touint16
var two16 = 0x10000; // Math.pow(2, 16)
module.exports = function ToUint16(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int16bit = modulo(int, two16);
return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2023\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2023\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2023\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2023\ToNumeric.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToNumeric.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/11.0/#sec-tonumeric
module.exports = function ToNumeric(argument) {
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof primValue === 'bigint') {
return primValue;
}
return ToNumber(primValue);
};node_modules\es-abstract\2023\ToNumber.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\ToNumber.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var StringToNumber = require('./StringToNumber');
// https://262.ecma-international.org/13.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
return StringToNumber(value);
}
return +value;
};node_modules\es-abstract\2023\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2023\ToIntegerOrInfinity.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\ToIntegerOrInfinity.js (Line 1:1 - Line 16:2)
'use strict';
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity
module.exports = function ToIntegerOrInfinity(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0) { return 0; }
if (!$isFinite(number)) { return number; }
return truncate(number);
};node_modules\es-abstract\2023\ToInt8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToInt8.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint8
module.exports = function ToInt8(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int8bit = modulo(int, 0x100);
return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
};node_modules\es-abstract\2023\ToInt32.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToInt32.js (Line 1:1 - Line 23:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint32
var two31 = 0x80000000; // Math.pow(2, 31);
var two32 = 0x100000000; // Math.pow(2, 32);
module.exports = function ToInt32(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int32bit = modulo(int, two32);
var result = int32bit >= two31 ? int32bit - two32 : int32bit;
return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here
};node_modules\es-abstract\2023\ToInt16.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToInt16.js (Line 1:1 - Line 21:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
var isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-toint16
var two16 = 0x10000; // Math.pow(2, 16);
module.exports = function ToInt16(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int16bit = modulo(int, two16);
return int16bit >= 0x8000 ? int16bit - two16 : int16bit;
};node_modules\es-abstract\2023\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2023\ToBigUint64.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobiguint64
module.exports = function ToBigUint64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit;
};node_modules\es-abstract\2023\ToBigInt64.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31)));
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobigint64
module.exports = function ToBigInt64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit;
};node_modules\es-abstract\2023\ToBigInt.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2025\ToBigInt.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var StringToBigInt = require('./StringToBigInt');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/13.0/#sec-tobigint
module.exports = function ToBigInt(argument) {
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
var prim = ToPrimitive(argument, $Number);
if (prim == null) {
throw new $TypeError('Cannot convert null or undefined to a BigInt');
}
if (typeof prim === 'boolean') {
return prim ? $BigInt(1) : $BigInt(0);
}
if (typeof prim === 'number') {
throw new $TypeError('Cannot convert a Number value to a BigInt');
}
if (typeof prim === 'string') {
var n = StringToBigInt(prim);
if (typeof n === 'undefined') {
throw new $TypeError('Failed to parse String to BigInt');
}
return n;
}
if (typeof prim === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a BigInt');
}
if (typeof prim !== 'bigint') {
throw new $SyntaxError('Assertion failed: unknown primitive type');
}
return prim;
};node_modules\es-abstract\2023\TimeZoneString.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\TimeZoneString.js (Line 1:1 - Line 41:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/14.0/#sec-timezoneestring
module.exports = function TimeZoneString(tv) {
if (!isInteger(tv)) {
throw new $TypeError('Assertion failed: `tv` must be an integral Number');
}
// 1. Let localTimeZone be DefaultTimeZone().
// 2. If IsTimeZoneOffsetString(localTimeZone) is true, then
// a. Let offsetNs be ParseTimeZoneOffsetString(localTimeZone).
// 3. Else,
// a. Let offsetNs be GetNamedTimeZoneOffsetNanoseconds(localTimeZone, ℤ(ℝ(tv) × 106)).
// 4. Let offset be 𝔽(truncate(offsetNs / 106)).
// 5. If offset is +0𝔽 or offset > +0𝔽, then
// a. Let offsetSign be "+".
// b. Let absOffset be offset.
// 6. Else,
// a. Let offsetSign be "-".
// b. Let absOffset be -offset.
// 7. Let offsetMin be ToZeroPaddedDecimalString(ℝ(MinFromTime(absOffset)), 2).
// 8. Let offsetHour be ToZeroPaddedDecimalString(ℝ(HourFromTime(absOffset)), 2).
// 9. Let tzName be an implementation-defined string that is either the empty String or the string-concatenation of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT PARENTHESIS), an implementation-defined timezone name, and the code unit 0x0029 (RIGHT PARENTHESIS).
// 10. Return the string-concatenation of offsetSign, offsetHour, offsetMin, and tzName.
// hack until DefaultTimeZone, IsTimeZoneOffsetString, ParseTimeZoneOffsetString, GetNamedTimeZoneOffsetNanoseconds, and "implementation-defined string" are available
var ts = $toTimeString(new $Date(tv));
return $slice(ts, $indexOf(ts, '(') + 1, $indexOf(ts, ')'));
};node_modules\es-abstract\2023\TimeString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\TimeString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
var ToZeroPaddedDecimalString = require('./ToZeroPaddedDecimalString');
// https://262.ecma-international.org/13.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = ToZeroPaddedDecimalString(HourFromTime(tv), 2); // step 1
var minute = ToZeroPaddedDecimalString(MinFromTime(tv), 2); // step 2
var second = ToZeroPaddedDecimalString(SecFromTime(tv), 2); // step 3
return hour + ':' + minute + ':' + second + ' GMT'; // step 4
};node_modules\es-abstract\2023\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2023\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2023\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2023\substring.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\substring.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#substring
module.exports = function substring(S, inclusiveStart, exclusiveEnd) {
if (typeof S !== 'string' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers');
}
return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length);
};node_modules\es-abstract\2023\StringToNumber.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\StringToNumber.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
var $TypeError = require('es-errors/type');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
// https://262.ecma-international.org/13.0/#sec-stringtonumber
module.exports = function StringToNumber(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` is not a String');
}
if (isBinary(argument)) {
return +$parseInteger($strSlice(argument, 2), 2);
}
if (isOctal(argument)) {
return +$parseInteger($strSlice(argument, 2), 8);
}
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
return NaN;
}
var trimmed = $trim(argument);
if (trimmed !== argument) {
return StringToNumber(trimmed);
}
return +argument;
};node_modules\es-abstract\2023\StringToCodePoints.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\StringToCodePoints.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var CodePointAt = require('./CodePointAt');
// https://262.ecma-international.org/12.0/#sec-stringtocodepoints
module.exports = function StringToCodePoints(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var codePoints = [];
var size = string.length;
var position = 0;
while (position < size) {
var cp = CodePointAt(string, position);
codePoints[codePoints.length] = cp['[[CodePoint]]'];
position += cp['[[CodeUnitCount]]'];
}
return codePoints;
};node_modules\es-abstract\2023\StringToBigInt.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\StringToBigInt.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
// https://262.ecma-international.org/14.0/#sec-stringtobigint
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return void undefined;
}
};node_modules\es-abstract\2023\StringIndexOf.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2024\StringIndexOf.js (Line 1:1 - Line 36:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-stringindexof
module.exports = function StringIndexOf(string, searchValue, fromIndex) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (typeof searchValue !== 'string') {
throw new $TypeError('Assertion failed: `searchValue` must be a String');
}
if (!isInteger(fromIndex) || fromIndex < 0) {
throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer');
}
var len = string.length;
if (searchValue === '' && fromIndex <= len) {
return fromIndex;
}
var searchLen = searchValue.length;
for (var i = fromIndex; i <= (len - searchLen); i += 1) {
var candidate = $slice(string, i, i + searchLen);
if (candidate === searchValue) {
return i;
}
}
return -1;
};node_modules\es-abstract\2023\StringGetOwnProperty.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var isPropertyKey = require('../helpers/isPropertyKey');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !isInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2023\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2023\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2023\SortIndexedProperties.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\SortIndexedProperties.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var ToString = require('./ToString');
var isAbstractClosure = require('../helpers/isAbstractClosure');
var $sort = callBound('Array.prototype.sort');
// https://262.ecma-international.org/14.0/#sec-sortindexedproperties
module.exports = function SortIndexedProperties(obj, len, SortCompare, holes) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(obj) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: `len` must be an integer >= 0');
}
if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) {
throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments');
}
if (holes !== 'skip-holes' && holes !== 'read-through-holes') {
throw new $TypeError('Assertion failed: `holes` must be either ~skip-holes~ or ~read-through-holes~');
}
var items = []; // step 1
var k = 0; // step 2
while (k < len) { // step 3
var Pk = ToString(k);
var kRead = holes === 'skip-holes' ? HasProperty(obj, Pk) : true; // step 3.b - 3.c
if (kRead) { // step 3.d
var kValue = Get(obj, Pk);
items[items.length] = kValue;
}
k += 1; // step 3.e
}
$sort(items, SortCompare); // step 4
return items; // step 5
};node_modules\es-abstract\2023\SetValueInBuffer.js (Line 1:1 - Line 23:65), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 1:1 - Line 23:65)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumericToRawBytes = require('./NumericToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/12.0/#sec-setvalueinbuffernode_modules\es-abstract\2023\SetValueInBuffer.js (Line 25:1 - Line 48:9), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 25:1 - Line 48:10)
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex) || byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst'node_modules\es-abstract\2023\SetValueInBuffer.js (Line 49:75 - Line 63:98), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 49:76 - Line 63:102)
);
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3
throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number'node_modules\es-abstract\2023\SetValueInBuffer.js (Line 63:98 - Line 92:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 63:102 - Line 92:2)
);
}
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
var elementSize = tableTAO.size['$' + type]; // step 5
// 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6
var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7
if (isSAB) { // step 8
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 10. Return NormalCompletion(undefined).
};node_modules\es-abstract\2023\SetTypedArrayFromArrayLike.js (Line 21:27 - Line 31:3), node_modules\es-abstract\2023\SetTypedArrayFromTypedArray.js (Line 27:28 - Line 37:4)
(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
ifnode_modules\es-abstract\2023\SetTypedArrayFromArrayLike.js (Line 41:7 - Line 64:25), node_modules\es-abstract\2025\SetTypedArrayFromArrayLike.js (Line 41:13 - Line 61:21)
); // step 3
var src = ToObject(source); // step 4
var srcLength = LengthOfArrayLike(src); // step 5
if (targetOffset === Infinity) {
throw new $RangeError('targetOffset must be a finite integer'); // step 6
}
if (srcLength + targetOffset > targetLength) {
throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 7
}
var k = 0; // step 8
while (k < srcLength) { // step 9
var Pk = ToString(k); // step 9.a
var value = Get(src, Pk); // step 9.b
var targetIndex = targetOffset + k; // step 9.c
IntegerIndexedElementSetnode_modules\es-abstract\2023\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2023\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2023\SetFunctionLength.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/12.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length !== Infinity && (!isInteger(length) || length < 0)) {
throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};node_modules\es-abstract\2023\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2023\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2023\SameValueNonNumber.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2024\SameValueNonNumber.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var Type = require('./Type');
// https://262.ecma-international.org/14.0/#sec-samevaluenonnumeric
module.exports = function SameValueNonNumber(x, y) {
if (typeof x === 'number') {
throw new $TypeError('Assertion failed: SameValueNonNumber does not accept Number values');
}
if (Type(x) !== Type(y)) {
throw new $TypeError('SameValueNonNumber requires two non-Number values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2023\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2023\RegExpHasFlag.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\RegExpHasFlag.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%');
var SameValue = require('./SameValue');
var $indexOf = callBound('String.prototype.indexOf');
var hasRegExpMatcher = require('is-regex');
var getFlags = require('regexp.prototype.flags');
// https://262.ecma-international.org/13.0/#sec-regexphasflag
module.exports = function RegExpHasFlag(R, codeUnit) {
if (typeof codeUnit !== 'string' || codeUnit.length !== 1) {
throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1');
}
if (!isObject(R)) {
throw new $TypeError('Assertion failed: Type(R) is not Object');
}
if (!hasRegExpMatcher(R)) { // step 2
if (SameValue(R, $RegExpPrototype)) {
return void undefined; // step 2.a
}
throw new $TypeError('`R` must be a RegExp object'); // step 2.b
}
var flags = getFlags(R); // step 3
return $indexOf(flags, codeUnit) > -1; // steps 4-5
};node_modules\es-abstract\2023\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2023\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2023\RawBytesToNumeric.js (Line 1:1 - Line 27:66), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 1:1 - Line 28:66)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#sec-rawbytestonumericnode_modules\es-abstract\2023\RawBytesToNumeric.js (Line 30:2 - Line 58:10), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 31:2 - Line 59:10)
!hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32'node_modules\es-abstract\2023\QuoteJSONString.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var StringToCodePoints = require('./StringToCodePoints');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var hasOwn = require('hasown');
// https://262.ecma-international.org/12.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(StringToCodePoints(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16EncodeCodePoint(cCharCode);
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2023\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2023\ParseHexOctet.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\ParseHexOctet.js (Line 1:1 - Line 40:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isInteger = require('math-intrinsics/isInteger');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-parsehexoctet
module.exports = function ParseHexOctet(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer');
}
var len = string.length; // step 1
if ((position + 2) > len) { // step 2
var error = new $SyntaxError('requested a position on a string that does not contain 2 characters at that position'); // step 2.a
return [error]; // step 2.b
}
var hexDigits = substring(string, position, position + 2); // step 3
var n = +('0x' + hexDigits);
if (isNaN(n)) {
return [new $SyntaxError('Invalid hexadecimal characters')];
}
return n;
/*
4. Let _parseResult_ be ParseText(StringToCodePoints(_hexDigits_), |HexDigits[~Sep]|).
5. If _parseResult_ is not a Parse Node, return _parseResult_.
6. Let _n_ be the unsigned 8-bit value corresponding with the MV of _parseResult_.
7. Return _n_.
*/
};node_modules\es-abstract\2023\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2023\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2023\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};node_modules\es-abstract\2023\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2023\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2023\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2023\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var hasOwn = require('hasown');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2023\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2023\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return OrdinaryObjectCreate(proto, slots);
};node_modules\es-abstract\2023\ObjectDefineProperties.js (Line 1:1 - Line 12:70), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 12:71)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefinepropertiesnode_modules\es-abstract\2023\ObjectDefineProperties.js (Line 19:2 - Line 26:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 17:2 - Line 24:2)
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [node_modules\es-abstract\2023\NumericToRawBytes.js (Line 1:1 - Line 22:78), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 1:1 - Line 22:78)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToBigInt64 = require('./ToBigInt64');
var ToBigUint64 = require('./ToBigUint64');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructorsnode_modules\es-abstract\2023\NumericToRawBytes.js (Line 38:1 - Line 49:10), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 39:1 - Line 50:10)
module.exports = function NumericToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32'node_modules\es-abstract\2023\NumericToRawBytes.js (Line 51:10 - Line 62:2), node_modules\es-abstract\2024\NumericToRawBytes.js (Line 51:10 - Line 62:2)
) { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2023\NumberToBigInt.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\NumberToBigInt.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-numbertobigint
module.exports = function NumberToBigInt(number) {
if (typeof number !== 'number') {
throw new $TypeError('Assertion failed: `number` must be a String');
}
if (!isInteger(number)) {
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt(number);
};node_modules\es-abstract\2023\NumberBitwiseOp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\NumberBitwiseOp.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};node_modules\es-abstract\2023\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2023\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2023\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2023\MakeTime.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\MakeTime.js (Line 1:1 - Line 23:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-maketime
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToIntegerOrInfinity(hour);
var m = ToIntegerOrInfinity(min);
var s = ToIntegerOrInfinity(sec);
var milli = ToIntegerOrInfinity(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2023\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2), node_modules\es-abstract\2025\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2)
'use strict';
var $TypeError = require('es-errors/type');
var ArrayCreate = require('./ArrayCreate');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var GetMatchIndexPair = require('./GetMatchIndexPair');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isMatchRecord = require('../helpers/records/match-record');
var isStringOrUndefined = function isStringOrUndefined(s) {
return typeof s === 'undefined' || typeof s === 'string';
};
var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) {
return typeof m === 'undefined' || isMatchRecord(m);
};
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) {
throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`');
}
if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`');
}
if (typeof hasGroups !== 'boolean') {
throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean');
}
var n = indices.length; // step 1
if (!(n < MAX_ARRAY_LENGTH)) {
throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1');
}
if (groupNames.length !== n - 1) {
throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`');
}
var A = ArrayCreate(n); // step 5
var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7
CreateDataPropertyOrThrow(A, 'groups', groups); // step 8
for (var i = 0; i < n; i += 1) { // step 9
var matchIndices = indices[i]; // step 9.a
// eslint-disable-next-line no-negated-condition
var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c
CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d
if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e
if (!groups) {
throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values');
}
CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i
}
}
return A; // step 10
};node_modules\es-abstract\2023\MakeDay.js (Line 1:1 - Line 36:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToIntegerOrInfinity(year);
var m = ToIntegerOrInfinity(month);
var dt = ToIntegerOrInfinity(date);
var ym = y + floor(m / 12);
if (!$isFinite(ym)) {
return NaN;
}
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2023\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2023\LengthOfArrayLike.js (Line 1:1 - Line 18:27), node_modules\es-abstract\2025\LengthOfArrayLike.js (Line 1:1 - Line 18:27)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all overnode_modules\es-abstract\2023\KeyForSymbol.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\KeyForSymbol.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $keyFor = callBound('Symbol.keyFor', true);
// https://262.ecma-international.org/14.0/#sec-keyforsymbol
module.exports = function KeyForSymbol(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $keyFor(sym);
};node_modules\es-abstract\2023\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2023\IteratorToList.js (Line 12:1 - Line 27:2), node_modules\es-abstract\2025\IteratorToList.js (Line 12:1 - Line 27:2)
module.exports = function IteratorToList(iteratorRecord) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
var values = []; // step 1
var next = true; // step 2
while (next) { // step 3
next = IteratorStep(iteratorRecord); // step 3.a
if (next) {
var nextValue = IteratorValue(next); // step 3.b.i
values[values.length] = nextValue; // step 3.b.ii
}
}
return values; // step 4
};node_modules\es-abstract\2023\IteratorStep.js (Line 12:1 - Line 20:2), node_modules\es-abstract\2024\IteratorStep.js (Line 12:1 - Line 20:2)
module.exports = function IteratorStep(iteratorRecord) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
var result = IteratorNext(iteratorRecord); // step 1
var done = IteratorComplete(result); // step 2
return done === true ? false : result; // steps 3-4
};node_modules\es-abstract\2023\IteratorNext.js (Line 12:1 - Line 28:2), node_modules\es-abstract\2024\IteratorNext.js (Line 12:1 - Line 28:2)
module.exports = function IteratorNext(iteratorRecord) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
var result;
if (arguments.length < 2) { // step 1
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]']); // step 1.a
} else { // step 2
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]'], [arguments[1]]); // step 2.a
}
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object'); // step 3
}
return result; // step 4
};node_modules\es-abstract\2023\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2023\IteratorClose.js (Line 1:1 - Line 11:42), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 11:37)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var isIteratorRecord = require('../helpers/records/iterator-record-2023'node_modules\es-abstract\2023\IteratorClose.js (Line 15:1 - Line 62:2), node_modules\es-abstract\2025\IteratorClose.js (Line 15:1 - Line 62:2)
module.exports = function IteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!isObject(iteratorRecord['[[Iterator]]'])) {
throw new $TypeError('Assertion failed: iteratorRecord.[[Iterator]] must be an Object'); // step 1
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { // step 2
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iterator = iteratorRecord['[[Iterator]]']; // step 3
var iteratorReturn;
try {
iteratorReturn = GetMethod(iterator, 'return'); // step 4
} catch (e) {
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
throw e; // step 7
}
if (typeof iteratorReturn === 'undefined') {
return completionThunk(); // step 5.a - 5.b
}
var innerResult;
try {
innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e; // step 7
}
var completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2023\IsWordChar.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\IsWordChar.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isRegExpRecord = require('../helpers/records/regexp-record');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-iswordchar-abstract-operation
module.exports = function IsWordChar(rer, Input, e) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (!isInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
var InputLength = Input.length; // step 1
if (e === -1 || e === InputLength) {
return false; // step 2
}
var c = Input[e]; // step 3
return $indexOf(WordCharacters(rer), c) > -1; // steps 4-5
};node_modules\es-abstract\2023\IsTimeZoneOffsetString.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\IsTimeZoneOffsetString.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var regexTester = require('safe-regex-test');
// https://tc39.es/ecma262/#sec-istimezoneoffsetstring
// implementation taken from https://github.com/tc39/proposal-temporal/blob/21ee5b13f0672990c807475ba094092d19dd6dc5/polyfill/lib/ecmascript.mjs#L2140
var OFFSET = /^([+\u2212-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?$/;
var testOffset = regexTester(OFFSET);
module.exports = function IsTimeZoneOffsetString(offsetString) {
if (typeof offsetString !== 'string') {
throw new $TypeError('Assertion failed: `offsetString` must be a String');
}
return testOffset(offsetString);
};node_modules\es-abstract\2023\IsStringWellFormedUnicode.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\IsStringWellFormedUnicode.js (Line 1:1 - Line 23:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/14.0/#sec-isstringwellformedunicode
module.exports = function IsStringWellFormedUnicode(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var len = string.length; // step 1
var k = 0; // step 2
while (k < len) { // step 3
var cp = CodePointAt(string, k); // step 3.a
if (cp['[[IsUnpairedSurrogate]]']) {
return false; // step 3.b
}
k += cp['[[CodeUnitCount]]']; // step 3.c
}
return true; // step 4
};node_modules\es-abstract\2023\IsStrictlyEqual.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2024\IsStrictlyEqual.js (Line 1:1 - Line 14:2)
'use strict';
var SameValueNonNumber = require('./SameValueNonNumber');
var Type = require('./Type');
var NumberEqual = require('./Number/equal');
// https://262.ecma-international.org/14.0/#sec-isstrictlyequal
module.exports = function IsStrictlyEqual(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
return typeof x === 'number' ? NumberEqual(x, y) : SameValueNonNumber(x, y);
};node_modules\es-abstract\2023\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2023\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2023\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2023\IsLooselyEqual.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2025\IsLooselyEqual.js (Line 1:1 - Line 58:2)
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var isObject = require('es-object-atoms/isObject');
var IsStrictlyEqual = require('./IsStrictlyEqual');
var StringToBigInt = require('./StringToBigInt');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/13.0/#sec-islooselyequal
module.exports = function IsLooselyEqual(x, y) {
if (isSameType(x, y)) {
return IsStrictlyEqual(x, y);
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return IsLooselyEqual(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof x === 'bigint' && typeof y === 'string') {
var n = StringToBigInt(y);
if (typeof n === 'undefined') {
return false;
}
return IsLooselyEqual(x, n);
}
if (typeof x === 'string' && typeof y === 'bigint') {
return IsLooselyEqual(y, x);
}
if (typeof x === 'boolean') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return IsLooselyEqual(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol' || typeof x === 'bigint') && isObject(y)) {
return IsLooselyEqual(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol' || typeof y === 'bigint')) {
return IsLooselyEqual(ToPrimitive(x), y);
}
if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
if (!isFinite(x) || !isFinite(y)) {
return false;
}
// eslint-disable-next-line eqeqeq
return x == y; // shortcut for step 13.b.
}
return false;
};node_modules\es-abstract\2023\IsLessThan.js (Line 1:1 - Line 97:2), node_modules\es-abstract\2025\IsLessThan.js (Line 1:1 - Line 97:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var min = require('math-intrinsics/min');
var $isNaN = require('math-intrinsics/isNaN');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
var StringToBigInt = require('./StringToBigInt');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var BigIntLessThan = require('./BigInt/lessThan');
var NumberLessThan = require('./Number/lessThan');
// https://262.ecma-international.org/14.0/#sec-islessthan
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function IsLessThan(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') { // step 3
// a. Let lx be the length of px.
// b. Let ly be the length of py.
// c. For each integer i starting with 0 such that i < min(lx, ly), in ascending order, do
// i. Let cx be the integer that is the numeric value of the code unit at index i within px.
// ii. Let cy be the integer that is the numeric value of the code unit at index i within py.
// iii. If cx < cy, return true.
// iv. If cx > cy, return false.
// d. If lx < ly, return true. Otherwise, return false.
var lx = px.length; // step 3.a
var ly = py.length; // step 3.b
for (var i = 0; i < min(lx, ly); i++) { // step 3.c
var cx = $charCodeAt(px, i); // step 3.c.i
var cy = $charCodeAt(py, i); // step 3.c.ii
if (cx < cy) {
return true; // step 3.c.iii
}
if (cx > cy) {
return false; // step 3.c.iv
}
}
return lx < ly; // step 3.d
}
var nx;
var ny;
if (typeof px === 'bigint' && typeof py === 'string') {
ny = StringToBigInt(py);
if (typeof ny === 'undefined') {
return void undefined;
}
return BigIntLessThan(px, ny);
}
if (typeof px === 'string' && typeof py === 'bigint') {
nx = StringToBigInt(px);
if (typeof nx === 'undefined') {
return void undefined;
}
return BigIntLessThan(nx, py);
}
nx = ToNumeric(px);
ny = ToNumeric(py);
if (typeof nx === typeof ny) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both finite, and the same type
};node_modules\es-abstract\2023\IsIntegralNumber.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2024\IsIntegralNumber.js (Line 1:1 - Line 14:2)
'use strict';
var truncate = require('./truncate');
var $isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-isintegralnumber
module.exports = function IsIntegralNumber(argument) {
if (typeof argument !== 'number' || !$isFinite(argument)) {
return false;
}
return truncate(argument) === argument;
};node_modules\es-abstract\2023\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2023\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2023\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2023\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2023\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2023\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2023\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2023\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2023\InternalizeJSONProperty.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnProperties = require('./EnumerableOwnProperties');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/14.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = LengthOfArrayLike(val); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnProperties(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2023\IntegerIndexedElementSet.js (Line 1:1 - Line 16:73), node_modules\es-abstract\2025\TypedArraySetElement.js (Line 1:1 - Line 16:77)
'use strict';
var $TypeError = require('es-errors/type');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-integerindexedelementsetnode_modules\es-abstract\2023\IntegerIndexedElementGet.js (Line 1:1 - Line 14:73), node_modules\es-abstract\2025\TypedArrayGetElement.js (Line 1:1 - Line 14:69)
'use strict';
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
// https://262.ecma-international.org/13.0/#sec-integerindexedelementgetnode_modules\es-abstract\2023\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2023\InstallErrorCause.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\InstallErrorCause.js (Line 1:1 - Line 21:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
// https://262.ecma-international.org/13.0/#sec-installerrorcause
module.exports = function InstallErrorCause(O, options) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (isObject(options) && HasProperty(options, 'cause')) {
var cause = Get(options, 'cause');
CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
}
};node_modules\es-abstract\2023\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2023\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2023\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2023\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 10:13 - Line 25:67), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 9:5 - Line 24:67)
);
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffernode_modules\es-abstract\2023\GetValueFromBuffer.js (Line 27:1 - Line 45:9), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 26:1 - Line 44:10)
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst'node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 46:67 - Line 96:2), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 45:68 - Line 95:2)
);
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};node_modules\es-abstract\2023\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2023\GetUTCEpochNanoseconds.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2025\GetUTCEpochNanoseconds.js (Line 1:1 - Line 68:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var MakeDay = require('./MakeDay');
var MakeTime = require('./MakeTime');
var MakeDate = require('./MakeDate');
var isInteger = require('math-intrinsics/isInteger');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $SyntaxError = GetIntrinsic('%SyntaxError%');
var $TypeError = GetIntrinsic('%TypeError%');
// https://tc39.es/ecma262/#sec-getutcepochnanoseconds
// eslint-disable-next-line max-params
module.exports = function GetUTCEpochNanoseconds(
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
) {
if (!isInteger(year)) {
throw new $TypeError('Assertion failed: `year` must be an integral Number');
}
if (!isInteger(month) || month < 1 || month > 12) {
throw new $TypeError('Assertion failed: `month` must be an integral Number between 1 and 12, inclusive');
}
if (!isInteger(day) || day < 1 || day > 31) {
throw new $TypeError('Assertion failed: `day` must be an integral Number between 1 and 31, inclusive');
}
if (!isInteger(hour) || hour < 0 || hour > 23) {
throw new $TypeError('Assertion failed: `hour` must be an integral Number between 0 and 23, inclusive');
}
if (!isInteger(minute) || minute < 0 || minute > 59) {
throw new $TypeError('Assertion failed: `minute` must be an integral Number between 0 and 59, inclusive');
}
if (!isInteger(second) || second < 0 || second > 59) {
throw new $TypeError('Assertion failed: `second` must be an integral Number between 0 and 59, inclusive');
}
if (!isInteger(millisecond) || millisecond < 0 || millisecond > 999) {
throw new $TypeError('Assertion failed: `millisecond` must be an integral Number between 0 and 999, inclusive');
}
if (!isInteger(microsecond) || microsecond < 0 || microsecond > 999) {
throw new $TypeError('Assertion failed: `microsecond` must be an integral Number between 0 and 999, inclusive');
}
if (!isInteger(nanosecond) || nanosecond < 0 || nanosecond > 999) {
throw new $TypeError('Assertion failed: `nanosecond` must be an integral Number between 0 and 999, inclusive');
}
var date = MakeDay(year, month - 1, day); // step 1
var time = MakeTime(hour, minute, second, millisecond); // step 2
var ms = MakeDate(date, time); // step 3
if (!isInteger(ms)) {
throw new $TypeError('Assertion failed: `ms` from MakeDate is not an integral Number'); // step 4
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt((ms * 1e6) + (microsecond * 1e3) + nanosecond); // step 5
};node_modules\es-abstract\2023\GetSubstitution.js (Line 6:28 - Line 24:72), node_modules\es-abstract\2025\GetSubstitution.js (Line 6:27 - Line 24:72)
);
var regexTester = require('safe-regex-test');
var Get = require('./Get');
var IsArray = require('./IsArray');
var min = require('./min');
var StringIndexOf = require('./StringIndexOf');
var StringToNumber = require('./StringToNumber');
var substring = require('./substring');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isPrefixOf = require('../helpers/isPrefixOf');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
var startsWithDollarDigit = regexTester(/^\$[0-9]/);
var startsWithDollarTwoDigit = regexTester(/^\$[0-9][0-9]/);
// http://www.ecma-international.org/ecma-262/14.0/#sec-getsubstitutionnode_modules\es-abstract\2023\GetSubstitution.js (Line 26:1 - Line 84:4), node_modules\es-abstract\2025\GetSubstitution.js (Line 26:1 - Line 84:4)
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacementTemplate) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof namedCaptures !== 'undefined' && !isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: `namedCaptures` must be `undefined` or an Object');
}
if (typeof replacementTemplate !== 'string') {
throw new $TypeError('Assertion failed: `replacementTemplate` must be a String');
}
var stringLength = str.length; // step 1
if (position > stringLength) {
throw new $TypeError('Assertion failed: position > stringLength, got ' + inspect(position)); // step 2
}
var templateRemainder = replacementTemplate; // step 3
var result = ''; // step 4
while (templateRemainder !== '') { // step 5
// 5.a NOTE: The following steps isolate ref (a prefix of templateRemainder), determine refReplacement (its replacement), and then append that replacement to result.
var ref, refReplacement, capture;
if (isPrefixOf('$$', templateRemainder)) { // step 5.b
ref = '$$'; // step 5.b.i
refReplacement = '$'; // step 5.b.ii
} else if (isPrefixOf('$`', templateRemainder)) { // step 5.c
ref = '$`'; // step 5.c.i
refReplacement = substring(str, 0, position); // step 5.c.ii
} else if (isPrefixOf('$&', templateRemainder)) { // step 5.d
ref = '$&'; // step 5.d.i
refReplacement = matched; // step 5.d.ii
} else if (isPrefixOf('$\'', templateRemainder)) { // step 5.e
ref = '$\''; // step 5.e.i
var matchLength = matched.length; // step 5.e.ii
var tailPos = position + matchLength; // step 5.e.iii
refReplacement = substring(str, min(tailPos, stringLength)); // step 5.e.iv
// 5.e.v NOTE: tailPos can exceed stringLength only if this abstract operation was invoked by a call to the intrinsic @@replace method of %RegExp.prototype% on an object whose "exec" property is not the intrinsic %RegExp.prototype.exec%.
} else if (startsWithDollarDigit(templateRemainder)) { // step 5.f
var digitCount = startsWithDollarTwoDigit(templateRemainder) ? 2 : 1; // step 5.f.i
refnode_modules\es-abstract\2023\GetSubstitution.js (Line 109:2 - Line 138:2), node_modules\es-abstract\2025\GetSubstitution.js (Line 119:2 - Line 148:2)
|| typeof namedCaptures === 'undefined') { // step 5.g.ii
ref = '$<'; // step 5.g.ii.1
refReplacement = ref; // step 5.g.ii.2
} else { // step 5.g.iii
ref = substring(templateRemainder, 0, gtPos + 1); // step 5.g.iii.1
var groupName = substring(templateRemainder, 2, gtPos); // step 5.g.iii.2
if (!isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: Type(namedCaptures) is not Object'); // step 5.g.iii.3
}
capture = Get(namedCaptures, groupName); // step 5.g.iii.4
if (typeof capture === 'undefined') { // step 5.g.iii.5
refReplacement = ''; // step 5.g.iii.5.a
} else { // step 5.g.iii.6
refReplacement = ToString(capture); // step 5.g.iii.6.a
}
}
} else { // step 5.h
ref = substring(templateRemainder, 0, 1); // step 5.h.i
refReplacement = ref; // step 5.h.ii
}
var refLength = ref.length; // step 5.i
templateRemainder = substring(templateRemainder, refLength); // step 5.j
result += refReplacement; // step 5.k
}
return result; // step 6
};node_modules\es-abstract\2023\GetStringIndex.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\GetStringIndex.js (Line 1:1 - Line 27:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var StringToCodePoints = require('./StringToCodePoints');
var $indexOf = callBound('String.prototype.indexOf');
// https://262.ecma-international.org/13.0/#sec-getstringindex
module.exports = function GetStringIndex(S, e) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(e) || e < 0) {
throw new $TypeError('Assertion failed: `e` must be a non-negative integer');
}
if (S === '') {
return 0;
}
var codepoints = StringToCodePoints(S);
var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]);
return eUTF;
};node_modules\es-abstract\2023\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2023\GetPromiseResolve.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\GetPromiseResolve.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-getpromiseresolve
module.exports = function GetPromiseResolve(promiseConstructor) {
if (!IsConstructor(promiseConstructor)) {
throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor');
}
var promiseResolve = Get(promiseConstructor, 'resolve');
if (IsCallable(promiseResolve) === false) {
throw new $TypeError('`resolve` method is not callable');
}
return promiseResolve;
};node_modules\es-abstract\2023\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2023\GetNamedTimeZoneEpochNanoseconds.js (Line 1:1 - Line 72:2), node_modules\es-abstract\2025\GetNamedTimeZoneEpochNanoseconds.js (Line 1:1 - Line 72:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetUTCEpochNanoseconds = require('./GetUTCEpochNanoseconds');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/14.0/#sec-getnamedtimezoneepochnanoseconds
// eslint-disable-next-line max-params
module.exports = function GetNamedTimeZoneEpochNanoseconds(
timeZoneIdentifier,
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
) {
if (typeof timeZoneIdentifier !== 'string') {
throw new $TypeError('Assertion failed: `timeZoneIdentifier` must be a string');
}
if (!isInteger(year)) {
throw new $TypeError('Assertion failed: `year` must be an integral number');
}
if (!isInteger(month) || month < 1 || month > 12) {
throw new $TypeError('Assertion failed: `month` must be an integral number between 1 and 12, inclusive');
}
if (!isInteger(day) || day < 1 || day > 31) {
throw new $TypeError('Assertion failed: `day` must be an integral number between 1 and 31, inclusive');
}
if (!isInteger(hour) || hour < 0 || hour > 23) {
throw new $TypeError('Assertion failed: `hour` must be an integral number between 0 and 23, inclusive');
}
if (!isInteger(minute) || minute < 0 || minute > 59) {
throw new $TypeError('Assertion failed: `minute` must be an integral number between 0 and 59, inclusive');
}
if (!isInteger(second) || second < 0 || second > 999) {
throw new $TypeError('Assertion failed: `second` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(millisecond) || millisecond < 0 || millisecond > 999) {
throw new $TypeError('Assertion failed: `millisecond` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(microsecond) || microsecond < 0 || microsecond > 999) {
throw new $TypeError('Assertion failed: `microsecond` must be an integral number between 0 and 999, inclusive');
}
if (!isInteger(nanosecond) || nanosecond < 0 || nanosecond > 999) {
throw new $TypeError('Assertion failed: `nanosecond` must be an integral number between 0 and 999, inclusive');
}
if (timeZoneIdentifier !== 'UTC') {
throw new $TypeError('Assertion failed: only UTC time zone is supported'); // step 1
}
var epochNanoseconds = GetUTCEpochNanoseconds(
year,
month,
day,
hour,
minute,
second,
millisecond,
microsecond,
nanosecond
); // step 2
return [epochNanoseconds]; // step 3
};node_modules\es-abstract\2023\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2023\GetMatchString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\GetMatchString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchstring
module.exports = function GetMatchString(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']);
};node_modules\es-abstract\2023\GetMatchIndexPair.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\GetMatchIndexPair.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function GetMatchIndexPair(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return [match['[[StartIndex]]'], match['[[EndIndex]]']];
};node_modules\es-abstract\2023\GetIteratorFromMethod.js (Line 12:1 - Line 22:5), node_modules\es-abstract\2025\GetIteratorFromMethod.js (Line 12:1 - Line 22:4)
module.exports = function GetIteratorFromMethod(obj, method) {
if (!IsCallable(method)) {
throw new $TypeError('method must be a function');
}
var iterator = Call(method, obj); // step 1
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object'); // step 2
}
var nextMethod = GetVnode_modules\es-abstract\2023\GetIterator.js (Line 1:1 - Line 16:18), node_modules\es-abstract\2025\GetIterator.js (Line 1:1 - Line 16:3)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true);
var inspect = require('object-inspect');
var hasSymbols = require('has-symbols')();
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateAsyncFromSyncIterator = require('./CreateAsyncFromSyncIterator');
var GetIteratorFromMethod = require('./GetIteratorFromMethod');
var GetMethod = require('./GetMethod');
var getIteratorMethodnode_modules\es-abstract\2023\GetIterator.js (Line 39:8 - Line 53:2), node_modules\es-abstract\2025\GetIterator.js (Line 39:8 - Line 53:2)
) {
if (typeof syncMethod === 'undefined') {
throw new $TypeError('iterator method is `undefined`'); // step 1.b.ii
}
var syncIteratorRecord = GetIteratorFromMethod(obj, syncMethod); // step 1.b.iii
return CreateAsyncFromSyncIterator(syncIteratorRecord); // step 1.b.iv
}
method = syncMethod; // step 2, kind of
}
if (typeof method === 'undefined') {
throw new $TypeError('iterator method is `undefined`'); // step 3
}
return GetIteratorFromMethod(obj, method); // step 4
};node_modules\es-abstract\2023\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2023\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2023\FlattenIntoArray.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
// https://262.ecma-international.org/11.0/#sec-flattenintoarray
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = LengthOfArrayLike(element);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2023\FindViaPredicate.js (Line 1:1 - Line 13:65), node_modules\es-abstract\2025\FindViaPredicate.js (Line 1:1 - Line 13:65)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
var IsCallable = require('./IsCallable');
var ToString = require('./ToString');
// https://262.ecma-international.org/14.0/#sec-findviapredicatenode_modules\es-abstract\2023\FindViaPredicate.js (Line 15:1 - Line 22:2), node_modules\es-abstract\2025\FindViaPredicate.js (Line 15:1 - Line 22:3)
module.exports = function FindViaPredicate(O, len, direction, predicate, thisArg) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: len must be a non-negative integer');
}
if (direction !== 'ascending' && direction !== 'descending')node_modules\es-abstract\2023\FindViaPredicate.js (Line 32:2 - Line 43:2), node_modules\es-abstract\2025\FindViaPredicate.js (Line 32:2 - Line 43:2)
? k < len : k >= 0;
k += 1
) {
var Pk = ToString(k); // step 4.a
var kValue = Get(O, Pk); // step 4.c
var testResult = Call(predicate, thisArg, [kValue, k, O]); // step 4.d
if (ToBoolean(testResult)) {
return { '[[Index]]': k, '[[Value]]': kValue }; // step 4.e
}
}
return { '[[Index]]': -1, '[[Value]]': void undefined }; // step 5
};node_modules\es-abstract\2023\EnumerableOwnProperties.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/14.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnProperties(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2023\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2023\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2023\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2023\DefineMethodProperty.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\DefineMethodProperty.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-definemethodproperty
module.exports = function DefineMethodProperty(homeObject, key, closure, enumerable) {
if (!isObject(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an Object');
}
if (!isPropertyKey(key)) {
throw new $TypeError('Assertion failed: `key` is not a Property Key or a Private Name');
}
if (typeof closure !== 'function') {
throw new $TypeError('Assertion failed: `closure` is not a function');
}
if (typeof enumerable !== 'boolean') {
throw new $TypeError('Assertion failed: `enumerable` is not a Boolean');
}
// 1. Assert: homeObject is an ordinary, extensible object with no non-configurable properties.
if (!IsExtensible(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an ordinary, extensible object, with no non-configurable properties');
}
// 2. If key is a Private Name, then
// a. Return PrivateElement { [[Key]]: key, [[Kind]]: method, [[Value]]: closure }.
// 3. Else,
var desc = { // step 3.a
'[[Value]]': closure,
'[[Writable]]': true,
'[[Enumerable]]': enumerable,
'[[Configurable]]': true
};
DefinePropertyOrThrow(homeObject, key, desc); // step 3.b
};node_modules\es-abstract\2023\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2023\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2023\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2023\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2023\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2023\CreateRegExpStringIterator.js (Line 1:1 - Line 12:21), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 1:1 - Line 12:21)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateIterResultObject = require('./CreateIterResultObject');
var CreateMethodPropertynode_modules\es-abstract\2023\CreateRegExpStringIterator.js (Line 12:25 - Line 83:21), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 12:25 - Line 83:21)
);
var Get = require('./Get');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var RegExpExec = require('./RegExpExec');
var Set = require('./Set');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var SLOT = require('internal-slot');
var setToStringTag = require('es-set-tostringtag');
var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {
if (typeof S !== 'string') {
throw new $TypeError('`S` must be a string');
}
if (typeof global !== 'boolean') {
throw new $TypeError('`global` must be a boolean');
}
if (typeof fullUnicode !== 'boolean') {
throw new $TypeError('`fullUnicode` must be a boolean');
}
SLOT.set(this, '[[IteratingRegExp]]', R);
SLOT.set(this, '[[IteratedString]]', S);
SLOT.set(this, '[[Global]]', global);
SLOT.set(this, '[[Unicode]]', fullUnicode);
SLOT.set(this, '[[Done]]', false);
};
if (IteratorPrototype) {
RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
}
var RegExpStringIteratorNext = function next() {
var O = this; // eslint-disable-line no-invalid-this
if (!isObject(O)) {
throw new $TypeError('receiver must be an object');
}
if (
!(O instanceof RegExpStringIterator)
|| !SLOT.has(O, '[[IteratingRegExp]]')
|| !SLOT.has(O, '[[IteratedString]]')
|| !SLOT.has(O, '[[Global]]')
|| !SLOT.has(O, '[[Unicode]]')
|| !SLOT.has(O, '[[Done]]')
) {
throw new $TypeError('"this" value must be a RegExpStringIterator instance');
}
if (SLOT.get(O, '[[Done]]')) {
return CreateIterResultObject(undefined, true);
}
var R = SLOT.get(O, '[[IteratingRegExp]]');
var S = SLOT.get(O, '[[IteratedString]]');
var global = SLOT.get(O, '[[Global]]');
var fullUnicode = SLOT.get(O, '[[Unicode]]');
var match = RegExpExec(R, S);
if (match === null) {
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(undefined, true);
}
if (global) {
var matchStr = ToString(Get(match, '0'));
if (matchStr === '') {
var thisIndex = ToLength(Get(R, 'lastIndex'));
var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);
Set(R, 'lastIndex', nextIndex, true);
}
return CreateIterResultObject(match, false);
}
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(match, false);
};
CreateMethodPropertynode_modules\es-abstract\2023\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow
module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefinePropertyOrThrow(O, P, newDesc);
};node_modules\es-abstract\2023\CreateMethodProperty.js (Line 15:21 - Line 30:18), node_modules\es-abstract\2025\CreateNonEnumerableDataPropertyOrThrow.js (Line 12:39 - Line 27:22)
(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnPropertynode_modules\es-abstract\2023\CreateListFromArrayLike.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object'];
// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = LengthOfArrayLike(obj);
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2023\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2023\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2023\CreateDataPropertyOrThrow.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\CreateDataPropertyOrThrow.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/14.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
};node_modules\es-abstract\2023\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2023\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 18:42), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 18:37)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObject = require('./CreateIterResultObject');
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var isIteratorRecord = require('../helpers/records/iterator-record-2023'node_modules\es-abstract\2023\CreateAsyncFromSyncIterator.js (Line 18:42 - Line 118:76), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 18:37 - Line 118:76)
);
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord, value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/14.0/#sec-createasyncfromsynciteratornode_modules\es-abstract\2023\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2)
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
if (!isIteratorRecord(syncIteratorRecord)) {
throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
}
// var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2023\CopyDataProperties.js (Line 1:1 - Line 69:2), node_modules\es-abstract\2025\CopyDataProperties.js (Line 1:1 - Line 69:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var forEach = require('../helpers/forEach');
var every = require('../helpers/every');
var some = require('../helpers/some');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var keys = OwnPropertyKeys(from);
forEach(keys, function (nextKey) {
var excluded = some(excludedItems, function (e) {
return SameValue(e, nextKey) === true;
});
/*
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
*/
var enumerable = $isEnumerable(from, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& isInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(from, nextKey);
CreateDataPropertyOrThrow(target, nextKey, propValue);
}
});
return target;
};node_modules\es-abstract\2023\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2023\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2023\CompareTypedArrayElements.js (Line 1:1 - Line 60:2), node_modules\es-abstract\2025\CompareTypedArrayElements.js (Line 1:1 - Line 60:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparetypedarrayelements
module.exports = function CompareTypedArrayElements(x, y, compareFn) {
if ((typeof x !== 'number' && typeof x !== 'bigint') || typeof x !== typeof y) {
throw new $TypeError('Assertion failed: `x` and `y` must be either a BigInt or a Number, and both must be the same type');
}
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof compareFn !== 'undefined') { // step 2
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 2.a
if (isNaN(v)) {
return 0; // step 2.b
}
return v; // step 2.c
}
var xNaN = isNaN(x);
var yNaN = isNaN(y);
if (xNaN && yNaN) {
return 0; // step 3
}
if (xNaN) {
return 1; // step 4
}
if (yNaN) {
return -1; // step 5
}
if (x < y) {
return -1; // step 6
}
if (x > y) {
return 1; // step 7
}
if (SameValue(x, -0) && SameValue(y, 0)) {
return -1; // step 8
}
if (SameValue(x, 0) && SameValue(y, -0)) {
return 1; // step 9
}
return 0; // step 10
};node_modules\es-abstract\2023\CompareArrayElements.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\CompareArrayElements.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsLessThan = require('./IsLessThan');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparearrayelements
module.exports = function CompareArrayElements(x, y, compareFn) {
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof x === 'undefined' && typeof y === 'undefined') {
return 0; // step 1
}
if (typeof x === 'undefined') {
return 1; // step 2
}
if (typeof y === 'undefined') {
return -1; // step 3
}
if (typeof compareFn !== 'undefined') { // step 4
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 4.a
if (isNaN(v)) {
return 0; // step 4.b
}
return v; // step 4.c
}
var xString = ToString(x); // step 5
var yString = ToString(y); // step 6
var xSmaller = IsLessThan(xString, yString, true); // step 7
if (xSmaller) {
return -1; // step 8
}
var ySmaller = IsLessThan(yString, xString, true); // step 9
if (ySmaller) {
return 1; // step 10
}
return 0; // step 11
};node_modules\es-abstract\2023\CodePointsToString.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CodePointsToString.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-codepointstostring
module.exports = function CodePointsToString(text) {
if (!IsArray(text)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
var result = '';
forEach(text, function (cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
result += UTF16EncodeCodePoint(cp);
});
return result;
};node_modules\es-abstract\2023\CodePointAt.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\CodePointAt.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');
var $charAt = callBound('String.prototype.charAt');
var $charCodeAt = callBound('String.prototype.charCodeAt');
// https://262.ecma-international.org/12.0/#sec-codepointat
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),
'[[CodeUnitCount]]': 2,
'[[IsUnpairedSurrogate]]': false
};
};node_modules\es-abstract\2023\CloneArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\CloneArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsConstructor = require('./IsConstructor');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf');
var isInteger = require('math-intrinsics/isInteger');
var isArrayBuffer = require('is-array-buffer');
var arrayBufferSlice = require('arraybuffer.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-clonearraybuffer
module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) {
if (!isArrayBuffer(srcBuffer)) {
throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance');
}
if (!isInteger(srcByteOffset) || srcByteOffset < 0) {
throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer');
}
if (!isInteger(srcLength) || srcLength < 0) {
throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer');
}
if (!IsConstructor(cloneConstructor)) {
throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor');
}
// 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength).
var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda
if (IsDetachedBuffer(srcBuffer)) {
throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4
}
/*
5. Let srcBlock be srcBuffer.[[ArrayBufferData]].
6. Let targetBlock be targetBuffer.[[ArrayBufferData]].
7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength).
*/
var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7
OrdinarySetPrototypeOf(targetBuffer, proto); // step 3
return targetBuffer; // step 8
};node_modules\es-abstract\2023\clamp.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\clamp.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var max = require('math-intrinsics/max');
var min = require('math-intrinsics/min');
// https://262.ecma-international.org/12.0/#clamping
module.exports = function clamp(x, lower, upper) {
if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) {
throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`');
}
return min(max(lower, x), upper);
};node_modules\es-abstract\2023\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2023\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2023\Canonicalize.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\Canonicalize.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var isRegExpRecord = require('../helpers/records/regexp-record');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(rer, ch) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (rer['[[Unicode]]'] && rer['[[IgnoreCase]]']) { // step 1
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 1.b
}
if (!rer['[[IgnoreCase]]']) {
return ch; // step 2
}
var u = $toUpperCase(ch); // step 5
if (u.length !== 1) {
return ch; // step 7
}
var cu = u; // step 8
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 9
}
return cu; // step 10
};node_modules\es-abstract\2023\CanBeHeldWeakly.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\CanBeHeldWeakly.js (Line 1:1 - Line 17:2)
'use strict';
var isObject = require('es-object-atoms/isObject');
var KeyForSymbol = require('./KeyForSymbol');
// https://262.ecma-international.org/14.0/#sec-canbeheldweakly
module.exports = function CanBeHeldWeakly(v) {
if (isObject(v)) {
return true; // step 1
}
if (typeof v === 'symbol' && typeof KeyForSymbol(v) === 'undefined') {
return true; // step 2
}
return false; // step 3
};node_modules\es-abstract\2023\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2023\ByteListEqual.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\ByteListEqual.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistequal
module.exports = function ByteListEqual(xBytes, yBytes) {
if (!IsArray(xBytes) || !IsArray(yBytes)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xBytes.length !== yBytes.length) {
return false;
}
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xByte !== yByte) {
return false;
}
}
return true;
};node_modules\es-abstract\2023\ByteListBitwiseOp.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\ByteListBitwiseOp.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop
module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) {
if (op !== '&' && op !== '^' && op !== '|') {
throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`');
}
if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var result = [];
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var resultByte;
if (op === '&') {
resultByte = xByte & yByte;
} else if (op === '^') {
resultByte = xByte ^ yByte;
} else {
resultByte = xByte | yByte;
}
result[result.length] = resultByte;
}
return result;
};node_modules\es-abstract\2023\BinaryXor.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryXor.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};node_modules\es-abstract\2023\BinaryOr.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryOr.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x | y;
};node_modules\es-abstract\2023\BinaryAnd.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryAnd.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryand
module.exports = function BinaryAnd(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x & y;
};node_modules\es-abstract\2023\BigIntBitwiseOp.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2025\BigIntBitwiseOp.js (Line 1:1 - Line 63:2)
'use strict';
var $TypeError = require('es-errors/type');
// var $BigInt = GetIntrinsic('%BigInt%', true);
// var $pow = require('math-intrinsics/pow');
// var BinaryAnd = require('./BinaryAnd');
// var BinaryOr = require('./BinaryOr');
// var BinaryXor = require('./BinaryXor');
// var modulo = require('./modulo');
// var zero = $BigInt && $BigInt(0);
// var negOne = $BigInt && $BigInt(-1);
// var two = $BigInt && $BigInt(2);
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
module.exports = function BigIntBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('`x` and `y` must be BigInts');
}
if (op === '&') {
return x & y;
}
if (op === '|') {
return x | y;
}
return x ^ y;
/*
var result = zero;
var shift = 0;
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
var xDigit = modulo(x, two);
var yDigit = modulo(y, two);
if (op === '&') {
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
} else if (op === '|') {
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
} else if (op === '^') {
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
}
shift += 1;
x = (x - xDigit) / two;
y = (y - yDigit) / two;
}
var tmp;
if (op === '&') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else if (op === '|') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else {
tmp = BinaryXor(modulo(x, two), modulo(y, two));
}
if (tmp !== 0) {
result -= $pow(2, shift);
}
return result;
*/
};node_modules\es-abstract\2023\AsyncIteratorClose.js (Line 1:1 - Line 14:42), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 14:37)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023'node_modules\es-abstract\2023\AsyncIteratorClose.js (Line 22:1 - Line 70:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 22:1 - Line 70:2)
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return $then(
$then(
$then(
new $Promise(function (resolve) {
resolve(GetMethod(iterator, 'return')); // step 4
// resolve(Call(ret, iterator, [])); // step 6
}),
function (returnV) { // step 5.a
if (typeof returnV === 'undefined') {
return completion; // step 5.b
}
return Call(returnV, iterator); // step 5.c, 5.d.
}
),
null,
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 6
} else {
throw e; // step 7
}
}
),
function (innerResult) { // step 8
if (completion.type() === 'throw') {
completion['?'](); // step 6
}
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
}
);
};node_modules\es-abstract\2023\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObject = require('./CreateIterResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2023\ArraySpeciesCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\ArraySpeciesCreate.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var ArrayCreate = require('./ArrayCreate');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var isArray = IsArray(originalArray);
if (!isArray) {
return ArrayCreate(length);
}
var C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
if (typeof C === 'undefined') {
return ArrayCreate(length);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(length); // Construct(C, length);
};node_modules\es-abstract\2023\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2023\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/12.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 3, 5
if (proto !== $ArrayPrototype) { // step 4
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 6
A.length = length;
}
/* step 6, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2023\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2)
'use strict';
var $TypeError = require('es-errors/type');
var HasOwnProperty = require('./HasOwnProperty');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
var Type = require('./Type');
var NumberAdd = require('./Number/add');
var NumberBitwiseAND = require('./Number/bitwiseAND');
var NumberBitwiseOR = require('./Number/bitwiseOR');
var NumberBitwiseXOR = require('./Number/bitwiseXOR');
var NumberDivide = require('./Number/divide');
var NumberExponentiate = require('./Number/exponentiate');
var NumberLeftShift = require('./Number/leftShift');
var NumberMultiply = require('./Number/multiply');
var NumberRemainder = require('./Number/remainder');
var NumberSignedRightShift = require('./Number/signedRightShift');
var NumberSubtract = require('./Number/subtract');
var NumberUnsignedRightShift = require('./Number/unsignedRightShift');
var BigIntAdd = require('./BigInt/add');
var BigIntBitwiseAND = require('./BigInt/bitwiseAND');
var BigIntBitwiseOR = require('./BigInt/bitwiseOR');
var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR');
var BigIntDivide = require('./BigInt/divide');
var BigIntExponentiate = require('./BigInt/exponentiate');
var BigIntLeftShift = require('./BigInt/leftShift');
var BigIntMultiply = require('./BigInt/multiply');
var BigIntRemainder = require('./BigInt/remainder');
var BigIntSignedRightShift = require('./BigInt/signedRightShift');
var BigIntSubtract = require('./BigInt/subtract');
var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift');
// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator
// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table
var table = {
'**': [NumberExponentiate, BigIntExponentiate],
'*': [NumberMultiply, BigIntMultiply],
'/': [NumberDivide, BigIntDivide],
'%': [NumberRemainder, BigIntRemainder],
'+': [NumberAdd, BigIntAdd],
'-': [NumberSubtract, BigIntSubtract],
'<<': [NumberLeftShift, BigIntLeftShift],
'>>': [NumberSignedRightShift, BigIntSignedRightShift],
'>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift],
'&': [NumberBitwiseAND, BigIntBitwiseAND],
'^': [NumberBitwiseXOR, BigIntBitwiseXOR],
'|': [NumberBitwiseOR, BigIntBitwiseOR]
};
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
if (typeof opText !== 'string' || !HasOwnProperty(table, opText)) {
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
}
if (opText === '+') {
var lprim = ToPrimitive(lval);
var rprim = ToPrimitive(rval);
if (typeof lprim === 'string' || typeof rprim === 'string') {
var lstr = ToString(lprim);
var rstr = ToString(rprim);
return lstr + rstr;
}
/* eslint no-param-reassign: 1 */
lval = lprim;
rval = rprim;
}
var lnum = ToNumeric(lval);
var rnum = ToNumeric(rval);
if (Type(lnum) !== Type(rnum)) {
throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ');
}
var Operation = table[opText][typeof lnum === 'bigint' ? 1 : 0];
return Operation(lnum, rnum);
};node_modules\es-abstract\2023\AdvanceStringIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 1:1 - Line 30:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
// https://262.ecma-international.org/12.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var cp = CodePointAt(S, index);
return index + cp['[[CodeUnitCount]]'];
};node_modules\es-abstract\2023\AddToKeptObjects.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\AddToKeptObjects.js (Line 1:1 - Line 18:2)
'use strict';
var SLOT = require('internal-slot');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var ClearKeptObjects = require('./ClearKeptObjects');
// https://262.ecma-international.org/12.0/#sec-addtokeptobjects
module.exports = function AddToKeptObjects(object) {
if (!isObject(object)) {
throw new $TypeError('Assertion failed: `object` must be an Object');
}
var arr = SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]');
arr[arr.length] = object;
};node_modules\es-abstract\2023\AddEntriesFromIterable.js (Line 1:1 - Line 16:74), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 16:74)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/14.0/#sec-add-entries-from-iterablenode_modules\es-abstract\2023\AddEntriesFromIterable.js (Line 18:1 - Line 25:7), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 18:1 - Line 25:7)
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable, 'sync'node_modules\es-abstract\2023\AddEntriesFromIterable.js (Line 25:7 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 25:7 - Line 44:2)
);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2022\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2022\WordCharacters.js (Line 1:1 - Line 12:16), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 12:15)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeysnode_modules\es-abstract\2022\WeakRefDeref.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\WeakRefDeref.js (Line 1:1 - Line 23:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var $deref = callBound('WeakRef.prototype.deref', true);
var isWeakRef = require('is-weakref');
var AddToKeptObjects = require('./AddToKeptObjects');
// https://262.ecma-international.org/12.0/#sec-weakrefderef
module.exports = function WeakRefDeref(weakRef) {
if (!isWeakRef(weakRef)) {
throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef');
}
var target = $deref(weakRef);
if (target) {
AddToKeptObjects(target);
}
return target;
};node_modules\es-abstract\2022\ValidateTypedArray.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2023\ValidateTypedArray.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/13.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 1 - 2
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 4
}
};node_modules\es-abstract\2022\ValidateIntegerTypedArray.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\ValidateIntegerTypedArray.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var TypedArrayElementType = require('./TypedArrayElementType');
var ValidateTypedArray = require('./ValidateTypedArray');
var whichTypedArray = require('which-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/13.0/#sec-validateintegertypedarray
module.exports = function ValidateIntegerTypedArray(typedArray) {
var waitable = arguments.length > 1 ? arguments[1] : false; // step 1
if (typeof waitable !== 'boolean') {
throw new $TypeError('Assertion failed: `waitable` must be a Boolean');
}
ValidateTypedArray(typedArray); // step 2
var buffer = typedArrayBuffer(typedArray); // step 3
if (waitable) { // step 5
var typeName = whichTypedArray(typedArray);
if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') {
throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a
}
} else {
var type = TypedArrayElementType(typedArray); // step 5.a
if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) {
throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 5.b
}
}
return buffer; // step 6
};node_modules\es-abstract\2022\ValidateAtomicAccess.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2023\ValidateAtomicAccess.js (Line 1:1 - Line 40:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var isTypedArray = require('is-typed-array');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/13.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray');
}
var length = typedArrayLength(typedArray); // step 1
var accessIndex = ToIndex(requestIndex); // step 2
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 4
}
var elementSize = TypedArrayElementSize(typedArray); // step 5
var offset = typedArrayByteOffset(typedArray); // step 6
return (accessIndex * elementSize) + offset; // step 7
};node_modules\es-abstract\2022\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2), node_modules\es-abstract\2025\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 171:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor
// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof current === 'undefined') { // step 2
if (!extensible) {
return false; // step 2.a
}
if (typeof O === 'undefined') {
return true; // step 2.b
}
if (IsAccessorDescriptor(Desc)) { // step 2.c
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
// step 2.d
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!Desc['[[Configurable]]'],
'[[Enumerable]]': !!Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': !!Desc['[[Writable]]']
}
);
}
// 3. Assert: current is a fully populated Property Descriptor.
if (
!isFullyPopulatedPropertyDescriptor(
{
IsAccessorDescriptor: IsAccessorDescriptor,
IsDataDescriptor: IsDataDescriptor
},
current
)
) {
throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor');
}
// 4. If every field in Desc is absent, return true.
// this can't really match the assertion that it's a Property Descriptor in our JS implementation
// 5. If current.[[Configurable]] is false, then
if (!current['[[Configurable]]']) {
if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) {
// step 5.a
return false;
}
if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) {
// step 5.b
return false;
}
if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) {
// step 5.c
return false;
}
if (IsAccessorDescriptor(current)) { // step 5.d
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
} else if (!current['[[Writable]]']) { // step 5.e
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
}
}
// 6. If O is not undefined, then
if (typeof O !== 'undefined') {
var configurable;
var enumerable;
if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'],
'[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]']
}
);
} else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) {
configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]'];
enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]'];
// i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': !!configurable,
'[[Enumerable]]': !!enumerable,
'[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'],
'[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]']
}
);
}
// For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field.
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true; // step 7
};node_modules\es-abstract\2022\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2022\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-utf16encoding
module.exports = function UTF16EncodeCodePoint(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2022\UnicodeEscape.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UnicodeEscape.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/11.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start');
};node_modules\es-abstract\2022\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2022\TypedArrayElementType.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementType.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementType(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var result = tableTAO.name['$' + type];
if (typeof result !== 'string') {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return result;
};node_modules\es-abstract\2022\TypedArrayElementSize.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\TypedArrayElementSize.js (Line 1:1 - Line 23:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize
var tableTAO = require('./tables/typed-array-objects');
module.exports = function TypedArrayElementSize(O) {
var type = whichTypedArray(O);
if (!type) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
var size = tableTAO.size['$' + tableTAO.name['$' + type]];
if (!isInteger(size) || size < 0) {
throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`');
}
return size;
};node_modules\es-abstract\2022\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2022\Type.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\Type.js (Line 1:1 - Line 15:2)
'use strict';
var ES5Type = require('../5/Type');
// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
module.exports = function Type(x) {
if (typeof x === 'symbol') {
return 'Symbol';
}
if (typeof x === 'bigint') {
return 'BigInt';
}
return ES5Type(x);
};node_modules\es-abstract\2022\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2022\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\ToZeroPaddedDecimalString.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $RangeError = require('es-errors/range');
var isInteger = require('math-intrinsics/isInteger');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring
module.exports = function ToZeroPaddedDecimalString(n, minLength) {
if (!isInteger(n) || n < 0) {
throw new $RangeError('Assertion failed: `q` must be a non-negative integer');
}
var S = $String(n);
return StringPad(S, minLength, '0', 'start');
};node_modules\es-abstract\2022\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2022\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2022\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2022\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2022\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2022\ToNumeric.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToNumeric.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/11.0/#sec-tonumeric
module.exports = function ToNumeric(argument) {
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof primValue === 'bigint') {
return primValue;
}
return ToNumber(primValue);
};node_modules\es-abstract\2022\ToNumber.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\ToNumber.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var StringToNumber = require('./StringToNumber');
// https://262.ecma-international.org/13.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
return StringToNumber(value);
}
return +value;
};node_modules\es-abstract\2022\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2022\ToIndex.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2023\ToIndex.js (Line 1:1 - Line 24:2)
'use strict';
var $RangeError = require('es-errors/range');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var ToLength = require('./ToLength');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/8.0/#sec-toindex
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integerIndex = ToIntegerOrInfinity(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValue(integerIndex, index)) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return index;
};node_modules\es-abstract\2022\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2022\ToBigUint64.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobiguint64
module.exports = function ToBigUint64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit;
};node_modules\es-abstract\2022\ToBigInt64.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31)));
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobigint64
module.exports = function ToBigInt64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit;
};node_modules\es-abstract\2022\ToBigInt.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2025\ToBigInt.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var StringToBigInt = require('./StringToBigInt');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/13.0/#sec-tobigint
module.exports = function ToBigInt(argument) {
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
var prim = ToPrimitive(argument, $Number);
if (prim == null) {
throw new $TypeError('Cannot convert null or undefined to a BigInt');
}
if (typeof prim === 'boolean') {
return prim ? $BigInt(1) : $BigInt(0);
}
if (typeof prim === 'number') {
throw new $TypeError('Cannot convert a Number value to a BigInt');
}
if (typeof prim === 'string') {
var n = StringToBigInt(prim);
if (typeof n === 'undefined') {
throw new $TypeError('Failed to parse String to BigInt');
}
return n;
}
if (typeof prim === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a BigInt');
}
if (typeof prim !== 'bigint') {
throw new $SyntaxError('Assertion failed: unknown primitive type');
}
return prim;
};node_modules\es-abstract\2022\TimeString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\TimeString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
var ToZeroPaddedDecimalString = require('./ToZeroPaddedDecimalString');
// https://262.ecma-international.org/13.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = ToZeroPaddedDecimalString(HourFromTime(tv), 2); // step 1
var minute = ToZeroPaddedDecimalString(MinFromTime(tv), 2); // step 2
var second = ToZeroPaddedDecimalString(SecFromTime(tv), 2); // step 3
return hour + ':' + minute + ':' + second + ' GMT'; // step 4
};node_modules\es-abstract\2022\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2022\thisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2023\thisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2022\thisBigIntValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2023\thisBigIntValue.js (Line 1:1 - Line 18:2)
'use strict';
var callBound = require('call-bound');
var $SyntaxError = require('es-errors/syntax');
var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
// https://262.ecma-international.org/11.0/#sec-thisbigintvalue
module.exports = function thisBigIntValue(value) {
if (typeof value === 'bigint') {
return value;
}
if (!$bigIntValueOf) {
throw new $SyntaxError('BigInt is not supported');
}
return $bigIntValueOf(value);
};node_modules\es-abstract\2022\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2022\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2022\substring.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\substring.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#substring
module.exports = function substring(S, inclusiveStart, exclusiveEnd) {
if (typeof S !== 'string' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers');
}
return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length);
};node_modules\es-abstract\2022\StringToNumber.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\StringToNumber.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
var $TypeError = require('es-errors/type');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
// https://262.ecma-international.org/13.0/#sec-stringtonumber
module.exports = function StringToNumber(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` is not a String');
}
if (isBinary(argument)) {
return +$parseInteger($strSlice(argument, 2), 2);
}
if (isOctal(argument)) {
return +$parseInteger($strSlice(argument, 2), 8);
}
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
return NaN;
}
var trimmed = $trim(argument);
if (trimmed !== argument) {
return StringToNumber(trimmed);
}
return +argument;
};node_modules\es-abstract\2022\StringToCodePoints.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\StringToCodePoints.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var CodePointAt = require('./CodePointAt');
// https://262.ecma-international.org/12.0/#sec-stringtocodepoints
module.exports = function StringToCodePoints(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var codePoints = [];
var size = string.length;
var position = 0;
while (position < size) {
var cp = CodePointAt(string, position);
codePoints[codePoints.length] = cp['[[CodePoint]]'];
position += cp['[[CodeUnitCount]]'];
}
return codePoints;
};node_modules\es-abstract\2022\StringToBigInt.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\StringToBigInt.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
// https://262.ecma-international.org/14.0/#sec-stringtobigint
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return void undefined;
}
};node_modules\es-abstract\2022\StringPad.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2023\StringPad.js (Line 1:1 - Line 41:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var $strSlice = callBound('String.prototype.slice');
// https://262.ecma-international.org/11.0/#sec-stringpad
module.exports = function StringPad(O, maxLength, fillString, placement) {
if (placement !== 'start' && placement !== 'end') {
throw new $TypeError('Assertion failed: `placement` must be "start" or "end"');
}
var S = ToString(O);
var intMaxLength = ToLength(maxLength);
var stringLength = S.length;
if (intMaxLength <= stringLength) {
return S;
}
var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString);
if (filler === '') {
return S;
}
var fillLen = intMaxLength - stringLength;
// the String value consisting of repeated concatenations of filler truncated to length fillLen.
var truncatedStringFiller = '';
while (truncatedStringFiller.length < fillLen) {
truncatedStringFiller += filler;
}
truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen);
if (placement === 'start') {
return truncatedStringFiller + S;
}
return S + truncatedStringFiller;
};node_modules\es-abstract\2022\StringIndexOf.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2024\StringIndexOf.js (Line 1:1 - Line 36:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-stringindexof
module.exports = function StringIndexOf(string, searchValue, fromIndex) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (typeof searchValue !== 'string') {
throw new $TypeError('Assertion failed: `searchValue` must be a String');
}
if (!isInteger(fromIndex) || fromIndex < 0) {
throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer');
}
var len = string.length;
if (searchValue === '' && fromIndex <= len) {
return fromIndex;
}
var searchLen = searchValue.length;
for (var i = fromIndex; i <= (len - searchLen); i += 1) {
var candidate = $slice(string, i, i + searchLen);
if (candidate === searchValue) {
return i;
}
}
return -1;
};node_modules\es-abstract\2022\StringGetOwnProperty.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var isPropertyKey = require('../helpers/isPropertyKey');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !isInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2022\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2022\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2022\SortIndexedProperties.js (Line 21:12 - Line 32:4), node_modules\es-abstract\2025\SortIndexedProperties.js (Line 18:6 - Line 28:3)
) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(obj) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: `len` must be an integer >= 0');
}
if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) {
throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments');
}
varnode_modules\es-abstract\2022\SetValueInBuffer.js (Line 1:1 - Line 92:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 1:1 - Line 92:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumericToRawBytes = require('./NumericToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/12.0/#sec-setvalueinbuffer
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex) || byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3
throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number');
}
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
var elementSize = tableTAO.size['$' + type]; // step 5
// 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6
var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7
if (isSAB) { // step 8
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 10. Return NormalCompletion(undefined).
};node_modules\es-abstract\2022\SetTypedArrayFromTypedArray.js (Line 15:28 - Line 26:76), node_modules\es-abstract\2023\SetTypedArrayFromTypedArray.js (Line 12:20 - Line 23:4)
);
var CloneArrayBuffer = require('./CloneArrayBuffer');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsSharedArrayBuffer = require('./IsSharedArrayBuffer');
var SameValue = require('./SameValue');
var SetValueInBuffer = require('./SetValueInBuffer');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
// https://262.ecma-international.org/13.0/#sec-settypedarrayfromtypedarraynode_modules\es-abstract\2022\SetTypedArrayFromTypedArray.js (Line 28:1 - Line 85:5), node_modules\es-abstract\2023\SetTypedArrayFromTypedArray.js (Line 27:1 - Line 84:22)
module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
var whichSource = whichTypedArray(source);
if (!whichSource) {
throw new $TypeError('Assertion failed: source must be a TypedArray instance');
}
var targetBuffer = typedArrayBuffer(target); // step 1
if (IsDetachedBuffer(targetBuffer)) {
throw new $TypeError('target’s buffer is detached'); // step 2
}
var targetLength = typedArrayLength(target); // step 3
var srcBuffer = typedArrayBuffer(source); // step 4
if (IsDetachedBuffer(srcBuffer)) {
throw new $TypeError('source’s buffer is detached'); // step 5
}
var targetType = TypedArrayElementType(target); // step 6
var targetElementSize = TypedArrayElementSize(target); // step 7
var targetByteOffset = typedArrayByteOffset(target); // step 8
var srcType = TypedArrayElementType(source); // step 9
var srcElementSize = TypedArrayElementSize(source); // step 10
var srcLength = typedArrayLength(source); // step 11
var srcByteOffset = typedArrayByteOffset(source); // step 12
if (targetOffset === Infinity) {
throw new $RangeError('targetOffset must be a non-negative integer or +Infinity'); // step 13
}
if (srcLength + targetOffset > targetLength) {
throw new $RangeError('targetOffset + source.length must not be greater than target.length'); // step 14
}
var targetContentType = whichTarget === 'BigInt64Array' || whichTarget === 'BigUint64Array' ? 'BigInt' : 'Number';
var sourceContentType = whichSource === 'BigInt64Array' || whichSource === 'BigUint64Array' ? 'BigInt' : 'Number';
if (targetContentType !== sourceContentType) {
throw new $TypeError('source and target must have the same content type'); // step 15
}
var samenode_modules\es-abstract\2022\SetTypedArrayFromArrayLike.js (Line 27:1 - Line 49:18), node_modules\es-abstract\2023\SetTypedArrayFromArrayLike.js (Line 21:1 - Line 43:4)
module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
if (isTypedArray(source)) {
throw new $TypeError('Assertion failed: source must not be a TypedArray instance');
}
var targetBuffer = typedArrayBuffer(target); // step 1
if (IsDetachedBuffer(targetBuffer)) {
throw new $TypeError('target’s buffer is detached'); // step 2
}
var targetLength = typedArrayLength(target); // step 3
var targetElementSizenode_modules\es-abstract\2022\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2022\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2022\SetFunctionLength.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/12.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length !== Infinity && (!isInteger(length) || length < 0)) {
throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};node_modules\es-abstract\2022\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2022\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2022\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2022\RegExpHasFlag.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\RegExpHasFlag.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%');
var SameValue = require('./SameValue');
var $indexOf = callBound('String.prototype.indexOf');
var hasRegExpMatcher = require('is-regex');
var getFlags = require('regexp.prototype.flags');
// https://262.ecma-international.org/13.0/#sec-regexphasflag
module.exports = function RegExpHasFlag(R, codeUnit) {
if (typeof codeUnit !== 'string' || codeUnit.length !== 1) {
throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1');
}
if (!isObject(R)) {
throw new $TypeError('Assertion failed: Type(R) is not Object');
}
if (!hasRegExpMatcher(R)) { // step 2
if (SameValue(R, $RegExpPrototype)) {
return void undefined; // step 2.a
}
throw new $TypeError('`R` must be a RegExp object'); // step 2.b
}
var flags = getFlags(R); // step 3
return $indexOf(flags, codeUnit) > -1; // steps 4-5
};node_modules\es-abstract\2022\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2022\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2022\RawBytesToNumeric.js (Line 1:1 - Line 67:2), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 1:1 - Line 67:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric
module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt);
};node_modules\es-abstract\2022\QuoteJSONString.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var StringToCodePoints = require('./StringToCodePoints');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var hasOwn = require('hasown');
// https://262.ecma-international.org/12.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(StringToCodePoints(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16EncodeCodePoint(cCharCode);
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2022\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2022\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2022\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2022\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};node_modules\es-abstract\2022\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2022\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2022\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2022\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var hasOwn = require('hasown');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2022\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2022\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return OrdinaryObjectCreate(proto, slots);
};node_modules\es-abstract\2022\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2022\NumericToRawBytes.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToBigInt64 = require('./ToBigInt64');
var ToBigUint64 = require('./ToBigUint64');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32,
$BigInt64: ToBigInt64,
$BigUint64: ToBigUint64
};
// https://262.ecma-international.org/11.0/#sec-numerictorawbytes
module.exports = function NumericToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2022\NumberToBigInt.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\NumberToBigInt.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-numbertobigint
module.exports = function NumberToBigInt(number) {
if (typeof number !== 'number') {
throw new $TypeError('Assertion failed: `number` must be a String');
}
if (!isInteger(number)) {
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt(number);
};node_modules\es-abstract\2022\NumberBitwiseOp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\NumberBitwiseOp.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};node_modules\es-abstract\2022\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2022\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2022\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2022\MakeTime.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\MakeTime.js (Line 1:1 - Line 23:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-maketime
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToIntegerOrInfinity(hour);
var m = ToIntegerOrInfinity(min);
var s = ToIntegerOrInfinity(sec);
var milli = ToIntegerOrInfinity(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2022\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2), node_modules\es-abstract\2025\MakeMatchIndicesIndexPairArray.js (Line 1:1 - Line 66:2)
'use strict';
var $TypeError = require('es-errors/type');
var ArrayCreate = require('./ArrayCreate');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var GetMatchIndexPair = require('./GetMatchIndexPair');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isMatchRecord = require('../helpers/records/match-record');
var isStringOrUndefined = function isStringOrUndefined(s) {
return typeof s === 'undefined' || typeof s === 'string';
};
var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) {
return typeof m === 'undefined' || isMatchRecord(m);
};
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) {
throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`');
}
if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`');
}
if (typeof hasGroups !== 'boolean') {
throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean');
}
var n = indices.length; // step 1
if (!(n < MAX_ARRAY_LENGTH)) {
throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1');
}
if (groupNames.length !== n - 1) {
throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`');
}
var A = ArrayCreate(n); // step 5
var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7
CreateDataPropertyOrThrow(A, 'groups', groups); // step 8
for (var i = 0; i < n; i += 1) { // step 9
var matchIndices = indices[i]; // step 9.a
// eslint-disable-next-line no-negated-condition
var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c
CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d
if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e
if (!groups) {
throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values');
}
CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i
}
}
return A; // step 10
};node_modules\es-abstract\2022\MakeDay.js (Line 1:1 - Line 36:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToIntegerOrInfinity(year);
var m = ToIntegerOrInfinity(month);
var dt = ToIntegerOrInfinity(date);
var ym = y + floor(m / 12);
if (!$isFinite(ym)) {
return NaN;
}
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2022\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2022\LengthOfArrayLike.js (Line 1:1 - Line 18:27), node_modules\es-abstract\2025\LengthOfArrayLike.js (Line 1:1 - Line 18:27)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all overnode_modules\es-abstract\2022\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2022\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2022\IteratorClose.js (Line 1:1 - Line 11:61), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 11:4)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclosenode_modules\es-abstract\2022\IsValidIntegerIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2023\IsValidIntegerIndex.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isInteger = require('math-intrinsics/isInteger');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/12.0/#sec-isvalidintegerindex
module.exports = function IsValidIntegerIndex(O, index) {
// Assert: O is an Integer-Indexed exotic object.
var buffer = typedArrayBuffer(O); // step 1
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: Type(index) is not Number');
}
if (IsDetachedBuffer(buffer)) { return false; } // step 2
if (!isInteger(index)) { return false; } // step 3
if (isNegativeZero(index)) { return false; } // step 4
if (index < 0 || index >= O.length) { return false; } // step 5
return true; // step 6
};node_modules\es-abstract\2022\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2022\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2022\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2022\IsNoTearConfiguration.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2023\IsNoTearConfiguration.js (Line 1:1 - Line 16:2)
'use strict';
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var IsBigIntElementType = require('./IsBigIntElementType');
// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration
module.exports = function IsNoTearConfiguration(type, order) {
if (IsUnclampedIntegerElementType(type)) {
return true;
}
if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') {
return true;
}
return false;
};node_modules\es-abstract\2022\IsLooselyEqual.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2025\IsLooselyEqual.js (Line 1:1 - Line 58:2)
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var isObject = require('es-object-atoms/isObject');
var IsStrictlyEqual = require('./IsStrictlyEqual');
var StringToBigInt = require('./StringToBigInt');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/13.0/#sec-islooselyequal
module.exports = function IsLooselyEqual(x, y) {
if (isSameType(x, y)) {
return IsStrictlyEqual(x, y);
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return IsLooselyEqual(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof x === 'bigint' && typeof y === 'string') {
var n = StringToBigInt(y);
if (typeof n === 'undefined') {
return false;
}
return IsLooselyEqual(x, n);
}
if (typeof x === 'string' && typeof y === 'bigint') {
return IsLooselyEqual(y, x);
}
if (typeof x === 'boolean') {
return IsLooselyEqual(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return IsLooselyEqual(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol' || typeof x === 'bigint') && isObject(y)) {
return IsLooselyEqual(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol' || typeof y === 'bigint')) {
return IsLooselyEqual(ToPrimitive(x), y);
}
if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
if (!isFinite(x) || !isFinite(y)) {
return false;
}
// eslint-disable-next-line eqeqeq
return x == y; // shortcut for step 13.b.
}
return false;
};node_modules\es-abstract\2022\IsLessThan.js (Line 20:1 - Line 36:3), node_modules\es-abstract\2025\IsLessThan.js (Line 21:1 - Line 36:10)
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function IsLessThan(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
ifnode_modules\es-abstract\2022\IsLessThan.js (Line 49:2 - Line 87:2), node_modules\es-abstract\2025\IsLessThan.js (Line 59:2 - Line 97:2)
}
var nx;
var ny;
if (typeof px === 'bigint' && typeof py === 'string') {
ny = StringToBigInt(py);
if (typeof ny === 'undefined') {
return void undefined;
}
return BigIntLessThan(px, ny);
}
if (typeof px === 'string' && typeof py === 'bigint') {
nx = StringToBigInt(px);
if (typeof nx === 'undefined') {
return void undefined;
}
return BigIntLessThan(nx, py);
}
nx = ToNumeric(px);
ny = ToNumeric(py);
if (typeof nx === typeof ny) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both finite, and the same type
};node_modules\es-abstract\2022\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2022\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2022\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2022\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2022\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2022\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2022\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2022\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 18:1 - Line 36:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 20:1 - Line 38:2)
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = LengthOfArrayLike(val,node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 36:9 - Line 50:27), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 38:4 - Line 52:24)
); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnPropertyNamesnode_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 50:27 - Line 66:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 52:24 - Line 68:2)
(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2022\IntegerIndexedElementSet.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\TypedArraySetElement.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
var arrayTypeName = whichTypedArray(O);
if (!arrayTypeName) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
var contentType = arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array' ? 'BigInt' : 'Number';
var numValue = contentType === 'BigInt' ? ToBigInt(value) : ToNumber(value); // steps 1 - 2
if (IsValidIntegerIndex(O, index)) { // step 3
var offset = typedArrayByteOffset(O); // step 3.a
var elementSize = TypedArrayElementSize(O); // step 3.b
var indexedPosition = (index * elementSize) + offset; // step 3.c
var elementType = TypedArrayElementType(O); // step 3.d
SetValueInBuffer(typedArrayBuffer(O), indexedPosition, elementType, numValue, true, 'Unordered'); // step 3.e
}
};node_modules\es-abstract\2022\IntegerIndexedElementGet.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\TypedArrayGetElement.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
// https://262.ecma-international.org/13.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
if (!IsValidIntegerIndex(O, index)) {
return void undefined; // step 1
}
var offset = typedArrayByteOffset(O); // step 2
var elementSize = TypedArrayElementSize(O); // step 3
var indexedPosition = (index * elementSize) + offset; // step 4
var elementType = TypedArrayElementType(O); // step 5
return GetValueFromBuffer(typedArrayBuffer(O), indexedPosition, elementType, true, 'Unordered'); // step 11
};node_modules\es-abstract\2022\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2022\InstallErrorCause.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\InstallErrorCause.js (Line 1:1 - Line 21:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
// https://262.ecma-international.org/13.0/#sec-installerrorcause
module.exports = function InstallErrorCause(O, options) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (isObject(options) && HasProperty(options, 'cause')) {
var cause = Get(options, 'cause');
CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
}
};node_modules\es-abstract\2022\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2022\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2022\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2022\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2022\GetValueFromBuffer.js (Line 1:1 - Line 96:2), node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 1:1 - Line 95:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered') {
throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};node_modules\es-abstract\2022\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2022\GetSubstitution.js (Line 7:28 - Line 23:72), node_modules\es-abstract\2025\GetSubstitution.js (Line 7:18 - Line 22:4)
);
var Get = require('./Get');
var IsArray = require('./IsArray');
var min = require('./min');
var StringIndexOf = require('./StringIndexOf');
var StringToNumber = require('./StringToNumber');
var substring = require('./substring');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isPrefixOf = require('../helpers/isPrefixOf');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
var startsWithDollarDigit = regexTester(/^\$[0-9]/);
// http://www.ecma-international.org/ecma-262/13.0/#sec-getsubstitutionnode_modules\es-abstract\2022\GetSubstitution.js (Line 25:1 - Line 64:6), node_modules\es-abstract\2025\GetSubstitution.js (Line 26:1 - Line 65:8)
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacementTemplate) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof namedCaptures !== 'undefined' && !isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: `namedCaptures` must be `undefined` or an Object');
}
if (typeof replacementTemplate !== 'string') {
throw new $TypeError('Assertion failed: `replacementTemplate` must be a String');
}
var stringLength = str.length; // step 1
if (position > stringLength) {
throw new $TypeError('Assertion failed: position > stringLength, got ' + inspect(position)); // step 2
}
var templateRemainder = replacementTemplate; // step 3
var result = ''; // step 4
while (templateRemainder !== '') { // step 5
// 5.a NOTE: The following steps isolate ref (a prefix of templateRemainder), determine refReplacement (its replacement), and then append that replacement to result.
var ref, refReplacement, foundnode_modules\es-abstract\2022\GetSubstitution.js (Line 64:6 - Line 81:6), node_modules\es-abstract\2025\GetSubstitution.js (Line 65:15 - Line 82:4)
, capture;
if (isPrefixOf('$$', templateRemainder)) { // step 5.b
ref = '$$'; // step 5.b.i
refReplacement = '$'; // step 5.b.ii
} else if (isPrefixOf('$`', templateRemainder)) { // step 5.c
ref = '$`'; // step 5.c.i
refReplacement = substring(str, 0, position); // step 5.c.ii
} else if (isPrefixOf('$&', templateRemainder)) { // step 5.d
ref = '$&'; // step 5.d.i
refReplacement = matched; // step 5.d.ii
} else if (isPrefixOf('$\'', templateRemainder)) { // step 5.e
ref = '$\''; // step 5.e.i
var matchLength = matched.length; // step 5.e.ii
var tailPos = position + matchLength; // step 5.e.iii
refReplacement = substring(str, min(tailPos, stringLength)); // step 5.e.iv
// 5.e.v NOTE: tailPos can exceed stringLength only if this abstract operation was invoked by a call to the intrinsic @@replace method of %RegExp.prototype% on an object whose "exec" property is not the intrinsic %RegExp.prototype.exec%.
} else if (startsWithDollarDigit(templateRemainder)) { // step 5.f
foundnode_modules\es-abstract\2022\GetSubstitution.js (Line 105:4 - Line 137:2), node_modules\es-abstract\2023\GetSubstitution.js (Line 106:4 - Line 148:2)
}
} else if (isPrefixOf('$<', templateRemainder)) { // step 5.g
var gtPos = StringIndexOf(templateRemainder, '>', 0); // step 5.g.i
if (gtPos === -1 || typeof namedCaptures === 'undefined') { // step 5.g.ii
ref = '$<'; // step 5.g.ii.1
refReplacement = ref; // step 5.g.ii.2
} else { // step 5.g.iii
ref = substring(templateRemainder, 0, gtPos + 1); // step 5.g.iii.1
var groupName = substring(templateRemainder, 2, gtPos); // step 5.g.iii.2
if (!isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: Type(namedCaptures) is not Object'); // step 5.g.iii.3
}
capture = Get(namedCaptures, groupName); // step 5.g.iii.4
if (typeof capture === 'undefined') { // step 5.g.iii.5
refReplacement = ''; // step 5.g.iii.5.a
} else { // step 5.g.iii.6
refReplacement = ToString(capture); // step 5.g.iii.6.a
}
}
} else { // step 5.h
ref = substring(templateRemainder, 0, 1); // step 5.h.i
refReplacement = ref; // step 5.h.ii
}
var refLength = ref.length; // step 5.i
templateRemainder = substring(templateRemainder, refLength); // step 5.j
result += refReplacement; // step 5.k
}
return result; // step 6
};node_modules\es-abstract\2022\GetStringIndex.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\GetStringIndex.js (Line 1:1 - Line 27:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var StringToCodePoints = require('./StringToCodePoints');
var $indexOf = callBound('String.prototype.indexOf');
// https://262.ecma-international.org/13.0/#sec-getstringindex
module.exports = function GetStringIndex(S, e) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(e) || e < 0) {
throw new $TypeError('Assertion failed: `e` must be a non-negative integer');
}
if (S === '') {
return 0;
}
var codepoints = StringToCodePoints(S);
var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]);
return eUTF;
};node_modules\es-abstract\2022\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2022\GetPromiseResolve.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\GetPromiseResolve.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-getpromiseresolve
module.exports = function GetPromiseResolve(promiseConstructor) {
if (!IsConstructor(promiseConstructor)) {
throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor');
}
var promiseResolve = Get(promiseConstructor, 'resolve');
if (IsCallable(promiseResolve) === false) {
throw new $TypeError('`resolve` method is not callable');
}
return promiseResolve;
};node_modules\es-abstract\2022\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2022\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2022\GetMatchString.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\GetMatchString.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchstring
module.exports = function GetMatchString(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']);
};node_modules\es-abstract\2022\GetMatchIndexPair.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\GetMatchIndexPair.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchindexpair
module.exports = function GetMatchIndexPair(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return [match['[[StartIndex]]'], match['[[EndIndex]]']];
};node_modules\es-abstract\2022\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2022\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2022\FlattenIntoArray.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
// https://262.ecma-international.org/11.0/#sec-flattenintoarray
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = LengthOfArrayLike(element);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2022\EnumerableOwnPropertyNames.js (Line 1:1 - Line 14:71), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 13:72)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-enumerableownpropertiesnode_modules\es-abstract\2022\EnumerableOwnPropertyNames.js (Line 16:27 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 15:24 - Line 36:2)
(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2022\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2022\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2022\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2022\DefineMethodProperty.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\DefineMethodProperty.js (Line 1:1 - Line 42:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-definemethodproperty
module.exports = function DefineMethodProperty(homeObject, key, closure, enumerable) {
if (!isObject(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an Object');
}
if (!isPropertyKey(key)) {
throw new $TypeError('Assertion failed: `key` is not a Property Key or a Private Name');
}
if (typeof closure !== 'function') {
throw new $TypeError('Assertion failed: `closure` is not a function');
}
if (typeof enumerable !== 'boolean') {
throw new $TypeError('Assertion failed: `enumerable` is not a Boolean');
}
// 1. Assert: homeObject is an ordinary, extensible object with no non-configurable properties.
if (!IsExtensible(homeObject)) {
throw new $TypeError('Assertion failed: `homeObject` is not an ordinary, extensible object, with no non-configurable properties');
}
// 2. If key is a Private Name, then
// a. Return PrivateElement { [[Key]]: key, [[Kind]]: method, [[Value]]: closure }.
// 3. Else,
var desc = { // step 3.a
'[[Value]]': closure,
'[[Writable]]': true,
'[[Enumerable]]': enumerable,
'[[Configurable]]': true
};
DefinePropertyOrThrow(homeObject, key, desc); // step 3.b
};node_modules\es-abstract\2022\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2022\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2022\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2022\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2022\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2022\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateIterResultObject = require('./CreateIterResultObject');
var CreateMethodProperty = require('./CreateMethodProperty');
var Get = require('./Get');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var RegExpExec = require('./RegExpExec');
var Set = require('./Set');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var SLOT = require('internal-slot');
var setToStringTag = require('es-set-tostringtag');
var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {
if (typeof S !== 'string') {
throw new $TypeError('`S` must be a string');
}
if (typeof global !== 'boolean') {
throw new $TypeError('`global` must be a boolean');
}
if (typeof fullUnicode !== 'boolean') {
throw new $TypeError('`fullUnicode` must be a boolean');
}
SLOT.set(this, '[[IteratingRegExp]]', R);
SLOT.set(this, '[[IteratedString]]', S);
SLOT.set(this, '[[Global]]', global);
SLOT.set(this, '[[Unicode]]', fullUnicode);
SLOT.set(this, '[[Done]]', false);
};
if (IteratorPrototype) {
RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
}
var RegExpStringIteratorNext = function next() {
var O = this; // eslint-disable-line no-invalid-this
if (!isObject(O)) {
throw new $TypeError('receiver must be an object');
}
if (
!(O instanceof RegExpStringIterator)
|| !SLOT.has(O, '[[IteratingRegExp]]')
|| !SLOT.has(O, '[[IteratedString]]')
|| !SLOT.has(O, '[[Global]]')
|| !SLOT.has(O, '[[Unicode]]')
|| !SLOT.has(O, '[[Done]]')
) {
throw new $TypeError('"this" value must be a RegExpStringIterator instance');
}
if (SLOT.get(O, '[[Done]]')) {
return CreateIterResultObject(undefined, true);
}
var R = SLOT.get(O, '[[IteratingRegExp]]');
var S = SLOT.get(O, '[[IteratedString]]');
var global = SLOT.get(O, '[[Global]]');
var fullUnicode = SLOT.get(O, '[[Unicode]]');
var match = RegExpExec(R, S);
if (match === null) {
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(undefined, true);
}
if (global) {
var matchStr = ToString(Get(match, '0'));
if (matchStr === '') {
var thisIndex = ToLength(Get(R, 'lastIndex'));
var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);
Set(R, 'lastIndex', nextIndex, true);
}
return CreateIterResultObject(match, false);
}
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(match, false);
};
CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);
if (hasSymbols) {
setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');
if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {
var iteratorFn = function SymbolIterator() {
return this;
};
CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);
}
}
// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator
module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {
// assert R.global === global && R.unicode === fullUnicode?
return new RegExpStringIterator(R, S, global, fullUnicode);
};node_modules\es-abstract\2022\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\CreateNonEnumerableDataPropertyOrThrow.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow
module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefinePropertyOrThrow(O, P, newDesc);
};node_modules\es-abstract\2022\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2022\CreateListFromArrayLike.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object'];
// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = LengthOfArrayLike(obj);
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2022\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2022\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 12:1 - Line 23:7), node_modules\es-abstract\2025\CreateDataPropertyOrThrow.js (Line 12:1 - Line 23:2)
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
returnnode_modules\es-abstract\2022\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2022\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObject = require('./CreateIterResultObject');
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord[node_modules\es-abstract\2022\CreateAsyncFromSyncIterator.js (Line 40:2 - Line 118:76), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 40:19 - Line 118:76)
);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciteratornode_modules\es-abstract\2022\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 120:1 - Line 137:2)
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
if (!isIteratorRecord(syncIteratorRecord)) {
throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
}
// var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2022\CopyDataProperties.js (Line 1:1 - Line 69:2), node_modules\es-abstract\2025\CopyDataProperties.js (Line 1:1 - Line 69:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var forEach = require('../helpers/forEach');
var every = require('../helpers/every');
var some = require('../helpers/some');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var keys = OwnPropertyKeys(from);
forEach(keys, function (nextKey) {
var excluded = some(excludedItems, function (e) {
return SameValue(e, nextKey) === true;
});
/*
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
*/
var enumerable = $isEnumerable(from, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& isInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(from, nextKey);
CreateDataPropertyOrThrow(target, nextKey, propValue);
}
});
return target;
};node_modules\es-abstract\2022\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2022\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2022\CodePointsToString.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CodePointsToString.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-codepointstostring
module.exports = function CodePointsToString(text) {
if (!IsArray(text)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
var result = '';
forEach(text, function (cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
result += UTF16EncodeCodePoint(cp);
});
return result;
};node_modules\es-abstract\2022\CodePointAt.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\CodePointAt.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');
var $charAt = callBound('String.prototype.charAt');
var $charCodeAt = callBound('String.prototype.charCodeAt');
// https://262.ecma-international.org/12.0/#sec-codepointat
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),
'[[CodeUnitCount]]': 2,
'[[IsUnpairedSurrogate]]': false
};
};node_modules\es-abstract\2022\CloneArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\CloneArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsConstructor = require('./IsConstructor');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf');
var isInteger = require('math-intrinsics/isInteger');
var isArrayBuffer = require('is-array-buffer');
var arrayBufferSlice = require('arraybuffer.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-clonearraybuffer
module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) {
if (!isArrayBuffer(srcBuffer)) {
throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance');
}
if (!isInteger(srcByteOffset) || srcByteOffset < 0) {
throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer');
}
if (!isInteger(srcLength) || srcLength < 0) {
throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer');
}
if (!IsConstructor(cloneConstructor)) {
throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor');
}
// 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength).
var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda
if (IsDetachedBuffer(srcBuffer)) {
throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4
}
/*
5. Let srcBlock be srcBuffer.[[ArrayBufferData]].
6. Let targetBlock be targetBuffer.[[ArrayBufferData]].
7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength).
*/
var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7
OrdinarySetPrototypeOf(targetBuffer, proto); // step 3
return targetBuffer; // step 8
};node_modules\es-abstract\2022\clamp.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\clamp.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var max = require('math-intrinsics/max');
var min = require('math-intrinsics/min');
// https://262.ecma-international.org/12.0/#clamping
module.exports = function clamp(x, lower, upper) {
if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) {
throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`');
}
return min(max(lower, x), upper);
};node_modules\es-abstract\2022\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2022\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2022\Canonicalize.js (Line 36:2 - Line 51:2), node_modules\es-abstract\5\Canonicalize.js (Line 23:2 - Line 38:2)
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2022\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2022\ByteListEqual.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\ByteListEqual.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistequal
module.exports = function ByteListEqual(xBytes, yBytes) {
if (!IsArray(xBytes) || !IsArray(yBytes)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xBytes.length !== yBytes.length) {
return false;
}
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xByte !== yByte) {
return false;
}
}
return true;
};node_modules\es-abstract\2022\ByteListBitwiseOp.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\ByteListBitwiseOp.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop
module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) {
if (op !== '&' && op !== '^' && op !== '|') {
throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`');
}
if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var result = [];
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var resultByte;
if (op === '&') {
resultByte = xByte & yByte;
} else if (op === '^') {
resultByte = xByte ^ yByte;
} else {
resultByte = xByte | yByte;
}
result[result.length] = resultByte;
}
return result;
};node_modules\es-abstract\2022\BinaryXor.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryXor.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};node_modules\es-abstract\2022\BinaryOr.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryOr.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x | y;
};node_modules\es-abstract\2022\BinaryAnd.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryAnd.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryand
module.exports = function BinaryAnd(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x & y;
};node_modules\es-abstract\2022\BigIntBitwiseOp.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2025\BigIntBitwiseOp.js (Line 1:1 - Line 63:2)
'use strict';
var $TypeError = require('es-errors/type');
// var $BigInt = GetIntrinsic('%BigInt%', true);
// var $pow = require('math-intrinsics/pow');
// var BinaryAnd = require('./BinaryAnd');
// var BinaryOr = require('./BinaryOr');
// var BinaryXor = require('./BinaryXor');
// var modulo = require('./modulo');
// var zero = $BigInt && $BigInt(0);
// var negOne = $BigInt && $BigInt(-1);
// var two = $BigInt && $BigInt(2);
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
module.exports = function BigIntBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('`x` and `y` must be BigInts');
}
if (op === '&') {
return x & y;
}
if (op === '|') {
return x | y;
}
return x ^ y;
/*
var result = zero;
var shift = 0;
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
var xDigit = modulo(x, two);
var yDigit = modulo(y, two);
if (op === '&') {
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
} else if (op === '|') {
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
} else if (op === '^') {
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
}
shift += 1;
x = (x - xDigit) / two;
y = (y - yDigit) / two;
}
var tmp;
if (op === '&') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else if (op === '|') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else {
tmp = BinaryXor(modulo(x, two), modulo(y, two));
}
if (tmp !== 0) {
result -= $pow(2, shift);
}
return result;
*/
};node_modules\es-abstract\2022\AsyncIteratorClose.js (Line 1:1 - Line 70:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 70:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/12.0/#sec-asynciteratorclose
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return $then(
$then(
$then(
new $Promise(function (resolve) {
resolve(GetMethod(iterator, 'return')); // step 4
// resolve(Call(ret, iterator, [])); // step 6
}),
function (returnV) { // step 5.a
if (typeof returnV === 'undefined') {
return completion; // step 5.b
}
return Call(returnV, iterator); // step 5.c, 5.d.
}
),
null,
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 6
} else {
throw e; // step 7
}
}
),
function (innerResult) { // step 8
if (completion.type() === 'throw') {
completion['?'](); // step 6
}
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
}
);
};node_modules\es-abstract\2022\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObject = require('./CreateIterResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2022\ArraySpeciesCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\ArraySpeciesCreate.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var ArrayCreate = require('./ArrayCreate');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var isArray = IsArray(originalArray);
if (!isArray) {
return ArrayCreate(length);
}
var C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
if (typeof C === 'undefined') {
return ArrayCreate(length);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(length); // Construct(C, length);
};node_modules\es-abstract\2022\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2022\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/12.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 3, 5
if (proto !== $ArrayPrototype) { // step 4
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 6
A.length = length;
}
/* step 6, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2022\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2)
'use strict';
var $TypeError = require('es-errors/type');
var HasOwnProperty = require('./HasOwnProperty');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
var Type = require('./Type');
var NumberAdd = require('./Number/add');
var NumberBitwiseAND = require('./Number/bitwiseAND');
var NumberBitwiseOR = require('./Number/bitwiseOR');
var NumberBitwiseXOR = require('./Number/bitwiseXOR');
var NumberDivide = require('./Number/divide');
var NumberExponentiate = require('./Number/exponentiate');
var NumberLeftShift = require('./Number/leftShift');
var NumberMultiply = require('./Number/multiply');
var NumberRemainder = require('./Number/remainder');
var NumberSignedRightShift = require('./Number/signedRightShift');
var NumberSubtract = require('./Number/subtract');
var NumberUnsignedRightShift = require('./Number/unsignedRightShift');
var BigIntAdd = require('./BigInt/add');
var BigIntBitwiseAND = require('./BigInt/bitwiseAND');
var BigIntBitwiseOR = require('./BigInt/bitwiseOR');
var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR');
var BigIntDivide = require('./BigInt/divide');
var BigIntExponentiate = require('./BigInt/exponentiate');
var BigIntLeftShift = require('./BigInt/leftShift');
var BigIntMultiply = require('./BigInt/multiply');
var BigIntRemainder = require('./BigInt/remainder');
var BigIntSignedRightShift = require('./BigInt/signedRightShift');
var BigIntSubtract = require('./BigInt/subtract');
var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift');
// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator
// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table
var table = {
'**': [NumberExponentiate, BigIntExponentiate],
'*': [NumberMultiply, BigIntMultiply],
'/': [NumberDivide, BigIntDivide],
'%': [NumberRemainder, BigIntRemainder],
'+': [NumberAdd, BigIntAdd],
'-': [NumberSubtract, BigIntSubtract],
'<<': [NumberLeftShift, BigIntLeftShift],
'>>': [NumberSignedRightShift, BigIntSignedRightShift],
'>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift],
'&': [NumberBitwiseAND, BigIntBitwiseAND],
'^': [NumberBitwiseXOR, BigIntBitwiseXOR],
'|': [NumberBitwiseOR, BigIntBitwiseOR]
};
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
if (typeof opText !== 'string' || !HasOwnProperty(table, opText)) {
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
}
if (opText === '+') {
var lprim = ToPrimitive(lval);
var rprim = ToPrimitive(rval);
if (typeof lprim === 'string' || typeof rprim === 'string') {
var lstr = ToString(lprim);
var rstr = ToString(rprim);
return lstr + rstr;
}
/* eslint no-param-reassign: 1 */
lval = lprim;
rval = rprim;
}
var lnum = ToNumeric(lval);
var rnum = ToNumeric(rval);
if (Type(lnum) !== Type(rnum)) {
throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ');
}
var Operation = table[opText][typeof lnum === 'bigint' ? 1 : 0];
return Operation(lnum, rnum);
};node_modules\es-abstract\2022\AdvanceStringIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 1:1 - Line 30:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
// https://262.ecma-international.org/12.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var cp = CodePointAt(S, index);
return index + cp['[[CodeUnitCount]]'];
};node_modules\es-abstract\2022\AddToKeptObjects.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\AddToKeptObjects.js (Line 1:1 - Line 18:2)
'use strict';
var SLOT = require('internal-slot');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var ClearKeptObjects = require('./ClearKeptObjects');
// https://262.ecma-international.org/12.0/#sec-addtokeptobjects
module.exports = function AddToKeptObjects(object) {
if (!isObject(object)) {
throw new $TypeError('Assertion failed: `object` must be an Object');
}
var arr = SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]');
arr[arr.length] = object;
};node_modules\es-abstract\2022\AddEntriesFromIterable.js (Line 1:1 - Line 16:74), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 16:74)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterablenode_modules\es-abstract\2022\AddEntriesFromIterable.js (Line 18:1 - Line 25:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 18:1 - Line 25:2)
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable)node_modules\es-abstract\2022\AddEntriesFromIterable.js (Line 25:9 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 25:7 - Line 44:2)
);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2021\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2021\WordCharacters.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(IgnoreCase, Unicode) {
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
var U = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.S[c]; // step 3
}
});
if ((!Unicode || !IgnoreCase) && U.length > 0) {
throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4
}
return A + U; // step 5, 6
};node_modules\es-abstract\2021\WeakRefDeref.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\WeakRefDeref.js (Line 1:1 - Line 23:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var $deref = callBound('WeakRef.prototype.deref', true);
var isWeakRef = require('is-weakref');
var AddToKeptObjects = require('./AddToKeptObjects');
// https://262.ecma-international.org/12.0/#sec-weakrefderef
module.exports = function WeakRefDeref(weakRef) {
if (!isWeakRef(weakRef)) {
throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef');
}
var target = $deref(weakRef);
if (target) {
AddToKeptObjects(target);
}
return target;
};node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 8:38 - Line 17:82), node_modules\es-abstract\2025\ValidateAndApplyPropertyDescriptor.js (Line 8:41 - Line 17:83)
);
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptornode_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 24:53 - Line 35:2), node_modules\es-abstract\2025\ValidateAndApplyPropertyDescriptor.js (Line 27:45 - Line 39:8)
);
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof Onode_modules\es-abstract\2021\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\UTF16SurrogatePairToCodePoint.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2021\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-utf16encoding
module.exports = function UTF16EncodeCodePoint(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2021\UnicodeEscape.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UnicodeEscape.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/11.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start');
};node_modules\es-abstract\2021\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2021\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2021\Type.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\Type.js (Line 1:1 - Line 15:2)
'use strict';
var ES5Type = require('../5/Type');
// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
module.exports = function Type(x) {
if (typeof x === 'symbol') {
return 'Symbol';
}
if (typeof x === 'bigint') {
return 'BigInt';
}
return ES5Type(x);
};node_modules\es-abstract\2021\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2021\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2021\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2021\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2021\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2021\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2021\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2021\ToNumeric.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToNumeric.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/11.0/#sec-tonumeric
module.exports = function ToNumeric(argument) {
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof primValue === 'bigint') {
return primValue;
}
return ToNumber(primValue);
};node_modules\es-abstract\2021\ToNumber.js (Line 12:25 - Line 24:4), node_modules\es-abstract\2025\StringToNumber.js (Line 10:18 - Line 22:63)
);
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
varnode_modules\es-abstract\2021\ToNumber.js (Line 28:1 - Line 37:3), node_modules\es-abstract\2025\ToNumber.js (Line 14:1 - Line 23:7)
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
ifnode_modules\es-abstract\2021\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2021\ToIntegerOrInfinity.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2022\ToIntegerOrInfinity.js (Line 1:1 - Line 20:2)
'use strict';
var abs = require('./abs');
var floor = require('./floor');
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity
module.exports = function ToIntegerOrInfinity(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0) { return 0; }
if (!$isFinite(number)) { return number; }
var integer = floor(abs(number));
if (integer === 0) { return 0; }
return $sign(number) * integer;
};node_modules\es-abstract\2021\ToIndex.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2023\ToIndex.js (Line 1:1 - Line 24:2)
'use strict';
var $RangeError = require('es-errors/range');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var ToLength = require('./ToLength');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/8.0/#sec-toindex
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integerIndex = ToIntegerOrInfinity(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValue(integerIndex, index)) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return index;
};node_modules\es-abstract\2021\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2021\ToBigUint64.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobiguint64
module.exports = function ToBigUint64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit;
};node_modules\es-abstract\2021\ToBigInt64.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31)));
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobigint64
module.exports = function ToBigInt64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit;
};node_modules\es-abstract\2021\ToBigInt.js (Line 1:1 - Line 13:4), node_modules\es-abstract\2025\ToBigInt.js (Line 1:1 - Line 13:57)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var StringToBigInt = require('./StringToBigInt');
var ToPrimitive = require('./ToPrimitive');
varnode_modules\es-abstract\2021\ToBigInt.js (Line 17:1 - Line 38:6), node_modules\es-abstract\2025\ToBigInt.js (Line 15:1 - Line 36:7)
module.exports = function ToBigInt(argument) {
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
var prim = ToPrimitive(argument, $Number);
if (prim == null) {
throw new $TypeError('Cannot convert null or undefined to a BigInt');
}
if (typeof prim === 'boolean') {
return prim ? $BigInt(1) : $BigInt(0);
}
if (typeof prim === 'number') {
throw new $TypeError('Cannot convert a Number value to a BigInt');
}
if (typeof prim === 'string') {
var n = StringToBigInt(prim);
if (isNaNnode_modules\es-abstract\2021\ToBigInt.js (Line 38:2 - Line 53:2), node_modules\es-abstract\2025\ToBigInt.js (Line 36:12 - Line 51:2)
) {
throw new $TypeError('Failed to parse String to BigInt');
}
return n;
}
if (typeof prim === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a BigInt');
}
if (typeof prim !== 'bigint') {
throw new $SyntaxError('Assertion failed: unknown primitive type');
}
return prim;
};node_modules\es-abstract\2021\TimeZoneString.js (Line 1:1 - Line 16:64), node_modules\es-abstract\2022\TimeZoneString.js (Line 1:1 - Line 16:64)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/12.0/#sec-timezoneestringnode_modules\es-abstract\2021\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2021\thisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2023\thisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2021\thisBigIntValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2023\thisBigIntValue.js (Line 1:1 - Line 18:2)
'use strict';
var callBound = require('call-bound');
var $SyntaxError = require('es-errors/syntax');
var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
// https://262.ecma-international.org/11.0/#sec-thisbigintvalue
module.exports = function thisBigIntValue(value) {
if (typeof value === 'bigint') {
return value;
}
if (!$bigIntValueOf) {
throw new $SyntaxError('BigInt is not supported');
}
return $bigIntValueOf(value);
};node_modules\es-abstract\2021\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2021\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2021\substring.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\substring.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#substring
module.exports = function substring(S, inclusiveStart, exclusiveEnd) {
if (typeof S !== 'string' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers');
}
return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length);
};node_modules\es-abstract\2021\StringToCodePoints.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\StringToCodePoints.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var CodePointAt = require('./CodePointAt');
// https://262.ecma-international.org/12.0/#sec-stringtocodepoints
module.exports = function StringToCodePoints(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var codePoints = [];
var size = string.length;
var position = 0;
while (position < size) {
var cp = CodePointAt(string, position);
codePoints[codePoints.length] = cp['[[CodePoint]]'];
position += cp['[[CodeUnitCount]]'];
}
return codePoints;
};node_modules\es-abstract\2021\StringToBigInt.js (Line 11:1 - Line 21:4), node_modules\es-abstract\2025\StringToBigInt.js (Line 11:1 - Line 21:5)
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return NaNnode_modules\es-abstract\2021\StringPad.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2023\StringPad.js (Line 1:1 - Line 41:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var $strSlice = callBound('String.prototype.slice');
// https://262.ecma-international.org/11.0/#sec-stringpad
module.exports = function StringPad(O, maxLength, fillString, placement) {
if (placement !== 'start' && placement !== 'end') {
throw new $TypeError('Assertion failed: `placement` must be "start" or "end"');
}
var S = ToString(O);
var intMaxLength = ToLength(maxLength);
var stringLength = S.length;
if (intMaxLength <= stringLength) {
return S;
}
var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString);
if (filler === '') {
return S;
}
var fillLen = intMaxLength - stringLength;
// the String value consisting of repeated concatenations of filler truncated to length fillLen.
var truncatedStringFiller = '';
while (truncatedStringFiller.length < fillLen) {
truncatedStringFiller += filler;
}
truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen);
if (placement === 'start') {
return truncatedStringFiller + S;
}
return S + truncatedStringFiller;
};node_modules\es-abstract\2021\StringIndexOf.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2024\StringIndexOf.js (Line 1:1 - Line 36:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-stringindexof
module.exports = function StringIndexOf(string, searchValue, fromIndex) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
if (typeof searchValue !== 'string') {
throw new $TypeError('Assertion failed: `searchValue` must be a String');
}
if (!isInteger(fromIndex) || fromIndex < 0) {
throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer');
}
var len = string.length;
if (searchValue === '' && fromIndex <= len) {
return fromIndex;
}
var searchLen = searchValue.length;
for (var i = fromIndex; i <= (len - searchLen); i += 1) {
var candidate = $slice(string, i, i + searchLen);
if (candidate === searchValue) {
return i;
}
}
return -1;
};node_modules\es-abstract\2021\StringGetOwnProperty.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var isPropertyKey = require('../helpers/isPropertyKey');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !isInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2021\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2021\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2021\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2021\SetValueInBuffer.js (Line 1:1 - Line 92:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 1:1 - Line 92:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumericToRawBytes = require('./NumericToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/12.0/#sec-setvalueinbuffer
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex) || byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3
throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number');
}
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
var elementSize = tableTAO.size['$' + type]; // step 5
// 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6
var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7
if (isSAB) { // step 8
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 10. Return NormalCompletion(undefined).
};node_modules\es-abstract\2021\SetTypedArrayFromTypedArray.js (Line 1:1 - Line 24:9), node_modules\es-abstract\2022\SetTypedArrayFromTypedArray.js (Line 1:1 - Line 20:22)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteLength = require('typed-array-byte-length');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var isInteger = require('math-intrinsics/isInteger');
var CloneArrayBuffer = require('./CloneArrayBuffer');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsSharedArrayBuffer = require('./IsSharedArrayBuffer');
var SameValue = require('./SameValue');
var SetValueInBuffer = require('./SetValueInBuffer');
var tableTAOnode_modules\es-abstract\2021\SetTypedArrayFromTypedArray.js (Line 28:1 - Line 40:10), node_modules\es-abstract\2023\SetTypedArrayFromTypedArray.js (Line 27:1 - Line 40:2)
module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
var whichSource = whichTypedArray(source);
if (!whichSource) {
throw new $TypeError('Assertion failed: source must be a TypedArray instance'); // step 1node_modules\es-abstract\2021\SetTypedArrayFromArrayLike.js (Line 11:28 - Line 23:9), node_modules\es-abstract\2022\SetTypedArrayFromArrayLike.js (Line 11:20 - Line 22:22)
);
var Get = require('./Get');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
var tableTAOnode_modules\es-abstract\2021\SetTypedArrayFromArrayLike.js (Line 27:1 - Line 38:10), node_modules\es-abstract\2023\SetTypedArrayFromArrayLike.js (Line 21:1 - Line 33:2)
module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
if (isTypedArray(source)) {
throw new $TypeError('Assertion failed: source must not be a TypedArray instance'); // step 1node_modules\es-abstract\2021\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2021\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2021\SetFunctionLength.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/12.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length !== Infinity && (!isInteger(length) || length < 0)) {
throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};node_modules\es-abstract\2021\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2021\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2021\SameValueNonNumeric.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2022\SameValueNonNumeric.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var Type = require('./Type');
// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric
module.exports = function SameValueNonNumeric(x, y) {
if (typeof x === 'number' || typeof x === 'bigint') {
throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values');
}
if (Type(x) !== Type(y)) {
throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2021\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2021\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2021\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2021\RawBytesToNumeric.js (Line 1:1 - Line 67:2), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 1:1 - Line 67:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric
module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt);
};node_modules\es-abstract\2021\QuoteJSONString.js (Line 1:1 - Line 52:2), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 52:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var StringToCodePoints = require('./StringToCodePoints');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var hasOwn = require('hasown');
// https://262.ecma-international.org/12.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(StringToCodePoints(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16EncodeCodePoint(cCharCode);
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2021\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2021\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2021\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2021\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};node_modules\es-abstract\2021\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2021\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2021\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2021\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2025\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var hasOwn = require('hasown');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2021\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2021\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return OrdinaryObjectCreate(proto, slots);
};node_modules\es-abstract\2021\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2021\NumericToRawBytes.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToBigInt64 = require('./ToBigInt64');
var ToBigUint64 = require('./ToBigUint64');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32,
$BigInt64: ToBigInt64,
$BigUint64: ToBigUint64
};
// https://262.ecma-international.org/11.0/#sec-numerictorawbytes
module.exports = function NumericToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2021\NumberToBigInt.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\NumberToBigInt.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-numbertobigint
module.exports = function NumberToBigInt(number) {
if (typeof number !== 'number') {
throw new $TypeError('Assertion failed: `number` must be a String');
}
if (!isInteger(number)) {
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt(number);
};node_modules\es-abstract\2021\NumberBitwiseOp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\NumberBitwiseOp.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};node_modules\es-abstract\2021\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2021\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2021\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2021\MakeTime.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\MakeTime.js (Line 1:1 - Line 23:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-maketime
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToIntegerOrInfinity(hour);
var m = ToIntegerOrInfinity(min);
var s = ToIntegerOrInfinity(sec);
var milli = ToIntegerOrInfinity(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2021\MakeDay.js (Line 1:1 - Line 36:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToIntegerOrInfinity(year);
var m = ToIntegerOrInfinity(month);
var dt = ToIntegerOrInfinity(date);
var ym = y + floor(m / 12);
if (!$isFinite(ym)) {
return NaN;
}
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2021\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2021\LengthOfArrayLike.js (Line 1:1 - Line 18:27), node_modules\es-abstract\2025\LengthOfArrayLike.js (Line 1:1 - Line 18:27)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all overnode_modules\es-abstract\2021\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2021\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2021\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2021\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2021\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2021\IterableToList.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2022\IterableToList.js (Line 1:1 - Line 26:2)
'use strict';
var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
// https://262.ecma-international.org/12.0/#sec-iterabletolist
module.exports = function IterableToList(items) {
var iterator;
if (arguments.length > 1) {
iterator = GetIterator(items, 'sync', arguments[1]);
} else {
iterator = GetIterator(items, 'sync');
}
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};node_modules\es-abstract\2021\IsWordChar.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2022\IsWordChar.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isInteger = require('math-intrinsics/isInteger');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
if (!isInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!isInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};node_modules\es-abstract\2021\IsValidIntegerIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2023\IsValidIntegerIndex.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isInteger = require('math-intrinsics/isInteger');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/12.0/#sec-isvalidintegerindex
module.exports = function IsValidIntegerIndex(O, index) {
// Assert: O is an Integer-Indexed exotic object.
var buffer = typedArrayBuffer(O); // step 1
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: Type(index) is not Number');
}
if (IsDetachedBuffer(buffer)) { return false; } // step 2
if (!isInteger(index)) { return false; } // step 3
if (isNegativeZero(index)) { return false; } // step 4
if (index < 0 || index >= O.length) { return false; } // step 5
return true; // step 6
};node_modules\es-abstract\2021\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2021\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2021\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2021\IsNoTearConfiguration.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2023\IsNoTearConfiguration.js (Line 1:1 - Line 16:2)
'use strict';
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var IsBigIntElementType = require('./IsBigIntElementType');
// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration
module.exports = function IsNoTearConfiguration(type, order) {
if (IsUnclampedIntegerElementType(type)) {
return true;
}
if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') {
return true;
}
return false;
};node_modules\es-abstract\2021\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2021\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2021\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2021\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2021\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2021\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2021\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2021\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2021\InternalizeJSONProperty.js (Line 1:1 - Line 66:2), node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnPropertyNames = require('./EnumerableOwnPropertyNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/11.0/#sec-internalizejsonproperty
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = LengthOfArrayLike(val, 'length'); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnPropertyNames(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2021\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2021\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2021\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2021\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2021\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2021\GetValueFromBuffer.js (Line 1:1 - Line 96:2), node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 1:1 - Line 95:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered') {
throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};node_modules\es-abstract\2021\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2021\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2021\GetPromiseResolve.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\GetPromiseResolve.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-getpromiseresolve
module.exports = function GetPromiseResolve(promiseConstructor) {
if (!IsConstructor(promiseConstructor)) {
throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor');
}
var promiseResolve = Get(promiseConstructor, 'resolve');
if (IsCallable(promiseResolve) === false) {
throw new $TypeError('`resolve` method is not callable');
}
return promiseResolve;
};node_modules\es-abstract\2021\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2021\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2021\GetIterator.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2022\GetIterator.js (Line 1:1 - Line 63:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true);
var inspect = require('object-inspect');
var hasSymbols = require('has-symbols')();
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/9.0/#sec-getiterator
module.exports = function GetIterator(obj, hint, method) {
var actualHint = hint;
if (arguments.length < 2) {
actualHint = 'sync';
}
if (actualHint !== 'sync' && actualHint !== 'async') {
throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint));
}
var actualMethod = method;
if (arguments.length < 3) {
if (actualHint === 'async') {
if (hasSymbols && $asyncIterator) {
actualMethod = GetMethod(obj, $asyncIterator);
}
if (actualMethod === undefined) {
throw new $SyntaxError("async from sync iterators aren't currently supported");
}
} else {
actualMethod = getIteratorMethod(ES, obj);
}
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
// TODO: This should return an IteratorRecord
/*
var nextMethod = GetV(iterator, 'next');
return {
'[[Iterator]]': iterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
*/
};node_modules\es-abstract\2021\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2021\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2021\FlattenIntoArray.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
// https://262.ecma-international.org/11.0/#sec-flattenintoarray
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = LengthOfArrayLike(element);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2021\EnumerableOwnPropertyNames.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnPropertyNames(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2021\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2021\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2021\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2021\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2021\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2021\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2021\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2021\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2021\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateIterResultObject = require('./CreateIterResultObject');
var CreateMethodProperty = require('./CreateMethodProperty');
var Get = require('./Get');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var RegExpExec = require('./RegExpExec');
var Set = require('./Set');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var SLOT = require('internal-slot');
var setToStringTag = require('es-set-tostringtag');
var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {
if (typeof S !== 'string') {
throw new $TypeError('`S` must be a string');
}
if (typeof global !== 'boolean') {
throw new $TypeError('`global` must be a boolean');
}
if (typeof fullUnicode !== 'boolean') {
throw new $TypeError('`fullUnicode` must be a boolean');
}
SLOT.set(this, '[[IteratingRegExp]]', R);
SLOT.set(this, '[[IteratedString]]', S);
SLOT.set(this, '[[Global]]', global);
SLOT.set(this, '[[Unicode]]', fullUnicode);
SLOT.set(this, '[[Done]]', false);
};
if (IteratorPrototype) {
RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
}
var RegExpStringIteratorNext = function next() {
var O = this; // eslint-disable-line no-invalid-this
if (!isObject(O)) {
throw new $TypeError('receiver must be an object');
}
if (
!(O instanceof RegExpStringIterator)
|| !SLOT.has(O, '[[IteratingRegExp]]')
|| !SLOT.has(O, '[[IteratedString]]')
|| !SLOT.has(O, '[[Global]]')
|| !SLOT.has(O, '[[Unicode]]')
|| !SLOT.has(O, '[[Done]]')
) {
throw new $TypeError('"this" value must be a RegExpStringIterator instance');
}
if (SLOT.get(O, '[[Done]]')) {
return CreateIterResultObject(undefined, true);
}
var R = SLOT.get(O, '[[IteratingRegExp]]');
var S = SLOT.get(O, '[[IteratedString]]');
var global = SLOT.get(O, '[[Global]]');
var fullUnicode = SLOT.get(O, '[[Unicode]]');
var match = RegExpExec(R, S);
if (match === null) {
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(undefined, true);
}
if (global) {
var matchStr = ToString(Get(match, '0'));
if (matchStr === '') {
var thisIndex = ToLength(Get(R, 'lastIndex'));
var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);
Set(R, 'lastIndex', nextIndex, true);
}
return CreateIterResultObject(match, false);
}
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(match, false);
};
CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);
if (hasSymbols) {
setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');
if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {
var iteratorFn = function SymbolIterator() {
return this;
};
CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);
}
}
// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator
module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {
// assert R.global === global && R.unicode === fullUnicode?
return new RegExpStringIterator(R, S, global, fullUnicode);
};node_modules\es-abstract\2021\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2021\CreateListFromArrayLike.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object'];
// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = LengthOfArrayLike(obj);
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2021\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2021\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2021\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2021\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2021\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 137:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 137:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObject = require('./CreateIterResultObject');
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
if (!isIteratorRecord(syncIteratorRecord)) {
throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
}
// var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2021\CopyDataProperties.js (Line 1:1 - Line 69:2), node_modules\es-abstract\2025\CopyDataProperties.js (Line 1:1 - Line 69:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var forEach = require('../helpers/forEach');
var every = require('../helpers/every');
var some = require('../helpers/some');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/12.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var keys = OwnPropertyKeys(from);
forEach(keys, function (nextKey) {
var excluded = some(excludedItems, function (e) {
return SameValue(e, nextKey) === true;
});
/*
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
*/
var enumerable = $isEnumerable(from, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& isInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(from, nextKey);
CreateDataPropertyOrThrow(target, nextKey, propValue);
}
});
return target;
};node_modules\es-abstract\2021\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2021\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2021\CodePointsToString.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CodePointsToString.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-codepointstostring
module.exports = function CodePointsToString(text) {
if (!IsArray(text)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
var result = '';
forEach(text, function (cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
result += UTF16EncodeCodePoint(cp);
});
return result;
};node_modules\es-abstract\2021\CodePointAt.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\CodePointAt.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');
var $charAt = callBound('String.prototype.charAt');
var $charCodeAt = callBound('String.prototype.charCodeAt');
// https://262.ecma-international.org/12.0/#sec-codepointat
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),
'[[CodeUnitCount]]': 2,
'[[IsUnpairedSurrogate]]': false
};
};node_modules\es-abstract\2021\CloneArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\CloneArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsConstructor = require('./IsConstructor');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf');
var isInteger = require('math-intrinsics/isInteger');
var isArrayBuffer = require('is-array-buffer');
var arrayBufferSlice = require('arraybuffer.prototype.slice');
// https://262.ecma-international.org/12.0/#sec-clonearraybuffer
module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) {
if (!isArrayBuffer(srcBuffer)) {
throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance');
}
if (!isInteger(srcByteOffset) || srcByteOffset < 0) {
throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer');
}
if (!isInteger(srcLength) || srcLength < 0) {
throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer');
}
if (!IsConstructor(cloneConstructor)) {
throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor');
}
// 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength).
var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda
if (IsDetachedBuffer(srcBuffer)) {
throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4
}
/*
5. Let srcBlock be srcBuffer.[[ArrayBufferData]].
6. Let targetBlock be targetBuffer.[[ArrayBufferData]].
7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength).
*/
var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7
OrdinarySetPrototypeOf(targetBuffer, proto); // step 3
return targetBuffer; // step 8
};node_modules\es-abstract\2021\clamp.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2025\clamp.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var max = require('math-intrinsics/max');
var min = require('math-intrinsics/min');
// https://262.ecma-international.org/12.0/#clamping
module.exports = function clamp(x, lower, upper) {
if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) {
throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`');
}
return min(max(lower, x), upper);
};node_modules\es-abstract\2021\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2021\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2021\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2021\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2021\ByteListEqual.js (Line 1:1 - Line 31:2), node_modules\es-abstract\2025\ByteListEqual.js (Line 1:1 - Line 31:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistequal
module.exports = function ByteListEqual(xBytes, yBytes) {
if (!IsArray(xBytes) || !IsArray(yBytes)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xBytes.length !== yBytes.length) {
return false;
}
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xByte !== yByte) {
return false;
}
}
return true;
};node_modules\es-abstract\2021\ByteListBitwiseOp.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\ByteListBitwiseOp.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop
module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) {
if (op !== '&' && op !== '^' && op !== '|') {
throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`');
}
if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var result = [];
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var resultByte;
if (op === '&') {
resultByte = xByte & yByte;
} else if (op === '^') {
resultByte = xByte ^ yByte;
} else {
resultByte = xByte | yByte;
}
result[result.length] = resultByte;
}
return result;
};node_modules\es-abstract\2021\BinaryXor.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryXor.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};node_modules\es-abstract\2021\BinaryOr.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryOr.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x | y;
};node_modules\es-abstract\2021\BinaryAnd.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryAnd.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryand
module.exports = function BinaryAnd(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x & y;
};node_modules\es-abstract\2021\BigIntBitwiseOp.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2025\BigIntBitwiseOp.js (Line 1:1 - Line 63:2)
'use strict';
var $TypeError = require('es-errors/type');
// var $BigInt = GetIntrinsic('%BigInt%', true);
// var $pow = require('math-intrinsics/pow');
// var BinaryAnd = require('./BinaryAnd');
// var BinaryOr = require('./BinaryOr');
// var BinaryXor = require('./BinaryXor');
// var modulo = require('./modulo');
// var zero = $BigInt && $BigInt(0);
// var negOne = $BigInt && $BigInt(-1);
// var two = $BigInt && $BigInt(2);
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
module.exports = function BigIntBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('`x` and `y` must be BigInts');
}
if (op === '&') {
return x & y;
}
if (op === '|') {
return x | y;
}
return x ^ y;
/*
var result = zero;
var shift = 0;
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
var xDigit = modulo(x, two);
var yDigit = modulo(y, two);
if (op === '&') {
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
} else if (op === '|') {
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
} else if (op === '^') {
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
}
shift += 1;
x = (x - xDigit) / two;
y = (y - yDigit) / two;
}
var tmp;
if (op === '&') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else if (op === '|') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else {
tmp = BinaryXor(modulo(x, two), modulo(y, two));
}
if (tmp !== 0) {
result -= $pow(2, shift);
}
return result;
*/
};node_modules\es-abstract\2021\AsyncIteratorClose.js (Line 1:1 - Line 70:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 70:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/12.0/#sec-asynciteratorclose
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return $then(
$then(
$then(
new $Promise(function (resolve) {
resolve(GetMethod(iterator, 'return')); // step 4
// resolve(Call(ret, iterator, [])); // step 6
}),
function (returnV) { // step 5.a
if (typeof returnV === 'undefined') {
return completion; // step 5.b
}
return Call(returnV, iterator); // step 5.c, 5.d.
}
),
null,
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 6
} else {
throw e; // step 7
}
}
),
function (innerResult) { // step 8
if (completion.type() === 'throw') {
completion['?'](); // step 6
}
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
}
);
};node_modules\es-abstract\2021\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObject = require('./CreateIterResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2021\ArraySpeciesCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2025\ArraySpeciesCreate.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var ArrayCreate = require('./ArrayCreate');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var isArray = IsArray(originalArray);
if (!isArray) {
return ArrayCreate(length);
}
var C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
if (typeof C === 'undefined') {
return ArrayCreate(length);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(length); // Construct(C, length);
};node_modules\es-abstract\2021\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2021\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/12.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 3, 5
if (proto !== $ArrayPrototype) { // step 4
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 6
A.length = length;
}
/* step 6, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2021\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2024\ApplyStringOrNumericBinaryOperator.js (Line 1:1 - Line 77:2)
'use strict';
var $TypeError = require('es-errors/type');
var HasOwnProperty = require('./HasOwnProperty');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
var Type = require('./Type');
var NumberAdd = require('./Number/add');
var NumberBitwiseAND = require('./Number/bitwiseAND');
var NumberBitwiseOR = require('./Number/bitwiseOR');
var NumberBitwiseXOR = require('./Number/bitwiseXOR');
var NumberDivide = require('./Number/divide');
var NumberExponentiate = require('./Number/exponentiate');
var NumberLeftShift = require('./Number/leftShift');
var NumberMultiply = require('./Number/multiply');
var NumberRemainder = require('./Number/remainder');
var NumberSignedRightShift = require('./Number/signedRightShift');
var NumberSubtract = require('./Number/subtract');
var NumberUnsignedRightShift = require('./Number/unsignedRightShift');
var BigIntAdd = require('./BigInt/add');
var BigIntBitwiseAND = require('./BigInt/bitwiseAND');
var BigIntBitwiseOR = require('./BigInt/bitwiseOR');
var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR');
var BigIntDivide = require('./BigInt/divide');
var BigIntExponentiate = require('./BigInt/exponentiate');
var BigIntLeftShift = require('./BigInt/leftShift');
var BigIntMultiply = require('./BigInt/multiply');
var BigIntRemainder = require('./BigInt/remainder');
var BigIntSignedRightShift = require('./BigInt/signedRightShift');
var BigIntSubtract = require('./BigInt/subtract');
var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift');
// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator
// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table
var table = {
'**': [NumberExponentiate, BigIntExponentiate],
'*': [NumberMultiply, BigIntMultiply],
'/': [NumberDivide, BigIntDivide],
'%': [NumberRemainder, BigIntRemainder],
'+': [NumberAdd, BigIntAdd],
'-': [NumberSubtract, BigIntSubtract],
'<<': [NumberLeftShift, BigIntLeftShift],
'>>': [NumberSignedRightShift, BigIntSignedRightShift],
'>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift],
'&': [NumberBitwiseAND, BigIntBitwiseAND],
'^': [NumberBitwiseXOR, BigIntBitwiseXOR],
'|': [NumberBitwiseOR, BigIntBitwiseOR]
};
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
if (typeof opText !== 'string' || !HasOwnProperty(table, opText)) {
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
}
if (opText === '+') {
var lprim = ToPrimitive(lval);
var rprim = ToPrimitive(rval);
if (typeof lprim === 'string' || typeof rprim === 'string') {
var lstr = ToString(lprim);
var rstr = ToString(rprim);
return lstr + rstr;
}
/* eslint no-param-reassign: 1 */
lval = lprim;
rval = rprim;
}
var lnum = ToNumeric(lval);
var rnum = ToNumeric(rval);
if (Type(lnum) !== Type(rnum)) {
throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ');
}
var Operation = table[opText][typeof lnum === 'bigint' ? 1 : 0];
return Operation(lnum, rnum);
};node_modules\es-abstract\2021\AdvanceStringIndex.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 1:1 - Line 30:2)
'use strict';
var CodePointAt = require('./CodePointAt');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
// https://262.ecma-international.org/12.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var cp = CodePointAt(S, index);
return index + cp['[[CodeUnitCount]]'];
};node_modules\es-abstract\2021\AddToKeptObjects.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\AddToKeptObjects.js (Line 1:1 - Line 18:2)
'use strict';
var SLOT = require('internal-slot');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var ClearKeptObjects = require('./ClearKeptObjects');
// https://262.ecma-international.org/12.0/#sec-addtokeptobjects
module.exports = function AddToKeptObjects(object) {
if (!isObject(object)) {
throw new $TypeError('Assertion failed: `object` must be an Object');
}
var arr = SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]');
arr[arr.length] = object;
};node_modules\es-abstract\2021\AddEntriesFromIterable.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 44:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2021\AbstractRelationalComparison.js (Line 1:1 - Line 18:4), node_modules\es-abstract\2022\IsLessThan.js (Line 1:1 - Line 18:59)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var IsStringPrefix = require('./IsStringPrefix');
var StringToBigInt = require('./StringToBigInt');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var BigIntLessThan = require('./BigInt/lessThan');
var NumberLessThan = require('./Number/lessThan');
varnode_modules\es-abstract\2021\AbstractRelationalComparison.js (Line 23:1 - Line 43:7), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 18:1 - Line 47:5)
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
if (IsStringPrefix(py, px)) {
return false;
}
if (IsStringPrefix(px, py)) {
return true;
}
returnnode_modules\es-abstract\2021\AbstractRelationalComparison.js (Line 65:2 - Line 79:57), node_modules\es-abstract\2025\IsLessThan.js (Line 81:3 - Line 96:52)
) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both nonzero, finite, and not equalnode_modules\es-abstract\2021\AbstractEqualityComparison.js (Line 17:2 - Line 27:9), node_modules\es-abstract\5\AbstractEqualityComparison.js (Line 15:2 - Line 25:10)
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'bigint'node_modules\es-abstract\2021\AbstractEqualityComparison.js (Line 35:2 - Line 43:3), node_modules\es-abstract\5\AbstractEqualityComparison.js (Line 23:2 - Line 31:2)
);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' ||node_modules\es-abstract\2020\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2020\WordCharacters.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(IgnoreCase, Unicode) {
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
var U = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.S[c]; // step 3
}
});
if ((!Unicode || !IgnoreCase) && U.length > 0) {
throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4
}
return A + U; // step 5, 6
};node_modules\es-abstract\2020\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2020\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2020\UTF16Encoding.js (Line 1:1 - Line 13:61), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 13:62)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/7.0/#sec-utf16encodingnode_modules\es-abstract\2020\UTF16Encoding.js (Line 15:14 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 15:21 - Line 25:2)
(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2020\UTF16DecodeString.js (Line 9:18 - Line 22:2), node_modules\es-abstract\2025\StringToCodePoints.js (Line 9:19 - Line 22:2)
(string) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var codePoints = [];
var size = string.length;
var position = 0;
while (position < size) {
var cp = CodePointAt(string, position);
codePoints[codePoints.length] = cp['[[CodePoint]]'];
position += cp['[[CodeUnitCount]]'];
}
return codePoints;
};node_modules\es-abstract\2020\UnicodeEscape.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UnicodeEscape.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var StringPad = require('./StringPad');
// https://262.ecma-international.org/11.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start');
};node_modules\es-abstract\2020\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2020\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2020\Type.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\Type.js (Line 1:1 - Line 15:2)
'use strict';
var ES5Type = require('../5/Type');
// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
module.exports = function Type(x) {
if (typeof x === 'symbol') {
return 'Symbol';
}
if (typeof x === 'bigint') {
return 'BigInt';
}
return ES5Type(x);
};node_modules\es-abstract\2020\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2020\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2020\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2020\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2020\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2020\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2020\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2020\ToNumeric.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\ToNumeric.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var isPrimitive = require('../helpers/isPrimitive');
var ToPrimitive = require('./ToPrimitive');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/11.0/#sec-tonumeric
module.exports = function ToNumeric(argument) {
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof primValue === 'bigint') {
return primValue;
}
return ToNumber(primValue);
};node_modules\es-abstract\2020\ToNumber.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2020\ToIndex.js (Line 15:10 - Line 24:2), node_modules\es-abstract\2023\ToIndex.js (Line 15:20 - Line 24:2)
(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValue(integerIndex, index)) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return index;
};node_modules\es-abstract\2020\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2020\ToBigUint64.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobiguint64
module.exports = function ToBigUint64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit;
};node_modules\es-abstract\2020\ToBigInt64.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\ToBigUint64.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $pow = require('math-intrinsics/pow');
var ToBigInt = require('./ToBigInt');
var BigIntRemainder = require('./BigInt/remainder');
var modBigInt = require('../helpers/modBigInt');
// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31)));
// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER
var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32)));
// https://262.ecma-international.org/11.0/#sec-tobigint64
module.exports = function ToBigInt64(argument) {
var n = ToBigInt(argument);
var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour);
return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit;
};node_modules\es-abstract\2020\ToBigInt.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\ToBigInt.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var StringToBigInt = require('./StringToBigInt');
var ToPrimitive = require('./ToPrimitive');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/11.0/#sec-tobigint
module.exports = function ToBigInt(argument) {
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
var prim = ToPrimitive(argument, $Number);
if (prim == null) {
throw new $TypeError('Cannot convert null or undefined to a BigInt');
}
if (typeof prim === 'boolean') {
return prim ? $BigInt(1) : $BigInt(0);
}
if (typeof prim === 'number') {
throw new $TypeError('Cannot convert a Number value to a BigInt');
}
if (typeof prim === 'string') {
var n = StringToBigInt(prim);
if (isNaN(n)) {
throw new $TypeError('Failed to parse String to BigInt');
}
return n;
}
if (typeof prim === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a BigInt');
}
if (typeof prim !== 'bigint') {
throw new $SyntaxError('Assertion failed: unknown primitive type');
}
return prim;
};node_modules\es-abstract\2020\TimeZoneString.js (Line 1:1 - Line 16:63), node_modules\es-abstract\2022\TimeZoneString.js (Line 1:1 - Line 16:64)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/9.0/#sec-timezoneestringnode_modules\es-abstract\2020\TimeString.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2021\TimeString.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
// https://262.ecma-international.org/9.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = HourFromTime(tv);
var minute = MinFromTime(tv);
var second = SecFromTime(tv);
return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT';
};node_modules\es-abstract\2020\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2020\thisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2023\thisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2020\thisBigIntValue.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2023\thisBigIntValue.js (Line 1:1 - Line 18:2)
'use strict';
var callBound = require('call-bound');
var $SyntaxError = require('es-errors/syntax');
var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
// https://262.ecma-international.org/11.0/#sec-thisbigintvalue
module.exports = function thisBigIntValue(value) {
if (typeof value === 'bigint') {
return value;
}
if (!$bigIntValueOf) {
throw new $SyntaxError('BigInt is not supported');
}
return $bigIntValueOf(value);
};node_modules\es-abstract\2020\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2020\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2020\StringToBigInt.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2021\StringToBigInt.js (Line 1:1 - Line 23:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
// https://262.ecma-international.org/11.0/#sec-stringtobigint
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return NaN;
}
};node_modules\es-abstract\2020\StringPad.js (Line 1:1 - Line 41:2), node_modules\es-abstract\2023\StringPad.js (Line 1:1 - Line 41:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var $strSlice = callBound('String.prototype.slice');
// https://262.ecma-international.org/11.0/#sec-stringpad
module.exports = function StringPad(O, maxLength, fillString, placement) {
if (placement !== 'start' && placement !== 'end') {
throw new $TypeError('Assertion failed: `placement` must be "start" or "end"');
}
var S = ToString(O);
var intMaxLength = ToLength(maxLength);
var stringLength = S.length;
if (intMaxLength <= stringLength) {
return S;
}
var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString);
if (filler === '') {
return S;
}
var fillLen = intMaxLength - stringLength;
// the String value consisting of repeated concatenations of filler truncated to length fillLen.
var truncatedStringFiller = '';
while (truncatedStringFiller.length < fillLen) {
truncatedStringFiller += filler;
}
truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen);
if (placement === 'start') {
return truncatedStringFiller + S;
}
return S + truncatedStringFiller;
};node_modules\es-abstract\2020\StringGetOwnProperty.js (Line 19:1 - Line 37:10), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 18:1 - Line 36:10)
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !IsIntegernode_modules\es-abstract\2020\StringGetOwnProperty.js (Line 37:10 - Line 47:2), node_modules\es-abstract\2025\StringGetOwnProperty.js (Line 36:10 - Line 46:2)
(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2020\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2020\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2020\SplitMatch.js (Line 12:1 - Line 25:6), node_modules\es-abstract\2021\SplitMatch.js (Line 12:1 - Line 25:14)
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return falsenode_modules\es-abstract\2020\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2020\SetValueInBuffer.js (Line 8:28 - Line 23:65), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 8:5 - Line 23:65)
);
var IsBigIntElementType = require('./IsBigIntElementType');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumericToRawBytes = require('./NumericToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/11.0/#sec-setvalueinbuffernode_modules\es-abstract\2020\SetValueInBuffer.js (Line 25:1 - Line 33:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 25:1 - Line 33:3)
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex))node_modules\es-abstract\2020\SetValueInBuffer.js (Line 27:6 - Line 37:2), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 26:5 - Line 36:7)
, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !node_modules\es-abstract\2020\SetValueInBuffer.js (Line 34:51 - Line 62:10), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 34:63 - Line 62:20)
);
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndexnode_modules\es-abstract\2020\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2020\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2020\SetFunctionLength.js (Line 12:1 - Line 19:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 12:1 - Line 19:7)
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (!node_modules\es-abstract\2020\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2020\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2020\SameValueNonNumeric.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2022\SameValueNonNumeric.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var Type = require('./Type');
// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric
module.exports = function SameValueNonNumeric(x, y) {
if (typeof x === 'number' || typeof x === 'bigint') {
throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values');
}
if (Type(x) !== Type(y)) {
throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2020\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2020\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2020\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2020\RawBytesToNumeric.js (Line 1:1 - Line 67:2), node_modules\es-abstract\2025\RawBytesToNumeric.js (Line 1:1 - Line 67:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric
module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt);
};node_modules\es-abstract\2020\QuoteJSONString.js (Line 1:1 - Line 13:14), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 13:19)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var UnicodeEscapenode_modules\es-abstract\2020\QuoteJSONString.js (Line 21:1 - Line 37:18), node_modules\es-abstract\2025\QuoteJSONString.js (Line 21:1 - Line 37:19)
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(UTF16DecodeStringnode_modules\es-abstract\2020\QuoteJSONString.js (Line 37:18 - Line 45:14), node_modules\es-abstract\2025\QuoteJSONString.js (Line 37:19 - Line 45:21)
(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16Encodingnode_modules\es-abstract\2020\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2020\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2020\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2020\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 56:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};node_modules\es-abstract\2020\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2020\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2020\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 9:40 - Line 40:2), node_modules\es-abstract\2025\OrdinaryGetOwnProperty.js (Line 10:9 - Line 41:2)
);
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2020\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2020\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return OrdinaryObjectCreate(proto, slots);
};node_modules\es-abstract\2020\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2020\NumericToRawBytes.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToBigInt64 = require('./ToBigInt64');
var ToBigUint64 = require('./ToBigUint64');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32,
$BigInt64: ToBigInt64,
$BigUint64: ToBigUint64
};
// https://262.ecma-international.org/11.0/#sec-numerictorawbytes
module.exports = function NumericToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number' && typeof value !== 'bigint') {
throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2020\NumberToBigInt.js (Line 1:1 - Line 11:63), node_modules\es-abstract\2025\NumberToBigInt.js (Line 1:1 - Line 12:63)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
// https://262.ecma-international.org/11.0/#sec-numbertobigintnode_modules\es-abstract\2020\NumberToBigInt.js (Line 13:1 - Line 24:2), node_modules\es-abstract\2025\NumberToBigInt.js (Line 14:1 - Line 25:2)
module.exports = function NumberToBigInt(number) {
if (typeof number !== 'number') {
throw new $TypeError('Assertion failed: `number` must be a String');
}
if (!isInteger(number)) {
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
return $BigInt(number);
};node_modules\es-abstract\2020\NumberBitwiseOp.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\NumberBitwiseOp.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};node_modules\es-abstract\2020\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2020\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2020\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2020\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2020\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2020\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2020\LengthOfArrayLike.js (Line 1:1 - Line 18:27), node_modules\es-abstract\2025\LengthOfArrayLike.js (Line 1:1 - Line 18:27)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all overnode_modules\es-abstract\2020\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2020\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2020\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2020\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2020\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2020\IterableToList.js (Line 11:2 - Line 21:2), node_modules\es-abstract\2022\IterableToList.js (Line 16:2 - Line 26:2)
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};node_modules\es-abstract\2020\IsWordChar.js (Line 26:10 - Line 45:2), node_modules\es-abstract\2022\IsWordChar.js (Line 27:10 - Line 46:2)
(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};node_modules\es-abstract\2020\IsStringPrefix.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2021\IsStringPrefix.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPrefixOf = require('../helpers/isPrefixOf');
// var callBound = require('call-bound');
// var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/9.0/#sec-isstringprefix
module.exports = function IsStringPrefix(p, q) {
if (typeof p !== 'string') {
throw new $TypeError('Assertion failed: "p" must be a String');
}
if (typeof q !== 'string') {
throw new $TypeError('Assertion failed: "q" must be a String');
}
return isPrefixOf(p, q);
/*
if (p === q || p === '') {
return true;
}
var pLength = p.length;
var qLength = q.length;
if (pLength >= qLength) {
return false;
}
// assert: pLength < qLength
for (var i = 0; i < pLength; i += 1) {
if ($charAt(p, i) !== $charAt(q, i)) {
return false;
}
}
return true;
*/
};node_modules\es-abstract\2020\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2020\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2020\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2020\IsNoTearConfiguration.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2023\IsNoTearConfiguration.js (Line 1:1 - Line 16:2)
'use strict';
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var IsBigIntElementType = require('./IsBigIntElementType');
// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration
module.exports = function IsNoTearConfiguration(type, order) {
if (IsUnclampedIntegerElementType(type)) {
return true;
}
if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') {
return true;
}
return false;
};node_modules\es-abstract\2020\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2020\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2020\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2020\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2020\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2020\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2020\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2020\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2020\InternalizeJSONProperty.js (Line 1:1 - Line 66:2), node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnPropertyNames = require('./EnumerableOwnPropertyNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/11.0/#sec-internalizejsonproperty
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = LengthOfArrayLike(val, 'length'); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnPropertyNames(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2020\IntegerIndexedElementSet.js (Line 5:21 - Line 13:17), node_modules\es-abstract\2021\IntegerIndexedElementSet.js (Line 3:17 - Line 12:16)
);
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLengthnode_modules\es-abstract\2020\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2020\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2020\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2020\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2020\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2020\GetValueFromBuffer.js (Line 1:1 - Line 96:2), node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 1:1 - Line 95:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered') {
throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};node_modules\es-abstract\2020\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2020\GetSubstitution.js (Line 28:1 - Line 45:78), node_modules\es-abstract\2021\GetSubstitution.js (Line 28:1 - Line 45:93)
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got 'node_modules\es-abstract\2020\GetSubstitution.js (Line 45:2 - Line 120:2), node_modules\es-abstract\2021\GetSubstitution.js (Line 45:2 - Line 119:2)
+ inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
if (typeof namedCaptures !== 'undefined') {
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
}
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else if (next === '<') {
if (typeof namedCaptures === 'undefined') {
result += '$<';
i += 2;
} else {
var endIndex = $indexOf(replacement, '>', i);
if (endIndex > -1) {
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
var capture = Get(namedCaptures, groupName);
if (typeof capture !== 'undefined') {
result += ToString(capture);
}
i += ('<' + groupName + '>').length;
}
}
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};node_modules\es-abstract\2020\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2020\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2020\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2020\GetIterator.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2022\GetIterator.js (Line 1:1 - Line 63:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true);
var inspect = require('object-inspect');
var hasSymbols = require('has-symbols')();
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/9.0/#sec-getiterator
module.exports = function GetIterator(obj, hint, method) {
var actualHint = hint;
if (arguments.length < 2) {
actualHint = 'sync';
}
if (actualHint !== 'sync' && actualHint !== 'async') {
throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint));
}
var actualMethod = method;
if (arguments.length < 3) {
if (actualHint === 'async') {
if (hasSymbols && $asyncIterator) {
actualMethod = GetMethod(obj, $asyncIterator);
}
if (actualMethod === undefined) {
throw new $SyntaxError("async from sync iterators aren't currently supported");
}
} else {
actualMethod = getIteratorMethod(ES, obj);
}
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
// TODO: This should return an IteratorRecord
/*
var nextMethod = GetV(iterator, 'next');
return {
'[[Iterator]]': iterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
*/
};node_modules\es-abstract\2020\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2020\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2020\FlattenIntoArray.js (Line 1:1 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 55:2)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
// https://262.ecma-international.org/11.0/#sec-flattenintoarray
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = LengthOfArrayLike(element);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2020\EnumerableOwnPropertyNames.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnPropertyNames(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2020\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2020\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2020\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2020\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2020\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2020\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2020\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2020\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2020\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2), node_modules\es-abstract\2025\CreateRegExpStringIterator.js (Line 1:1 - Line 100:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
var AdvanceStringIndex = require('./AdvanceStringIndex');
var CreateIterResultObject = require('./CreateIterResultObject');
var CreateMethodProperty = require('./CreateMethodProperty');
var Get = require('./Get');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var RegExpExec = require('./RegExpExec');
var Set = require('./Set');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var SLOT = require('internal-slot');
var setToStringTag = require('es-set-tostringtag');
var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {
if (typeof S !== 'string') {
throw new $TypeError('`S` must be a string');
}
if (typeof global !== 'boolean') {
throw new $TypeError('`global` must be a boolean');
}
if (typeof fullUnicode !== 'boolean') {
throw new $TypeError('`fullUnicode` must be a boolean');
}
SLOT.set(this, '[[IteratingRegExp]]', R);
SLOT.set(this, '[[IteratedString]]', S);
SLOT.set(this, '[[Global]]', global);
SLOT.set(this, '[[Unicode]]', fullUnicode);
SLOT.set(this, '[[Done]]', false);
};
if (IteratorPrototype) {
RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
}
var RegExpStringIteratorNext = function next() {
var O = this; // eslint-disable-line no-invalid-this
if (!isObject(O)) {
throw new $TypeError('receiver must be an object');
}
if (
!(O instanceof RegExpStringIterator)
|| !SLOT.has(O, '[[IteratingRegExp]]')
|| !SLOT.has(O, '[[IteratedString]]')
|| !SLOT.has(O, '[[Global]]')
|| !SLOT.has(O, '[[Unicode]]')
|| !SLOT.has(O, '[[Done]]')
) {
throw new $TypeError('"this" value must be a RegExpStringIterator instance');
}
if (SLOT.get(O, '[[Done]]')) {
return CreateIterResultObject(undefined, true);
}
var R = SLOT.get(O, '[[IteratingRegExp]]');
var S = SLOT.get(O, '[[IteratedString]]');
var global = SLOT.get(O, '[[Global]]');
var fullUnicode = SLOT.get(O, '[[Unicode]]');
var match = RegExpExec(R, S);
if (match === null) {
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(undefined, true);
}
if (global) {
var matchStr = ToString(Get(match, '0'));
if (matchStr === '') {
var thisIndex = ToLength(Get(R, 'lastIndex'));
var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);
Set(R, 'lastIndex', nextIndex, true);
}
return CreateIterResultObject(match, false);
}
SLOT.set(O, '[[Done]]', true);
return CreateIterResultObject(match, false);
};
CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);
if (hasSymbols) {
setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');
if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {
var iteratorFn = function SymbolIterator() {
return this;
};
CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);
}
}
// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator
module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {
// assert R.global === global && R.unicode === fullUnicode?
return new RegExpStringIterator(R, S, global, fullUnicode);
};node_modules\es-abstract\2020\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2020\CreateListFromArrayLike.js (Line 1:1 - Line 19:85), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 19:7)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object'];
// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike
/** @type {(obj: object, elementTypes?: typeof defaultElementTypes) => unknown[]} */node_modules\es-abstract\2020\CreateListFromArrayLike.js (Line 20:1 - Line 32:39), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 19:1 - Line 31:4)
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = LengthOfArrayLike(obj);
/** @type {(typeof elementTypes)[]} */node_modules\es-abstract\2020\CreateListFromArrayLike.js (Line 33:2 - Line 46:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 31:2 - Line 44:2)
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2020\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2020\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2020\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2020\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2020\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 137:2), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 137:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObject = require('./CreateIterResultObject');
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
if (!isIteratorRecord(syncIteratorRecord)) {
throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
}
// var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2020\CopyDataProperties.js (Line 24:1 - Line 39:11), node_modules\es-abstract\2025\CopyDataProperties.js (Line 26:1 - Line 41:5)
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var sourceKeysnode_modules\es-abstract\2020\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2020\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2020\CodePointAt.js (Line 15:1 - Line 51:25), node_modules\es-abstract\2025\CodePointAt.js (Line 15:1 - Line 51:30)
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16DecodeSurrogatePairnode_modules\es-abstract\2020\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2020\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2020\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2020\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2020\BinaryXor.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryXor.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};node_modules\es-abstract\2020\BinaryOr.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryOr.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x | y;
};node_modules\es-abstract\2020\BinaryAnd.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2025\BinaryAnd.js (Line 1:1 - Line 12:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-binaryand
module.exports = function BinaryAnd(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x & y;
};node_modules\es-abstract\2020\BigIntBitwiseOp.js (Line 1:1 - Line 63:2), node_modules\es-abstract\2025\BigIntBitwiseOp.js (Line 1:1 - Line 63:2)
'use strict';
var $TypeError = require('es-errors/type');
// var $BigInt = GetIntrinsic('%BigInt%', true);
// var $pow = require('math-intrinsics/pow');
// var BinaryAnd = require('./BinaryAnd');
// var BinaryOr = require('./BinaryOr');
// var BinaryXor = require('./BinaryXor');
// var modulo = require('./modulo');
// var zero = $BigInt && $BigInt(0);
// var negOne = $BigInt && $BigInt(-1);
// var two = $BigInt && $BigInt(2);
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
module.exports = function BigIntBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('`x` and `y` must be BigInts');
}
if (op === '&') {
return x & y;
}
if (op === '|') {
return x | y;
}
return x ^ y;
/*
var result = zero;
var shift = 0;
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
var xDigit = modulo(x, two);
var yDigit = modulo(y, two);
if (op === '&') {
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
} else if (op === '|') {
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
} else if (op === '^') {
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
}
shift += 1;
x = (x - xDigit) / two;
y = (y - yDigit) / two;
}
var tmp;
if (op === '&') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else if (op === '|') {
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
} else {
tmp = BinaryXor(modulo(x, two), modulo(y, two));
}
if (tmp !== 0) {
result -= $pow(2, shift);
}
return result;
*/
};node_modules\es-abstract\2020\AsyncIteratorClose.js (Line 1:1 - Line 20:66), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 20:67)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/9.0/#sec-asynciteratorclosenode_modules\es-abstract\2020\AsyncIteratorClose.js (Line 22:1 - Line 37:4), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 22:1 - Line 37:6)
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return newnode_modules\es-abstract\2020\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObject = require('./CreateIterResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2020\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2020\ArrayCreate.js (Line 1:1 - Line 13:59), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 13:60)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreatenode_modules\es-abstract\2020\ArrayCreate.js (Line 15:1 - Line 23:22), node_modules\es-abstract\2025\ArrayCreate.js (Line 15:1 - Line 23:14)
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9node_modules\es-abstract\2020\AdvanceStringIndex.js (Line 11:1 - Line 30:2), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 11:1 - Line 30:2)
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var cp = CodePointAt(S, index);
return index + cp['[[CodeUnitCount]]'];
};node_modules\es-abstract\2020\AddEntriesFromIterable.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 44:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2020\AbstractRelationalComparison.js (Line 1:1 - Line 80:2), node_modules\es-abstract\2022\IsLessThan.js (Line 1:1 - Line 80:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var IsStringPrefix = require('./IsStringPrefix');
var StringToBigInt = require('./StringToBigInt');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var BigIntLessThan = require('./BigInt/lessThan');
var NumberLessThan = require('./Number/lessThan');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
if (IsStringPrefix(py, px)) {
return false;
}
if (IsStringPrefix(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
}
var nx;
var ny;
if (typeof px === 'bigint' && typeof py === 'string') {
ny = StringToBigInt(py);
if ($isNaN(ny)) {
return void undefined;
}
return BigIntLessThan(px, ny);
}
if (typeof px === 'string' && typeof py === 'bigint') {
nx = StringToBigInt(px);
if ($isNaN(nx)) {
return void undefined;
}
return BigIntLessThan(nx, py);
}
nx = ToNumeric(px);
ny = ToNumeric(py);
if (isSameType(nx, ny)) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
};node_modules\es-abstract\2020\AbstractEqualityComparison.js (Line 1:1 - Line 56:2), node_modules\es-abstract\2021\AbstractEqualityComparison.js (Line 1:1 - Line 56:2)
'use strict';
var StrictEqualityComparison = require('./StrictEqualityComparison');
var StringToBigInt = require('./StringToBigInt');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isNaN = require('math-intrinsics/isNaN');
var isObject = require('es-object-atoms/isObject');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return StrictEqualityComparison(x, y);
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'bigint' && typeof y === 'string') {
var n = StringToBigInt(y);
if (isNaN(n)) {
return false;
}
return AbstractEqualityComparison(x, n);
}
if (typeof x === 'string' && typeof y === 'bigint') {
return AbstractEqualityComparison(y, x);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'bigint' || typeof x === 'symbol') && isObject(y)) {
return AbstractEqualityComparison(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'bigint' || typeof y === 'symbol')) {
return AbstractEqualityComparison(ToPrimitive(x), y);
}
if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) {
return false;
}
return x == y; // eslint-disable-line eqeqeq
}
return false;
};node_modules\es-abstract\2019\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2019\WordCharacters.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(IgnoreCase, Unicode) {
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
var U = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.S[c]; // step 3
}
});
if ((!Unicode || !IgnoreCase) && U.length > 0) {
throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4
}
return A + U; // step 5, 6
};node_modules\es-abstract\2019\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2019\ValidateAtomicAccess.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2020\ValidateAtomicAccess.js (Line 1:1 - Line 34:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var isTypedArray = require('is-typed-array');
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/8.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1
}
var accessIndex = ToIndex(requestIndex); // step 2
var length = typedArrayLength(typedArray); // step 3
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 5
}
return accessIndex; // step 6
};node_modules\es-abstract\2019\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2019\UTF16Encoding.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/7.0/#sec-utf16encoding
module.exports = function UTF16Encoding(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2019\UnicodeEscape.js (Line 14:1 - Line 23:10), node_modules\es-abstract\2025\UnicodeEscape.js (Line 15:1 - Line 24:10)
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + $strSlicenode_modules\es-abstract\2019\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2019\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2019\TrimString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\TrimString.js (Line 1:1 - Line 27:2)
'use strict';
var trimStart = require('string.prototype.trimstart');
var trimEnd = require('string.prototype.trimend');
var $TypeError = require('es-errors/type');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/10.0/#sec-trimstring
module.exports = function TrimString(string, where) {
var str = RequireObjectCoercible(string);
var S = ToString(str);
var T;
if (where === 'start') {
T = trimStart(S);
} else if (where === 'end') {
T = trimEnd(S);
} else if (where === 'start+end') {
T = trimStart(trimEnd(S));
} else {
throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"');
}
return T;
};node_modules\es-abstract\2019\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2019\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2019\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2019\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2019\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2019\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2019\ToNumber.js (Line 1:1 - Line 33:9), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 33:9)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string'node_modules\es-abstract\2019\ToNumber.js (Line 31:44 - Line 48:2), node_modules\es-abstract\2021\ToNumber.js (Line 34:59 - Line 51:2)
);
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2019\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2020\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/6.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2019\ToIndex.js (Line 11:1 - Line 20:14), node_modules\es-abstract\2020\ToIndex.js (Line 11:1 - Line 20:10)
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integerIndex = ToInteger(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValueZeronode_modules\es-abstract\2019\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2019\TimeZoneString.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2022\TimeZoneString.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/9.0/#sec-timezoneestring
module.exports = function TimeZoneString(tv) {
if (typeof tv !== 'number' || isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); // steps 1 - 2
}
// 3. Let offset be LocalTZA(tv, true).
// 4. If offset ≥ 0, let offsetSign be "+"; otherwise, let offsetSign be "-".
// 5. Let offsetMin be the String representation of MinFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 6. Let offsetHour be the String representation of HourFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 7. Let tzName be an implementation-defined string that is either the empty string or the string-concatenation of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT PARENTHESIS), an implementation-dependent timezone name, and the code unit 0x0029 (RIGHT PARENTHESIS).
// 8. Return the string-concatenation of offsetSign, offsetHour, offsetMin, and tzName.
// hack until LocalTZA, and "implementation-defined string" are available
var ts = $toTimeString(new $Date(tv));
return $slice(ts, $indexOf(ts, '(') + 1, $indexOf(ts, ')'));
};node_modules\es-abstract\2019\TimeString.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2021\TimeString.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
// https://262.ecma-international.org/9.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = HourFromTime(tv);
var minute = MinFromTime(tv);
var second = SecFromTime(tv);
return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT';
};node_modules\es-abstract\2019\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2019\thisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2023\thisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2019\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2019\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2019\StringGetOwnProperty.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2020\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
// https://262.ecma-international.org/8.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2019\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2019\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2019\SplitMatch.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2020\SplitMatch.js (Line 1:1 - Line 35:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/6.0/#sec-splitmatch
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return false;
}
for (var i = 0; i < r; i += 1) {
if ($charAt(S, q + i) !== $charAt(R, i)) {
return false;
}
}
return q + r;
};node_modules\es-abstract\2019\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2019\SetValueInBuffer.js (Line 12:21 - Line 23:64), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 12:22 - Line 23:65)
);
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-setvalueinbuffernode_modules\es-abstract\2019\SetValueInBuffer.js (Line 25:1 - Line 41:2), node_modules\es-abstract\2025\SetValueInBuffer.js (Line 25:1 - Line 41:3)
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number')node_modules\es-abstract\2019\SetValueInBuffer.js (Line 42:45 - Line 66:37), node_modules\es-abstract\2023\SetValueInBuffer.js (Line 42:57 - Line 66:3)
);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Assert: Type(value) is Number.node_modules\es-abstract\2019\SetValueInBuffer.js (Line 75:17 - Line 94:2), node_modules\es-abstract\2020\SetValueInBuffer.js (Line 77:18 - Line 96:2)
(type, value, isLittleEndian); // step 8
if (isSAB) { // step 9
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 10. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 11. Return NormalCompletion(undefined).
};node_modules\es-abstract\2019\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2019\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2019\SetFunctionLength.js (Line 12:1 - Line 19:2), node_modules\es-abstract\2025\SetFunctionLength.js (Line 12:1 - Line 19:4)
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length <node_modules\es-abstract\2019\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2019\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2019\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2019\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2019\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2019\RawBytesToNumber.js (Line 25:17 - Line 43:46), node_modules\es-abstract\2023\RawBytesToNumeric.js (Line 29:18 - Line 48:4)
(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
// eslint-disable-next-line no-param-reassignnode_modules\es-abstract\2019\RawBytesToNumber.js (Line 40:5 - Line 57:8), node_modules\es-abstract\2023\RawBytesToNumeric.js (Line 49:44 - Line 66:22)
);
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, $charAtnode_modules\es-abstract\2019\QuoteJSONString.js (Line 1:1 - Line 14:14), node_modules\es-abstract\2025\QuoteJSONString.js (Line 1:1 - Line 14:18)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16Encodingnode_modules\es-abstract\2019\QuoteJSONString.js (Line 20:1 - Line 36:6), node_modules\es-abstract\2025\QuoteJSONString.js (Line 21:1 - Line 37:19)
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(valuenode_modules\es-abstract\2019\QuoteJSONString.js (Line 36:6 - Line 51:2), node_modules\es-abstract\2025\QuoteJSONString.js (Line 37:2 - Line 52:2)
, ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16Encoding(cCharCode);
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2019\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2019\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2019\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2019\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2019\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2019\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2019\OrdinaryGetOwnProperty.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var hasOwn = require('hasown');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2019\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2019\OrdinaryCreateFromConstructor.js (Line 8:17 - Line 19:13), node_modules\es-abstract\2025\OrdinaryCreateFromConstructor.js (Line 8:25 - Line 19:21)
);
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return ObjectCreatenode_modules\es-abstract\2019\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2019\ObjectCreate.js (Line 1:1 - Line 18:60), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 18:61)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/6.0/#sec-objectcreatenode_modules\es-abstract\2019\ObjectCreate.js (Line 29:2 - Line 43:6), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 35:2 - Line 49:28)
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (slotsnode_modules\es-abstract\2019\NumberToRawBytes.js (Line 5:19 - Line 20:52), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 7:16 - Line 22:78)
);
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#table-50node_modules\es-abstract\2019\NumberToRawBytes.js (Line 40:45 - Line 59:2), node_modules\es-abstract\2023\NumericToRawBytes.js (Line 43:57 - Line 62:2)
);
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2019\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2019\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2019\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2019\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2019\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2019\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2019\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2019\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2019\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2019\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2019\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2019\IterableToList.js (Line 10:6 - Line 21:2), node_modules\es-abstract\2020\IterableToList.js (Line 10:7 - Line 26:2)
, method);
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};node_modules\es-abstract\2019\IsWordChar.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\IsWordChar.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
if (!IsInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!IsInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};node_modules\es-abstract\2019\IsStringPrefix.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2021\IsStringPrefix.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPrefixOf = require('../helpers/isPrefixOf');
// var callBound = require('call-bound');
// var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/9.0/#sec-isstringprefix
module.exports = function IsStringPrefix(p, q) {
if (typeof p !== 'string') {
throw new $TypeError('Assertion failed: "p" must be a String');
}
if (typeof q !== 'string') {
throw new $TypeError('Assertion failed: "q" must be a String');
}
return isPrefixOf(p, q);
/*
if (p === q || p === '') {
return true;
}
var pLength = p.length;
var qLength = q.length;
if (pLength >= qLength) {
return false;
}
// assert: pLength < qLength
for (var i = 0; i < pLength; i += 1) {
if ($charAt(p, i) !== $charAt(q, i)) {
return false;
}
}
return true;
*/
};node_modules\es-abstract\2019\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2019\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2019\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2019\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2019\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2019\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2019\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2019\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2019\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2019\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2019\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2019\InternalizeJSONProperty.js (Line 1:1 - Line 11:9), node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 1:1 - Line 11:18)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnPropertyNames = require('./EnumerableOwnPropertyNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLengthnode_modules\es-abstract\2019\InternalizeJSONProperty.js (Line 18:1 - Line 38:9), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 18:1 - Line 38:18)
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = ToLengthnode_modules\es-abstract\2019\InternalizeJSONProperty.js (Line 38:2 - Line 68:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 38:4 - Line 68:2)
); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnPropertyNames(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2019\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2019\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2019\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2019\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2019\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2019\GetValueFromBuffer.js (Line 3:16 - Line 14:17), node_modules\es-abstract\2023\GetValueFromBuffer.js (Line 5:19 - Line 15:18)
);
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumbernode_modules\es-abstract\2019\GetValueFromBuffer.js (Line 26:1 - Line 36:2), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 26:1 - Line 36:3)
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string')node_modules\es-abstract\2019\GetValueFromBuffer.js (Line 45:45 - Line 80:5), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 45:68 - Line 80:5)
);
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/node_modules\es-abstract\2019\GetValueFromBuffer.js (Line 81:2 - Line 93:17), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 82:2 - Line 94:18)
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumbernode_modules\es-abstract\2019\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2019\GetSubstitution.js (Line 1:1 - Line 120:2), node_modules\es-abstract\2020\GetSubstitution.js (Line 1:1 - Line 119:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var every = require('../helpers/every');
var $charAt = callBound('String.prototype.charAt');
var $strSlice = callBound('String.prototype.slice');
var $indexOf = callBound('String.prototype.indexOf');
var $parseInt = parseInt;
var isDigit = regexTester(/^[0-9]$/);
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
// http://262.ecma-international.org/9.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
if (typeof namedCaptures !== 'undefined') {
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
}
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else if (next === '<') {
if (typeof namedCaptures === 'undefined') {
result += '$<';
i += 2;
} else {
var endIndex = $indexOf(replacement, '>', i);
if (endIndex > -1) {
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
var capture = Get(namedCaptures, groupName);
if (typeof capture !== 'undefined') {
result += ToString(capture);
}
i += ('<' + groupName + '>').length;
}
}
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};node_modules\es-abstract\2019\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2019\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2019\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2019\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2019\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2019\FlattenIntoArray.js (Line 1:1 - Line 12:9), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 1:1 - Line 12:18)
'use strict';
var $TypeError = require('es-errors/type');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var Call = require('./Call');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var IsArray = require('./IsArray');
var ToLengthnode_modules\es-abstract\2019\FlattenIntoArray.js (Line 17:1 - Line 41:9), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 17:1 - Line 41:18)
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
var mapperFunction;
if (arguments.length > 5) {
mapperFunction = arguments[5];
}
var targetIndex = start;
var sourceIndex = 0;
while (sourceIndex < sourceLen) {
var P = ToString(sourceIndex);
var exists = HasProperty(source, P);
if (exists === true) {
var element = Get(source, P);
if (typeof mapperFunction !== 'undefined') {
if (arguments.length <= 6) {
throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
}
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
}
var shouldFlatten = false;
if (depth > 0) {
shouldFlatten = IsArray(element);
}
if (shouldFlatten) {
var elementLen = ToLengthnode_modules\es-abstract\2019\FlattenIntoArray.js (Line 41:2 - Line 55:2), node_modules\es-abstract\2025\FlattenIntoArray.js (Line 41:8 - Line 55:2)
);
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
} else {
if (targetIndex >= MAX_SAFE_INTEGER) {
throw new $TypeError('index too large');
}
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
targetIndex += 1;
}
}
sourceIndex += 1;
}
return targetIndex;
};node_modules\es-abstract\2019\EnumerableOwnPropertyNames.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnPropertyNames(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2019\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2019\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2019\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2019\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2019\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2019\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2019\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2019\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2019\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2019\CreateListFromArrayLike.js (Line 1:1 - Line 11:9), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 11:18)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLengthnode_modules\es-abstract\2019\CreateListFromArrayLike.js (Line 18:1 - Line 29:9), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 19:1 - Line 30:18)
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = ToLengthnode_modules\es-abstract\2019\CreateListFromArrayLike.js (Line 29:2 - Line 43:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 30:4 - Line 44:2)
);
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2019\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2019\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2019\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2019\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2019\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 16:13), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 16:21)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
var Call = require('./Call');
var CreateIterResultObject = require('./CreateIterResultObject');
var Get = require('./Get');
var GetMethod = require('./GetMethod');
var IteratorNext = require('./IteratorNext');
var ObjectCreatenode_modules\es-abstract\2019\CreateAsyncFromSyncIterator.js (Line 16:17 - Line 118:76), node_modules\es-abstract\2023\CreateAsyncFromSyncIterator.js (Line 16:25 - Line 118:76)
);
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var SLOT = require('internal-slot');
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/10.0/#sec-createasyncfromsynciteratornode_modules\es-abstract\2019\CopyDataProperties.js (Line 1:1 - Line 13:19), node_modules\es-abstract\2020\CopyDataProperties.js (Line 1:1 - Line 13:26)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var every = require('../helpers/every');
var forEach = require('../helpers/forEach');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertynode_modules\es-abstract\2019\CopyDataProperties.js (Line 13:23 - Line 22:66), node_modules\es-abstract\2020\CopyDataProperties.js (Line 13:30 - Line 22:67)
);
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
// https://262.ecma-international.org/9.0/#sec-copydatapropertiesnode_modules\es-abstract\2019\CopyDataProperties.js (Line 24:1 - Line 37:8), node_modules\es-abstract\2025\CopyDataProperties.js (Line 26:1 - Line 39:5)
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var fromObjnode_modules\es-abstract\2019\CopyDataProperties.js (Line 39:8 - Line 49:8), node_modules\es-abstract\2020\CopyDataProperties.js (Line 39:5 - Line 49:5)
);
forEach(sourceKeys, function (nextKey) {
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
var enumerable = $isEnumerable(fromObjnode_modules\es-abstract\2019\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2019\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2019\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2019\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2019\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2019\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2019\AsyncIteratorClose.js (Line 1:1 - Line 64:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 64:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/9.0/#sec-asynciteratorclose
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return new $Promise(function (resolve) {
var ret = GetMethod(iterator, 'return'); // step 4
if (typeof ret === 'undefined') {
resolve(completion); // step 5
} else {
resolve($then(
new $Promise(function (resolve2) {
// process.exit(42);
resolve2(Call(ret, iterator, [])); // step 6
}),
function (innerResult) {
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
},
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 8
} else {
throw e; // step 9
}
}
));
}
});
};node_modules\es-abstract\2019\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIterResultObject = require('./CreateIterResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2019\ArraySpeciesCreate.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\ArraySpeciesCreate.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};node_modules\es-abstract\2019\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2019\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9
if (proto !== $ArrayPrototype) { // step 8
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 2
A.length = length;
}
/* step 10, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2019\AdvanceStringIndex.js (Line 15:1 - Line 33:6), node_modules\es-abstract\2025\AdvanceStringIndex.js (Line 11:1 - Line 28:3)
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var firstnode_modules\es-abstract\2019\AddEntriesFromIterable.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2025\AddEntriesFromIterable.js (Line 1:1 - Line 44:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};node_modules\es-abstract\2019\AbstractRelationalComparison.js (Line 16:1 - Line 38:2), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 18:1 - Line 46:2)
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
if (IsStringPrefix(py, px)) {
return false;
}
if (IsStringPrefix(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
}
var nx =node_modules\es-abstract\2019\AbstractRelationalComparison.js (Line 38:2 - Line 59:2), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 33:3 - Line 55:3)
var nx = ToNumber(px);
var ny = ToNumber(py);
if ($isNaN(nx) || $isNaN(ny)) {
return undefined;
}
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
return false;
}
if (nx === Infinity) {
return false;
}
if (ny === Infinity) {
return true;
}
if (ny === -Infinity) {
return false;
}
if (nx === -Infinity) {
return true;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
};node_modules\es-abstract\2019\AbstractEqualityComparison.js (Line 12:1 - Line 31:9), node_modules\es-abstract\5\AbstractEqualityComparison.js (Line 12:1 - Line 43:9)
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return x === y; // ES6+ specified this shortcut anyways.
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol'node_modules\es-abstract\2018\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2018\WordCharacters.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(IgnoreCase, Unicode) {
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
var U = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.S[c]; // step 3
}
});
if ((!Unicode || !IgnoreCase) && U.length > 0) {
throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4
}
return A + U; // step 5, 6
};node_modules\es-abstract\2018\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2018\ValidateAtomicAccess.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2020\ValidateAtomicAccess.js (Line 1:1 - Line 34:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var isTypedArray = require('is-typed-array');
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/8.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1
}
var accessIndex = ToIndex(requestIndex); // step 2
var length = typedArrayLength(typedArray); // step 3
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 5
}
return accessIndex; // step 6
};node_modules\es-abstract\2018\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2018\UTF16Encoding.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/7.0/#sec-utf16encoding
module.exports = function UTF16Encoding(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2018\UTF16Decode.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2019\UTF16Decode.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
// https://262.ecma-international.org/7.0/#sec-utf16decode
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16Decode(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2018\UnicodeEscape.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2019\UnicodeEscape.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var $strSlice = callBound('String.prototype.slice');
// https://262.ecma-international.org/9.0/#sec-unicodeescape
module.exports = function UnicodeEscape(C) {
if (typeof C !== 'string' || C.length !== 1) {
throw new $TypeError('Assertion failed: `C` must be a single code unit');
}
var n = $charCodeAt(C, 0);
if (n > 0xFFFF) {
throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF');
}
return '\\u' + $strSlice('0000' + $toLowerCase($numberToString(n, 16)), -4);
};node_modules\es-abstract\2018\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2018\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2018\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2018\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2018\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2018\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2018\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2018\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2018\ToNumber.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2018\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2020\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/6.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2018\ToIndex.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2019\ToIndex.js (Line 1:1 - Line 24:2)
'use strict';
var $RangeError = require('es-errors/range');
var ToInteger = require('./ToInteger');
var ToLength = require('./ToLength');
var SameValueZero = require('./SameValueZero');
// https://262.ecma-international.org/8.0/#sec-toindex
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integerIndex = ToInteger(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValueZero(integerIndex, index)) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return index;
};node_modules\es-abstract\2018\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2018\TimeZoneString.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2022\TimeZoneString.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/9.0/#sec-timezoneestring
module.exports = function TimeZoneString(tv) {
if (typeof tv !== 'number' || isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); // steps 1 - 2
}
// 3. Let offset be LocalTZA(tv, true).
// 4. If offset ≥ 0, let offsetSign be "+"; otherwise, let offsetSign be "-".
// 5. Let offsetMin be the String representation of MinFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 6. Let offsetHour be the String representation of HourFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 7. Let tzName be an implementation-defined string that is either the empty string or the string-concatenation of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT PARENTHESIS), an implementation-dependent timezone name, and the code unit 0x0029 (RIGHT PARENTHESIS).
// 8. Return the string-concatenation of offsetSign, offsetHour, offsetMin, and tzName.
// hack until LocalTZA, and "implementation-defined string" are available
var ts = $toTimeString(new $Date(tv));
return $slice(ts, $indexOf(ts, '(') + 1, $indexOf(ts, ')'));
};node_modules\es-abstract\2018\TimeString.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2021\TimeString.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var HourFromTime = require('./HourFromTime');
var MinFromTime = require('./MinFromTime');
var SecFromTime = require('./SecFromTime');
// https://262.ecma-international.org/9.0/#sec-timestring
module.exports = function TimeString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var hour = HourFromTime(tv);
var minute = MinFromTime(tv);
var second = SecFromTime(tv);
return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT';
};node_modules\es-abstract\2018\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2018\thisSymbolValue.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2023\thisSymbolValue.js (Line 1:1 - Line 20:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};node_modules\es-abstract\2018\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2018\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2018\StringGetOwnProperty.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2020\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
// https://262.ecma-international.org/8.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2018\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2018\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2018\SplitMatch.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2020\SplitMatch.js (Line 1:1 - Line 35:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/6.0/#sec-splitmatch
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return false;
}
for (var i = 0; i < r; i += 1) {
if ($charAt(S, q + i) !== $charAt(R, i)) {
return false;
}
}
return q + r;
};node_modules\es-abstract\2018\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2018\SetValueInBuffer.js (Line 1:1 - Line 94:2), node_modules\es-abstract\2019\SetValueInBuffer.js (Line 1:1 - Line 96:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumberToRawBytes = require('./NumberToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-setvalueinbuffer
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a number');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Assert: Type(value) is Number.
// 5. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 6
// 7. If isLittleEndian is not present, set isLittleEndian to to the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 8
var rawBytes = NumberToRawBytes(type, value, isLittleEndian); // step 8
if (isSAB) { // step 9
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 10. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 11. Return NormalCompletion(undefined).
};node_modules\es-abstract\2018\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2018\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2018\SetFunctionLength.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2019\SetFunctionLength.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/9.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (length < 0 || !isInteger(length)) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};node_modules\es-abstract\2018\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2018\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2018\SameValueNonNumber.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2019\SameValueNonNumber.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber
module.exports = function SameValueNonNumber(x, y) {
if (typeof x === 'number' || typeof x !== typeof y) {
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2018\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2018\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2018\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2018\RawBytesToNumber.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2019\RawBytesToNumber.js (Line 1:1 - Line 58:2)
'use strict';
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var $charAt = callBound('String.prototype.charAt');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-rawbytestonumber
module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false);
};node_modules\es-abstract\2018\QuoteJSONString.js (Line 17:1 - Line 36:3), node_modules\es-abstract\2025\QuoteJSONString.js (Line 21:1 - Line 39:2)
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(value, ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else ifnode_modules\es-abstract\2018\PromiseResolve.js (Line 1:1 - Line 17:2), node_modules\es-abstract\2025\PromiseResolve.js (Line 1:1 - Line 17:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};node_modules\es-abstract\2018\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2018\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2018\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2018\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2018\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2018\OrdinaryGetOwnProperty.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var hasOwn = require('hasown');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2018\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2018\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2019\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var ObjectCreate = require('./ObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return ObjectCreate(proto, slots);
};node_modules\es-abstract\2018\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2018\ObjectCreate.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 50:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/6.0/#sec-objectcreate
module.exports = function ObjectCreate(proto, internalSlotsList) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1
if (arguments.length >= 2 && !IsArray(slots)) {
throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array');
}
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (slots.length > 0) {
forEach(slots, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O; // step 6
};node_modules\es-abstract\2018\NumberToString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2019\NumberToString.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type
module.exports = function NumberToString(m) {
if (typeof m !== 'number') {
throw new $TypeError('Assertion failed: "m" must be a String');
}
return $String(m);
};node_modules\es-abstract\2018\NumberToRawBytes.js (Line 1:1 - Line 59:2), node_modules\es-abstract\2019\NumberToRawBytes.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#table-50
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32
};
// https://262.ecma-international.org/8.0/#sec-numbertorawbytes
module.exports = function NumberToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a Number');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2018\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2018\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2018\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2018\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2018\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2018\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2018\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2018\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2018\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2018\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2018\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2018\IterableToList.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2019\IterableToList.js (Line 1:1 - Line 26:2)
'use strict';
var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
// https://262.ecma-international.org/8.0/#sec-iterabletolist
module.exports = function IterableToList(items, method) {
var iterator = GetIterator(items, method);
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};node_modules\es-abstract\2018\IsWordChar.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\IsWordChar.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
if (!IsInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!IsInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};node_modules\es-abstract\2018\IsStringPrefix.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2021\IsStringPrefix.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPrefixOf = require('../helpers/isPrefixOf');
// var callBound = require('call-bound');
// var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/9.0/#sec-isstringprefix
module.exports = function IsStringPrefix(p, q) {
if (typeof p !== 'string') {
throw new $TypeError('Assertion failed: "p" must be a String');
}
if (typeof q !== 'string') {
throw new $TypeError('Assertion failed: "q" must be a String');
}
return isPrefixOf(p, q);
/*
if (p === q || p === '') {
return true;
}
var pLength = p.length;
var qLength = q.length;
if (pLength >= qLength) {
return false;
}
// assert: pLength < qLength
for (var i = 0; i < pLength; i += 1) {
if ($charAt(p, i) !== $charAt(q, i)) {
return false;
}
}
return true;
*/
};node_modules\es-abstract\2018\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2018\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2018\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2018\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2018\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2018\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2018\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2018\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2018\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2018\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2018\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2018\InternalizeJSONProperty.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2022\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnPropertyNames = require('./EnumerableOwnPropertyNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/9.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = ToLength(Get(val, 'length')); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnPropertyNames(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2018\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2019\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToNumber = require('./ToNumber');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 12
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020'); // step 2
}
var numValue = ToNumber(value); // step 3
var buffer = typedArrayBuffer(O); // step 5
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 6
}
if (!IsInteger(index) || isNegativeZero(index)) {
return false; // steps 7 - 8
}
var length = typedArrayLength(O); // step 9
if (index < 0 || index >= length) {
return false; // step 10
}
var offset = typedArrayByteOffset(O); // step 11
var elementType = tableTAO.name['$' + arrayTypeName]; // step 15
var elementSize = tableTAO.size['$' + elementType]; // step 13
var indexedPosition = (index * elementSize) + offset; // step 14
SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, 'Unordered'); // step 16
return true; // step 17
};node_modules\es-abstract\2018\IntegerIndexedElementGet.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2019\IntegerIndexedElementGet.js (Line 1:1 - Line 58:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayLength = require('typed-array-length');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 10
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 4
}
if (!IsInteger(index) || isNegativeZero(index)) {
return void undefined; // steps 5 - 6
}
var length = typedArrayLength(O); // step 7
if (index < 0 || index >= length) {
return void undefined; // step 8
}
var offset = typedArrayByteOffset(O); // step 9
var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
var elementSize = tableTAO.size['$' + elementType]; // step 11
var indexedPosition = (index * elementSize) + offset; // step 12
return GetValueFromBuffer(buffer, indexedPosition, elementType, true, 'Unordered'); // step 14
};node_modules\es-abstract\2018\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2018\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2018\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2018\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2018\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2018\GetValueFromBuffer.js (Line 8:5 - Line 25:66), node_modules\es-abstract\2019\GetValueFromBuffer.js (Line 7:28 - Line 24:67)
);
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumber = require('./RawBytesToNumber');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/8.0/#sec-getvaluefrombuffernode_modules\es-abstract\2018\GetValueFromBuffer.js (Line 27:1 - Line 82:35), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 26:1 - Line 81:60)
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string') {
throw new $TypeError('Assertion failed: `type` must be a string');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (typeof order !== 'string') {
throw new $TypeError('Assertion failed: `order` must be a string');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('TODO: support SharedArrayBuffers'node_modules\es-abstract\2018\GetValueFromBuffer.js (Line 82:35 - Line 96:2), node_modules\es-abstract\2025\GetValueFromBuffer.js (Line 81:60 - Line 94:2)
);
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumber(type, bytes, isLittleEndian);
};node_modules\es-abstract\2018\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2018\GetSubstitution.js (Line 1:1 - Line 120:2), node_modules\es-abstract\2020\GetSubstitution.js (Line 1:1 - Line 119:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var every = require('../helpers/every');
var $charAt = callBound('String.prototype.charAt');
var $strSlice = callBound('String.prototype.slice');
var $indexOf = callBound('String.prototype.indexOf');
var $parseInt = parseInt;
var isDigit = regexTester(/^[0-9]$/);
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
// http://262.ecma-international.org/9.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
if (typeof namedCaptures !== 'undefined') {
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
}
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else if (next === '<') {
if (typeof namedCaptures === 'undefined') {
result += '$<';
i += 2;
} else {
var endIndex = $indexOf(replacement, '>', i);
if (endIndex > -1) {
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
var capture = Get(namedCaptures, groupName);
if (typeof capture !== 'undefined') {
result += ToString(capture);
}
i += ('<' + groupName + '>').length;
}
}
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};node_modules\es-abstract\2018\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2018\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2018\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2018\GetIterator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2019\GetIterator.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var isObject = require('es-object-atoms/isObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/6.0/#sec-getiterator
module.exports = function GetIterator(obj, method) {
var actualMethod = method;
if (arguments.length < 2) {
actualMethod = getIteratorMethod(ES, obj);
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
};node_modules\es-abstract\2018\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2018\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2018\EnumerableOwnPropertyNames.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnPropertyNames(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2018\DetachArrayBuffer.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel;
} catch (e) { /**/ }
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
}
// commented out since there's no way to set or access this key
// var key = arguments.length > 1 ? arguments[1] : void undefined;
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
// }
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2018\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2018\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2018\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2018\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2018\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2018\DateString.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\DateString.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var $isNaN = require('math-intrinsics/isNaN');
var padTimeComponent = require('../helpers/padTimeComponent');
var DateFromTime = require('./DateFromTime');
var MonthFromTime = require('./MonthFromTime');
var WeekDay = require('./WeekDay');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/9.0/#sec-datestring
module.exports = function DateString(tv) {
if (typeof tv !== 'number' || $isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
}
var weekday = weekdays[WeekDay(tv)];
var month = months[MonthFromTime(tv)];
var day = padTimeComponent(DateFromTime(tv));
var year = padTimeComponent(YearFromTime(tv), 4);
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
};node_modules\es-abstract\2018\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2018\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2018\CreateListFromArrayLike.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = ToLength(Get(obj, 'length'));
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2018\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2018\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2018\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2018\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2018\CreateAsyncFromSyncIterator.js (Line 1:1 - Line 11:23), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 11:17)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CreateIterResultObjectnode_modules\es-abstract\2018\CreateAsyncFromSyncIterator.js (Line 34:11 - Line 52:2), node_modules\es-abstract\2025\AsyncFromSyncIteratorContinuation.js (Line 27:13 - Line 45:2)
('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIterResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};node_modules\es-abstract\2018\CreateAsyncFromSyncIterator.js (Line 52:2 - Line 150:75), node_modules\es-abstract\2025\CreateAsyncFromSyncIterator.js (Line 20:2 - Line 118:76)
;
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
next: function next(value) {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var argsLength = arguments.length;
return new $Promise(function (resolve) { // step 3
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
var result;
if (argsLength > 0) {
result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
} else { // step 6
result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
});
},
'return': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
if (typeof iteratorReturn === 'undefined') { // step 7
var iterResult = CreateIterResultObject(value, true); // step 7.a
Call(resolve, undefined, [iterResult]); // step 7.b
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(iteratorReturn, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
});
},
'throw': function () {
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
var O = this; // step 1
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
var valueIsPresent = arguments.length > 0;
var value = valueIsPresent ? arguments[0] : void undefined;
return new $Promise(function (resolve, reject) { // step 3
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
if (typeof throwMethod === 'undefined') { // step 7
Call(reject, undefined, [value]); // step 7.a
return;
}
var result;
if (valueIsPresent) { // step 8
result = Call(throwMethod, syncIterator, [value]); // step 8.a
} else { // step 9
result = Call(throwMethod, syncIterator); // step 9.a
}
if (!isObject(result)) { // step 11
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
return;
}
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
});
}
};
// https://262.ecma-international.org/9.0/#sec-createasyncfromsynciteratornode_modules\es-abstract\2018\CreateAsyncFromSyncIterator.js (Line 155:2 - Line 169:2), node_modules\es-abstract\2019\CreateAsyncFromSyncIterator.js (Line 123:2 - Line 137:2)
}
// var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype);
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
var nextMethod = Get(asyncIterator, 'next'); // step 3
return { // steps 3-4
'[[Iterator]]': asyncIterator,
'[[NextMethod]]': nextMethod,
'[[Done]]': false
};
};node_modules\es-abstract\2018\CopyDataProperties.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2020\CopyDataProperties.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var every = require('../helpers/every');
var forEach = require('../helpers/forEach');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataProperty = require('./CreateDataProperty');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
// https://262.ecma-international.org/9.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var fromObj = ToObject(source);
var sourceKeys = OwnPropertyKeys(fromObj);
forEach(sourceKeys, function (nextKey) {
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
var enumerable = $isEnumerable(fromObj, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& IsInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(fromObj, nextKey);
CreateDataProperty(target, nextKey, propValue);
}
});
return target;
};node_modules\es-abstract\2018\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2018\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2018\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2018\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2018\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2018\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2018\AsyncIteratorClose.js (Line 1:1 - Line 64:2), node_modules\es-abstract\2025\AsyncIteratorClose.js (Line 1:1 - Line 64:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
var callBound = require('call-bound');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/9.0/#sec-asynciteratorclose
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
}
if (!$then) {
throw new $SyntaxError('This environment does not support Promises.');
}
var iterator = iteratorRecord['[[Iterator]]']; // step 3
return new $Promise(function (resolve) {
var ret = GetMethod(iterator, 'return'); // step 4
if (typeof ret === 'undefined') {
resolve(completion); // step 5
} else {
resolve($then(
new $Promise(function (resolve2) {
// process.exit(42);
resolve2(Call(ret, iterator, [])); // step 6
}),
function (innerResult) {
if (!isObject(innerResult)) {
throw new $TypeError('`innerResult` must be an Object'); // step 10
}
return completion;
},
function (e) {
if (completion.type() === 'throw') {
completion['?'](); // step 8
} else {
throw e; // step 9
}
}
));
}
});
};node_modules\es-abstract\2018\ArraySpeciesCreate.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\ArraySpeciesCreate.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};node_modules\es-abstract\2018\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2018\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9
if (proto !== $ArrayPrototype) { // step 8
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 2
A.length = length;
}
/* step 10, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2018\AdvanceStringIndex.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2019\AdvanceStringIndex.js (Line 1:1 - Line 44:2)
'use strict';
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $TypeError = require('es-errors/type');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
// https://262.ecma-international.org/6.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var first = $charCodeAt(S, index);
if (!isLeadingSurrogate(first)) {
return index + 1;
}
var second = $charCodeAt(S, index + 1);
if (!isTrailingSurrogate(second)) {
return index + 1;
}
return index + 2;
};node_modules\es-abstract\2018\AbstractRelationalComparison.js (Line 1:1 - Line 59:2), node_modules\es-abstract\2019\AbstractRelationalComparison.js (Line 1:1 - Line 55:3)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var IsStringPrefix = require('./IsStringPrefix');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
if (IsStringPrefix(py, px)) {
return false;
}
if (IsStringPrefix(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
}
var nx = ToNumber(px);
var ny = ToNumber(py);
if ($isNaN(nx) || $isNaN(ny)) {
return undefined;
}
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
return false;
}
if (nx === Infinity) {
return false;
}
if (ny === Infinity) {
return true;
}
if (ny === -Infinity) {
return false;
}
if (nx === -Infinity) {
return true;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
};node_modules\es-abstract\2018\AbstractEqualityComparison.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2019\AbstractEqualityComparison.js (Line 1:1 - Line 38:2)
'use strict';
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return x === y; // ES6+ specified this shortcut anyways.
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol') && isObject(y)) {
return AbstractEqualityComparison(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol')) {
return AbstractEqualityComparison(ToPrimitive(x), y);
}
return false;
};node_modules\es-abstract\2017\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2017\WordCharacters.js (Line 1:1 - Line 46:2), node_modules\es-abstract\2025\WordCharacters.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var Canonicalize = require('./Canonicalize');
var caseFolding = require('../helpers/caseFolding.json');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation
module.exports = function WordCharacters(IgnoreCase, Unicode) {
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
var U = '';
forEach(OwnPropertyKeys(caseFolding.C), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.C[c]; // step 3
}
});
forEach(OwnPropertyKeys(caseFolding.S), function (c) {
if (
$indexOf(A, c) === -1 // c not in A
&& $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A
) {
U += caseFolding.S[c]; // step 3
}
});
if ((!Unicode || !IgnoreCase) && U.length > 0) {
throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4
}
return A + U; // step 5, 6
};node_modules\es-abstract\2017\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2017\ValidateAtomicAccess.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2020\ValidateAtomicAccess.js (Line 1:1 - Line 34:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var isTypedArray = require('is-typed-array');
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/8.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1
}
var accessIndex = ToIndex(requestIndex); // step 2
var length = typedArrayLength(typedArray); // step 3
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 5
}
return accessIndex; // step 6
};node_modules\es-abstract\2017\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2017\UTF16Encoding.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/7.0/#sec-utf16encoding
module.exports = function UTF16Encoding(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2017\UTF16Decode.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2019\UTF16Decode.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
// https://262.ecma-international.org/7.0/#sec-utf16decode
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16Decode(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2017\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2017\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2017\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2017\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2017\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2017\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2017\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2017\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2017\ToNumber.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2017\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2020\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/6.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2017\ToIndex.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2019\ToIndex.js (Line 1:1 - Line 24:2)
'use strict';
var $RangeError = require('es-errors/range');
var ToInteger = require('./ToInteger');
var ToLength = require('./ToLength');
var SameValueZero = require('./SameValueZero');
// https://262.ecma-international.org/8.0/#sec-toindex
module.exports = function ToIndex(value) {
if (typeof value === 'undefined') {
return 0;
}
var integerIndex = ToInteger(value);
if (integerIndex < 0) {
throw new $RangeError('index must be >= 0');
}
var index = ToLength(integerIndex);
if (!SameValueZero(integerIndex, index)) {
throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1');
}
return index;
};node_modules\es-abstract\2017\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2017\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2017\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2017\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2017\StringGetOwnProperty.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2020\StringGetOwnProperty.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
// https://262.ecma-international.org/8.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};node_modules\es-abstract\2017\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2017\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2017\SplitMatch.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2020\SplitMatch.js (Line 1:1 - Line 35:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/6.0/#sec-splitmatch
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return false;
}
for (var i = 0; i < r; i += 1) {
if ($charAt(S, q + i) !== $charAt(R, i)) {
return false;
}
}
return q + r;
};node_modules\es-abstract\2017\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2017\SetValueInBuffer.js (Line 1:1 - Line 94:2), node_modules\es-abstract\2019\SetValueInBuffer.js (Line 1:1 - Line 96:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var NumberToRawBytes = require('./NumberToRawBytes');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/8.0/#sec-setvalueinbuffer
/* eslint max-params: 0 */
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a number');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') {
throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Assert: Type(value) is Number.
// 5. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 6
// 7. If isLittleEndian is not present, set isLittleEndian to to the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 8
var rawBytes = NumberToRawBytes(type, value, isLittleEndian); // step 8
if (isSAB) { // step 9
/*
Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false.
Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList.
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 10. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
}
// 11. Return NormalCompletion(undefined).
};node_modules\es-abstract\2017\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2017\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2017\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2017\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2017\SameValueNonNumber.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2019\SameValueNonNumber.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber
module.exports = function SameValueNonNumber(x, y) {
if (typeof x === 'number' || typeof x !== typeof y) {
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2017\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2017\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2017\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2017\RawBytesToNumber.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2019\RawBytesToNumber.js (Line 1:1 - Line 58:2)
'use strict';
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var $charAt = callBound('String.prototype.charAt');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-rawbytestonumber
module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false);
};node_modules\es-abstract\2017\QuoteJSONString.js (Line 22:1 - Line 31:2), node_modules\es-abstract\2019\QuoteJSONString.js (Line 28:1 - Line 37:7)
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(value, ''), function (C) {
if (Cnode_modules\es-abstract\2017\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2), node_modules\es-abstract\2025\OrdinaryToPrimitive.js (Line 1:1 - Line 36:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
var inspect = require('object-inspect');
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
module.exports = function OrdinaryToPrimitive(O, hint) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (/* typeof hint !== 'string' || */ hint !== 'string' && hint !== 'number') {
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
for (var i = 0; i < methodNames.length; i += 1) {
var name = methodNames[i];
var method = Get(O, name);
if (IsCallable(method)) {
var result = Call(method, O);
if (!isObject(result)) {
return result;
}
}
}
throw new $TypeError('No primitive value for ' + inspect(O));
};node_modules\es-abstract\2017\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2017\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2017\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2017\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2017\OrdinaryGetOwnProperty.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var hasOwn = require('hasown');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2017\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2017\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2019\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var ObjectCreate = require('./ObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return ObjectCreate(proto, slots);
};node_modules\es-abstract\2017\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2017\ObjectCreate.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 50:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/6.0/#sec-objectcreate
module.exports = function ObjectCreate(proto, internalSlotsList) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1
if (arguments.length >= 2 && !IsArray(slots)) {
throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array');
}
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (slots.length > 0) {
forEach(slots, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O; // step 6
};node_modules\es-abstract\2017\NumberToRawBytes.js (Line 1:1 - Line 59:2), node_modules\es-abstract\2019\NumberToRawBytes.js (Line 1:1 - Line 62:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwnProperty = require('./HasOwnProperty');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
var integerToNBytes = require('../helpers/integerToNBytes');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#table-50
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32
};
// https://262.ecma-international.org/8.0/#sec-numbertorawbytes
module.exports = function NumberToRawBytes(type, value, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a Number');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
if (type === 'Float32') { // step 1
return valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
return valueToFloat64Bytes(value, isLittleEndian);
} // step 3
var n = tableTAO.size['$' + type]; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
};node_modules\es-abstract\2017\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2017\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2017\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2017\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2017\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2017\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2017\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2017\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2017\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2017\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2017\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2017\IterableToList.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2019\IterableToList.js (Line 1:1 - Line 26:2)
'use strict';
var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
// https://262.ecma-international.org/8.0/#sec-iterabletolist
module.exports = function IterableToList(items, method) {
var iterator = GetIterator(items, method);
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};node_modules\es-abstract\2017\IsWordChar.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\IsWordChar.js (Line 1:1 - Line 46:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
if (!IsInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!IsInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};node_modules\es-abstract\2017\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IsSharedArrayBuffer.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
module.exports = function IsSharedArrayBuffer(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return isSharedArrayBuffer(obj);
};node_modules\es-abstract\2017\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2017\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2017\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2017\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2017\IsDetachedBuffer.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2025\IsDetachedBuffer.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2017\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2017\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2017\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2017\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2017\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2017\InternalizeJSONProperty.js (Line 1:1 - Line 11:9), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 1:1 - Line 11:18)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnProperties = require('./EnumerableOwnProperties');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLengthnode_modules\es-abstract\2017\InternalizeJSONProperty.js (Line 18:1 - Line 68:2), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 18:1 - Line 68:2)
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 2
var isArray = IsArray(val); // step 2.a
if (isArray) { // step 2.b
var I = 0; // step 2.b.i
var len = ToLength(Get(val, 'length')); // step 2.b.ii
while (I < len) { // step 2.b.iii
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
if (typeof newElement === 'undefined') { // step 2.b.iii.2
delete val[ToString(I)]; // step 2.b.iii.2.a
} else { // step 2.b.iii.3
CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
}
I += 1; // step 2.b.iii.4
}
} else { // step 2.c
var keys = EnumerableOwnProperties(val, 'key'); // step 2.c.i
forEach(keys, function (P) { // step 2.c.ii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
if (typeof newElement === 'undefined') { // step 2.c.ii.2
delete val[P]; // step 2.c.ii.2.a
} else { // step 2.c.ii.3
CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 3
};node_modules\es-abstract\2017\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2019\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToNumber = require('./ToNumber');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 12
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020'); // step 2
}
var numValue = ToNumber(value); // step 3
var buffer = typedArrayBuffer(O); // step 5
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 6
}
if (!IsInteger(index) || isNegativeZero(index)) {
return false; // steps 7 - 8
}
var length = typedArrayLength(O); // step 9
if (index < 0 || index >= length) {
return false; // step 10
}
var offset = typedArrayByteOffset(O); // step 11
var elementType = tableTAO.name['$' + arrayTypeName]; // step 15
var elementSize = tableTAO.size['$' + elementType]; // step 13
var indexedPosition = (index * elementSize) + offset; // step 14
SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, 'Unordered'); // step 16
return true; // step 17
};node_modules\es-abstract\2017\IntegerIndexedElementGet.js (Line 1:1 - Line 58:2), node_modules\es-abstract\2019\IntegerIndexedElementGet.js (Line 1:1 - Line 58:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayLength = require('typed-array-length');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/8.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 10
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 4
}
if (!IsInteger(index) || isNegativeZero(index)) {
return void undefined; // steps 5 - 6
}
var length = typedArrayLength(O); // step 7
if (index < 0 || index >= length) {
return void undefined; // step 8
}
var offset = typedArrayByteOffset(O); // step 9
var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
var elementSize = tableTAO.size['$' + elementType]; // step 11
var indexedPosition = (index * elementSize) + offset; // step 12
return GetValueFromBuffer(buffer, indexedPosition, elementType, true, 'Unordered'); // step 14
};node_modules\es-abstract\2017\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2017\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2017\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2017\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2017\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2017\GetValueFromBuffer.js (Line 1:1 - Line 96:2), node_modules\es-abstract\2018\GetValueFromBuffer.js (Line 1:1 - Line 94:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumber = require('./RawBytesToNumber');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string') {
throw new $TypeError('Assertion failed: `type` must be a string');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (typeof order !== 'string') {
throw new $TypeError('Assertion failed: `order` must be a string');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('TODO: support SharedArrayBuffers');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumber(type, bytes, isLittleEndian);
};node_modules\es-abstract\2017\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2017\GetSubstitution.js (Line 27:9 - Line 43:63), node_modules\es-abstract\2021\GetSubstitution.js (Line 29:14 - Line 45:93)
, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got 'node_modules\es-abstract\2017\GetSubstitution.js (Line 53:2 - Line 88:2), node_modules\es-abstract\2021\GetSubstitution.js (Line 58:2 - Line 93:3)
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else {node_modules\es-abstract\2017\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2017\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2017\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2017\GetIterator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2019\GetIterator.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var isObject = require('es-object-atoms/isObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/6.0/#sec-getiterator
module.exports = function GetIterator(obj, method) {
var actualMethod = method;
if (arguments.length < 2) {
actualMethod = getIteratorMethod(ES, obj);
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
};node_modules\es-abstract\2017\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2017\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2017\EnumerableOwnProperties.js (Line 16:1 - Line 37:2), node_modules\es-abstract\2025\EnumerableOwnProperties.js (Line 15:1 - Line 36:2)
module.exports = function EnumerableOwnProperties(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};node_modules\es-abstract\2017\DetachArrayBuffer.js (Line 1:1 - Line 14:14), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 1:1 - Line 15:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel; // node 11.7+node_modules\es-abstract\2017\DetachArrayBuffer.js (Line 26:2 - Line 39:2), node_modules\es-abstract\2025\DetachArrayBuffer.js (Line 33:2 - Line 46:2)
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2017\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2017\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2017\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2017\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2017\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2017\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2017\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2017\CreateListFromArrayLike.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = ToLength(Get(obj, 'length'));
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2017\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2017\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2017\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2017\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2017\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2017\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2017\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2017\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2017\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2017\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2017\ArraySpeciesCreate.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\ArraySpeciesCreate.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};node_modules\es-abstract\2017\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2017\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9
if (proto !== $ArrayPrototype) { // step 8
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 2
A.length = length;
}
/* step 10, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2017\AdvanceStringIndex.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2019\AdvanceStringIndex.js (Line 1:1 - Line 44:2)
'use strict';
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $TypeError = require('es-errors/type');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
// https://262.ecma-international.org/6.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var first = $charCodeAt(S, index);
if (!isLeadingSurrogate(first)) {
return index + 1;
}
var second = $charCodeAt(S, index + 1);
if (!isTrailingSurrogate(second)) {
return index + 1;
}
return index + 2;
};node_modules\es-abstract\2017\AbstractRelationalComparison.js (Line 1:1 - Line 62:2), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 1:1 - Line 62:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var isPrefixOf = require('../helpers/isPrefixOf');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/5.1/#sec-11.8.5
// eslint-disable-next-line max-statements
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
var bothStrings = typeof px === 'string' && typeof py === 'string';
if (!bothStrings) {
var nx = ToNumber(px);
var ny = ToNumber(py);
if ($isNaN(nx) || $isNaN(ny)) {
return undefined;
}
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
return false;
}
if (nx === Infinity) {
return false;
}
if (ny === Infinity) {
return true;
}
if (ny === -Infinity) {
return false;
}
if (nx === -Infinity) {
return true;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
}
if (isPrefixOf(py, px)) {
return false;
}
if (isPrefixOf(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f
};node_modules\es-abstract\2017\AbstractEqualityComparison.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2019\AbstractEqualityComparison.js (Line 1:1 - Line 38:2)
'use strict';
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return x === y; // ES6+ specified this shortcut anyways.
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol') && isObject(y)) {
return AbstractEqualityComparison(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol')) {
return AbstractEqualityComparison(ToPrimitive(x), y);
}
return false;
};node_modules\es-abstract\2016\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2016\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2016\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2016\UTF16Encoding.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\UTF16EncodeCodePoint.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var floor = require('./floor');
var modulo = require('./modulo');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/7.0/#sec-utf16encoding
module.exports = function UTF16Encoding(cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
}
if (cp <= 65535) {
return $fromCharCode(cp);
}
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
return cu1 + cu2;
};node_modules\es-abstract\2016\UTF16Decode.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2019\UTF16Decode.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
// https://262.ecma-international.org/7.0/#sec-utf16decode
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16Decode(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};node_modules\es-abstract\2016\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\TypedArraySpeciesCreate.js (Line 1:1 - Line 37:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var whichTypedArray = require('which-typed-array');
var availableTypedArrays = require('available-typed-arrays')();
var IsArray = require('./IsArray');
var SpeciesConstructor = require('./SpeciesConstructor');
var TypedArrayCreate = require('./TypedArrayCreate');
var getConstructor = require('../helpers/typedArrayConstructors');
// https://262.ecma-international.org/7.0/#typedarray-species-create
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
var kind = whichTypedArray(exemplar);
if (!kind) {
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
}
var defaultConstructor = getConstructor(kind); // step 2
if (typeof defaultConstructor !== 'function') {
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
}
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
return TypedArrayCreate(constructor, argumentList); // step 4
};node_modules\es-abstract\2016\TypedArrayCreate.js (Line 1:1 - Line 47:2), node_modules\es-abstract\2023\TypedArrayCreate.js (Line 1:1 - Line 47:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
var ValidateTypedArray = require('./ValidateTypedArray');
var availableTypedArrays = require('available-typed-arrays')();
var typedArrayLength = require('typed-array-length');
// https://262.ecma-international.org/7.0/#typedarray-create
module.exports = function TypedArrayCreate(constructor, argumentList) {
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
if (!IsArray(argumentList)) {
throw new $TypeError('Assertion failed: `argumentList` must be a List');
}
if (availableTypedArrays.length === 0) {
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
}
// var newTypedArray = Construct(constructor, argumentList); // step 1
var newTypedArray;
if (argumentList.length === 0) {
newTypedArray = new constructor();
} else if (argumentList.length === 1) {
newTypedArray = new constructor(argumentList[0]);
} else if (argumentList.length === 2) {
newTypedArray = new constructor(argumentList[0], argumentList[1]);
} else {
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
}
ValidateTypedArray(newTypedArray); // step 2
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
if (typedArrayLength(newTypedArray) < argumentList[0]) {
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
}
}
return newTypedArray; // step 4
};node_modules\es-abstract\2016\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2016\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2016\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2016\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2016\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2016\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2016\ToNumber.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2016\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2020\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/6.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2016\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2016\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2016\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2016\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2016\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2016\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2016\SplitMatch.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2020\SplitMatch.js (Line 1:1 - Line 35:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/6.0/#sec-splitmatch
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return false;
}
for (var i = 0; i < r; i += 1) {
if ($charAt(S, q + i) !== $charAt(R, i)) {
return false;
}
}
return q + r;
};node_modules\es-abstract\2016\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2016\SetValueInBuffer.js (Line 10:21 - Line 19:14), node_modules\es-abstract\2025\NumericToRawBytes.js (Line 7:16 - Line 16:20)
);
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var isArrayBuffernode_modules\es-abstract\2016\SetValueInBuffer.js (Line 45:57 - Line 60:10), node_modules\es-abstract\2020\SetValueInBuffer.js (Line 30:80 - Line 45:7)
);
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a number');
}
if (argumentsnode_modules\es-abstract\2016\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2016\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2016\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2016\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2016\SameValueNonNumber.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2019\SameValueNonNumber.js (Line 1:1 - Line 14:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber
module.exports = function SameValueNonNumber(x, y) {
if (typeof x === 'number' || typeof x !== typeof y) {
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
}
return SameValue(x, y);
};node_modules\es-abstract\2016\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2016\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2016\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2016\QuoteJSONString.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2017\QuoteJSONString.js (Line 1:1 - Line 48:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var $strSlice = callBound('String.prototype.slice');
var $strSplit = callBound('String.prototype.split');
// https://262.ecma-international.org/6.0/#sec-quotejsonstring
var escapes = {
'\u0008': 'b',
'\u000C': 'f',
'\u000A': 'n',
'\u000D': 'r',
'\u0009': 't'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(value, ''), function (C) {
if (C === '"' || C === '\\') {
product += '\u005C' + C;
} else if (C === '\u0008' || C === '\u000C' || C === '\u000A' || C === '\u000D' || C === '\u0009') {
var abbrev = escapes[C];
product += '\u005C' + abbrev;
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20) {
product += '\u005Cu' + $toLowerCase($strSlice('0000' + $numberToString(cCharCode, 16), -4));
} else {
product += C;
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2016\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinarySetPrototypeOf.js (Line 1:1 - Line 50:2)
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};node_modules\es-abstract\2016\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2016\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2016\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryGetPrototypeOf.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};node_modules\es-abstract\2016\OrdinaryGetOwnProperty.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var hasOwn = require('hasown');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2016\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2016\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2019\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var ObjectCreate = require('./ObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return ObjectCreate(proto, slots);
};node_modules\es-abstract\2016\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2016\ObjectCreate.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 50:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/6.0/#sec-objectcreate
module.exports = function ObjectCreate(proto, internalSlotsList) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1
if (arguments.length >= 2 && !IsArray(slots)) {
throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array');
}
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (slots.length > 0) {
forEach(slots, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O; // step 6
};node_modules\es-abstract\2016\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2016\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2016\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2016\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2016\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2016\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2016\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2016\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2016\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2016\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2016\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2016\IterableToArrayLike.js (Line 20:14 - Line 33:7), node_modules\es-abstract\2020\IterableToList.js (Line 10:7 - Line 26:2)
);
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
}
returnnode_modules\es-abstract\2016\IsWordChar.js (Line 20:6 - Line 30:2), node_modules\es-abstract\2020\IsWordChar.js (Line 22:8 - Line 32:7)
) {
if (!IsInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!IsInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (enode_modules\es-abstract\2016\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2016\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2016\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2016\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2016\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2016\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2016\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2016\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2016\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2016\InternalizeJSONProperty.js (Line 18:1 - Line 33:10), node_modules\es-abstract\2025\InternalizeJSONProperty.js (Line 18:1 - Line 33:10)
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 3node_modules\es-abstract\2016\IntegerIndexedElementSet.js (Line 1:1 - Line 19:72), node_modules\es-abstract\2019\IntegerIndexedElementSet.js (Line 1:1 - Line 19:72)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToNumber = require('./ToNumber');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/6.0/#sec-integerindexedelementsetnode_modules\es-abstract\2016\IntegerIndexedElementSet.js (Line 21:1 - Line 59:2), node_modules\es-abstract\2019\IntegerIndexedElementSet.js (Line 21:1 - Line 59:2)
module.exports = function IntegerIndexedElementSet(O, index, value) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 12
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020'); // step 2
}
var numValue = ToNumber(value); // step 3
var buffer = typedArrayBuffer(O); // step 5
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 6
}
if (!IsInteger(index) || isNegativeZero(index)) {
return false; // steps 7 - 8
}
var length = typedArrayLength(O); // step 9
if (index < 0 || index >= length) {
return false; // step 10
}
var offset = typedArrayByteOffset(O); // step 11
var elementType = tableTAO.name['$' + arrayTypeName]; // step 15
var elementSize = tableTAO.size['$' + elementType]; // step 13
var indexedPosition = (index * elementSize) + offset; // step 14
SetValueInBuffer(buffer, indexedPosition, elementType, numValue)node_modules\es-abstract\2016\IntegerIndexedElementGet.js (Line 20:1 - Line 56:2), node_modules\es-abstract\2019\IntegerIndexedElementGet.js (Line 21:1 - Line 57:2)
module.exports = function IntegerIndexedElementGet(O, index) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 10
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 4
}
if (!IsInteger(index) || isNegativeZero(index)) {
return void undefined; // steps 5 - 6
}
var length = typedArrayLength(O); // step 7
if (index < 0 || index >= length) {
return void undefined; // step 8
}
var offset = typedArrayByteOffset(O); // step 9
var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
var elementSize = tableTAO.size['$' + elementType]; // step 11
var indexedPosition = (index * elementSize) + offset; // step 12
return GetValueFromBuffer(buffer, indexedPosition, elementType)node_modules\es-abstract\2016\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2016\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2016\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2016\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2016\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2016\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2016\GetSubstitution.js (Line 2:1 - Line 98:2), node_modules\es-abstract\2017\GetSubstitution.js (Line 2:1 - Line 98:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $parseInt = GetIntrinsic('%parseInt%');
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var regexTester = require('safe-regex-test');
var callBound = require('call-bound');
var every = require('../helpers/every');
var isDigit = regexTester(/^[0-9]$/);
var $charAt = callBound('String.prototype.charAt');
var $strSlice = callBound('String.prototype.slice');
var IsArray = require('./IsArray');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
// https://262.ecma-international.org/6.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};node_modules\es-abstract\2016\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2016\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2016\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2016\GetIterator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2019\GetIterator.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var isObject = require('es-object-atoms/isObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/6.0/#sec-getiterator
module.exports = function GetIterator(obj, method) {
var actualMethod = method;
if (arguments.length < 2) {
actualMethod = getIteratorMethod(ES, obj);
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
};node_modules\es-abstract\2016\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2016\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2016\DetachArrayBuffer.js (Line 22:94 - Line 38:2), node_modules\es-abstract\2017\DetachArrayBuffer.js (Line 23:125 - Line 46:2)
);
}
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2016\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2016\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2016\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2016\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2016\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2016\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2016\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2016\CreateListFromArrayLike.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = ToLength(Get(obj, 'length'));
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2016\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2016\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2016\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2016\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2016\CompletionRecord.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2025\CompletionRecord.js (Line 1:1 - Line 48:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[Type]]', type);
SLOT.set(this, '[[Value]]', value);
// [[Target]] slot?
};
CompletionRecord.prototype.type = function Type() {
return SLOT.get(this, '[[Type]]');
};
CompletionRecord.prototype.value = function Value() {
return SLOT.get(this, '[[Value]]');
};
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
var type = SLOT.get(this, '[[Type]]');
var value = SLOT.get(this, '[[Value]]');
if (type === 'throw') {
throw value;
}
return value;
};
CompletionRecord.prototype['!'] = function assert() {
var type = SLOT.get(this, '[[Type]]');
if (type !== 'normal') {
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
}
return SLOT.get(this, '[[Value]]');
};
module.exports = CompletionRecord;node_modules\es-abstract\2016\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2016\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2016\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2016\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2016\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2016\ArraySpeciesCreate.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\ArraySpeciesCreate.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};node_modules\es-abstract\2016\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2016\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9
if (proto !== $ArrayPrototype) { // step 8
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 2
A.length = length;
}
/* step 10, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2016\AdvanceStringIndex.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2019\AdvanceStringIndex.js (Line 1:1 - Line 44:2)
'use strict';
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $TypeError = require('es-errors/type');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
// https://262.ecma-international.org/6.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var first = $charCodeAt(S, index);
if (!isLeadingSurrogate(first)) {
return index + 1;
}
var second = $charCodeAt(S, index + 1);
if (!isTrailingSurrogate(second)) {
return index + 1;
}
return index + 2;
};node_modules\es-abstract\2016\AbstractRelationalComparison.js (Line 1:1 - Line 62:2), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 1:1 - Line 62:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var isPrefixOf = require('../helpers/isPrefixOf');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/5.1/#sec-11.8.5
// eslint-disable-next-line max-statements
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
var bothStrings = typeof px === 'string' && typeof py === 'string';
if (!bothStrings) {
var nx = ToNumber(px);
var ny = ToNumber(py);
if ($isNaN(nx) || $isNaN(ny)) {
return undefined;
}
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
return false;
}
if (nx === Infinity) {
return false;
}
if (ny === Infinity) {
return true;
}
if (ny === -Infinity) {
return false;
}
if (nx === -Infinity) {
return true;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
}
if (isPrefixOf(py, px)) {
return false;
}
if (isPrefixOf(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f
};node_modules\es-abstract\2016\AbstractEqualityComparison.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2019\AbstractEqualityComparison.js (Line 1:1 - Line 38:2)
'use strict';
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return x === y; // ES6+ specified this shortcut anyways.
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol') && isObject(y)) {
return AbstractEqualityComparison(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol')) {
return AbstractEqualityComparison(ToPrimitive(x), y);
}
return false;
};node_modules\es-abstract\2015\YearFromTime.js (Line 1:1 - Line 16:2), node_modules\es-abstract\5\YearFromTime.js (Line 1:1 - Line 16:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var callBound = require('call-bound');
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function YearFromTime(t) {
// largest y such that this.TimeFromYear(y) <= t
return $getUTCFullYear(new $Date(t));
};node_modules\es-abstract\2015\ValidateTypedArray.js (Line 1:1 - Line 28:2), node_modules\es-abstract\2021\ValidateTypedArray.js (Line 1:1 - Line 28:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
module.exports = function ValidateTypedArray(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
}
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
}
var buffer = typedArrayBuffer(O); // step 4
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
}
return buffer; // step 6
};node_modules\es-abstract\2015\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2), node_modules\es-abstract\2021\ValidateAndApplyPropertyDescriptor.js (Line 1:1 - Line 159:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};node_modules\es-abstract\2015\ToUint8Clamp.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2023\ToUint8Clamp.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var floor = require('./floor');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-touint8clamp
module.exports = function ToUint8Clamp(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = floor(number);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
};node_modules\es-abstract\2015\ToUint8.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2022\ToUint8.js (Line 1:1 - Line 19:2)
'use strict';
var ToNumber = require('./ToNumber');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var modulo = require('math-intrinsics/mod');
// https://262.ecma-international.org/6.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x100);
};node_modules\es-abstract\2015\ToUint16.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\ToUint16.js (Line 1:1 - Line 19:2)
'use strict';
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var $sign = require('math-intrinsics/sign');
// http://262.ecma-international.org/5.1/#sec-9.7
module.exports = function ToUint16(value) {
var number = ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = $sign(number) * floor(abs(number));
return modulo(posInt, 0x10000);
};node_modules\es-abstract\2015\ToString.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToString.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};node_modules\es-abstract\2015\ToPropertyKey.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\ToPropertyKey.js (Line 1:1 - Line 15:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var ToPrimitive = require('./ToPrimitive');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-topropertykey
module.exports = function ToPropertyKey(argument) {
var key = ToPrimitive(argument, $String);
return typeof key === 'symbol' ? key : ToString(key);
};node_modules\es-abstract\2015\ToPropertyDescriptor.js (Line 1:1 - Line 50:2), node_modules\es-abstract\5\ToPropertyDescriptor.js (Line 1:1 - Line 50:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsCallable = require('./IsCallable');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/5.1/#sec-8.10.5
module.exports = function ToPropertyDescriptor(Obj) {
if (!isObject(Obj)) {
throw new $TypeError('ToPropertyDescriptor requires an object');
}
var desc = {};
if (hasOwn(Obj, 'enumerable')) {
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
}
if (hasOwn(Obj, 'configurable')) {
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
}
if (hasOwn(Obj, 'value')) {
desc['[[Value]]'] = Obj.value;
}
if (hasOwn(Obj, 'writable')) {
desc['[[Writable]]'] = ToBoolean(Obj.writable);
}
if (hasOwn(Obj, 'get')) {
var getter = Obj.get;
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
throw new $TypeError('getter must be a function');
}
desc['[[Get]]'] = getter;
}
if (hasOwn(Obj, 'set')) {
var setter = Obj.set;
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
throw new $TypeError('setter must be a function');
}
desc['[[Set]]'] = setter;
}
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
}
return desc;
};node_modules\es-abstract\2015\ToNumber.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2021\ToNumber.js (Line 1:1 - Line 51:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};node_modules\es-abstract\2015\ToLength.js (Line 1:1 - Line 14:2), node_modules\es-abstract\2020\ToLength.js (Line 1:1 - Line 14:2)
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/6.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};node_modules\es-abstract\2015\ToDateString.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\ToDateString.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Date = GetIntrinsic('%Date%');
var $String = GetIntrinsic('%String%');
var $isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/6.0/#sec-todatestring
module.exports = function ToDateString(tv) {
if (typeof tv !== 'number') {
throw new $TypeError('Assertion failed: `tv` must be a Number');
}
if ($isNaN(tv)) {
return 'Invalid Date';
}
return $String(new $Date(tv));
};node_modules\es-abstract\2015\TimeClip.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\TimeClip.js (Line 1:1 - Line 19:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $isFinite = require('math-intrinsics/isFinite');
var abs = require('math-intrinsics/abs');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || abs(time) > 8.64e15) {
return NaN;
}
return +new $Date(ToNumber(time));
};node_modules\es-abstract\2015\TestIntegrityLevel.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\TestIntegrityLevel.js (Line 1:1 - Line 40:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var every = require('../helpers/every');
var OwnPropertyKeys = require('own-keys');
var isObject = require('es-object-atoms/isObject');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsExtensible = require('./IsExtensible');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
module.exports = function TestIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
var status = IsExtensible(O);
if (status || !$gOPD) {
return false;
}
var theKeys = OwnPropertyKeys(O);
return theKeys.length === 0 || every(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
if (currentDesc.configurable) {
return false;
}
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
return false;
}
}
return true;
});
};node_modules\es-abstract\2015\SymbolDescriptiveString.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\SymbolDescriptiveString.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};node_modules\es-abstract\2015\StringCreate.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2025\StringCreate.js (Line 1:1 - Line 38:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Object = require('es-object-atoms');
var $StringPrototype = GetIntrinsic('%String.prototype%');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var setProto = require('set-proto');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
// https://262.ecma-international.org/6.0/#sec-stringcreate
module.exports = function StringCreate(value, prototype) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var S = $Object(value);
if (prototype !== $StringPrototype) {
if (setProto) {
setProto(S, prototype);
} else {
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
}
var length = value.length;
DefinePropertyOrThrow(S, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
return S;
};node_modules\es-abstract\2015\StrictEqualityComparison.js (Line 1:1 - Line 15:2), node_modules\es-abstract\5\StrictEqualityComparison.js (Line 1:1 - Line 15:2)
'use strict';
var Type = require('./Type');
// https://262.ecma-international.org/5.1/#sec-11.9.6
module.exports = function StrictEqualityComparison(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'undefined' || x === null) {
return true;
}
return x === y; // shortcut for steps 4-7
};node_modules\es-abstract\2015\SplitMatch.js (Line 1:1 - Line 35:2), node_modules\es-abstract\2020\SplitMatch.js (Line 1:1 - Line 35:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
// https://262.ecma-international.org/6.0/#sec-splitmatch
module.exports = function SplitMatch(S, q, R) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(q)) {
throw new $TypeError('Assertion failed: `q` must be an integer');
}
if (typeof R !== 'string') {
throw new $TypeError('Assertion failed: `R` must be a String');
}
var r = R.length;
var s = S.length;
if (q + r > s) {
return false;
}
for (var i = 0; i < r; i += 1) {
if ($charAt(S, q + i) !== $charAt(R, i)) {
return false;
}
}
return q + r;
};node_modules\es-abstract\2015\SpeciesConstructor.js (Line 1:1 - Line 32:2), node_modules\es-abstract\2025\SpeciesConstructor.js (Line 1:1 - Line 32:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};node_modules\es-abstract\2015\SetValueInBuffer.js (Line 1:1 - Line 110:2), node_modules\es-abstract\2016\SetValueInBuffer.js (Line 1:1 - Line 110:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var ToInt16 = require('./ToInt16');
var ToInt32 = require('./ToInt32');
var ToInt8 = require('./ToInt8');
var ToUint16 = require('./ToUint16');
var ToUint32 = require('./ToUint32');
var ToUint8 = require('./ToUint8');
var ToUint8Clamp = require('./ToUint8Clamp');
var isArrayBuffer = require('is-array-buffer');
var hasOwn = require('hasown');
var tableTAO = require('./tables/typed-array-objects');
var TypeToAO = {
__proto__: null,
$Int8: ToInt8,
$Uint8: ToUint8,
$Uint8C: ToUint8Clamp,
$Int16: ToInt16,
$Uint16: ToUint16,
$Int32: ToInt32,
$Uint32: ToUint32
};
var defaultEndianness = require('../helpers/defaultEndianness');
var forEach = require('../helpers/forEach');
var integerToNBytes = require('../helpers/integerToNBytes');
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer
module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) {
if (!isArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || !hasOwn(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof value !== 'number') {
throw new $TypeError('Assertion failed: `value` must be a number');
}
if (arguments.length > 4 && typeof arguments[4] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Assert: Type(value) is Number.
// 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
// 6. Assert: block is not undefined.
var elementSize = tableTAO.size['$' + type]; // step 7
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation.
var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8
var rawBytes;
if (type === 'Float32') { // step 1
rawBytes = valueToFloat32Bytes(value, isLittleEndian);
} else if (type === 'Float64') { // step 2
rawBytes = valueToFloat64Bytes(value, isLittleEndian);
} else {
var n = elementSize; // step 3.a
var convOp = TypeToAO['$' + type]; // step 3.b
var intValue = convOp(value); // step 3.c
rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
}
// 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex].
var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize);
forEach(rawBytes, function (rawByte, i) {
arr[i] = rawByte;
});
// 13. Return NormalCompletion(undefined).
};node_modules\es-abstract\2015\SetIntegrityLevel.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2025\SetIntegrityLevel.js (Line 1:1 - Line 57:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPD = require('gopd');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var forEach = require('../helpers/forEach');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-setintegritylevel
module.exports = function SetIntegrityLevel(O, level) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (level !== 'sealed' && level !== 'frozen') {
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
}
if (!$preventExtensions) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support');
}
var status = $preventExtensions(O);
if (!status) {
return false;
}
if (!$gOPN) {
throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support');
}
var theKeys = $gOPN(O);
if (level === 'sealed') {
forEach(theKeys, function (k) {
DefinePropertyOrThrow(O, k, { configurable: false });
});
} else if (level === 'frozen') {
forEach(theKeys, function (k) {
var currentDesc = $gOPD(O, k);
if (typeof currentDesc !== 'undefined') {
var desc;
if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) {
desc = { configurable: false };
} else {
desc = { configurable: false, writable: false };
}
DefinePropertyOrThrow(O, k, desc);
}
});
}
return true;
};node_modules\es-abstract\2015\SetFunctionName.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\SetFunctionName.js (Line 1:1 - Line 40:2)
'use strict';
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var getSymbolDescription = require('get-symbol-description');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var IsExtensible = require('./IsExtensible');
// https://262.ecma-international.org/6.0/#sec-setfunctionname
module.exports = function SetFunctionName(F, name) {
if (typeof F !== 'function') {
throw new $TypeError('Assertion failed: `F` must be a function');
}
if (!IsExtensible(F) || hasOwn(F, 'name')) {
throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property');
}
if (typeof name !== 'symbol' && typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` must be a Symbol or a String');
}
if (typeof name === 'symbol') {
var description = getSymbolDescription(name);
// eslint-disable-next-line no-param-reassign
name = typeof description === 'undefined' ? '' : '[' + description + ']';
}
if (arguments.length > 2) {
var prefix = arguments[2];
// eslint-disable-next-line no-param-reassign
name = prefix + ' ' + name;
}
return DefinePropertyOrThrow(F, 'name', {
'[[Value]]': name,
'[[Writable]]': false,
'[[Enumerable]]': false,
'[[Configurable]]': true
});
};node_modules\es-abstract\2015\Set.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2025\Set.js (Line 1:1 - Line 45:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
var noThrowOnStrictViolation = (function () {
try {
delete [].length;
return true;
} catch (e) {
return false;
}
}());
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
module.exports = function Set(O, P, V, Throw) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
if (typeof Throw !== 'boolean') {
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
}
if (Throw) {
O[P] = V; // eslint-disable-line no-param-reassign
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
throw new $TypeError('Attempted to assign to readonly property.');
}
return true;
}
try {
O[P] = V; // eslint-disable-line no-param-reassign
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
} catch (e) {
return false;
}
};node_modules\es-abstract\2015\SecFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\SecFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var SecondsPerMinute = timeConstants.SecondsPerMinute;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function SecFromTime(t) {
return modulo(floor(t / msPerSecond), SecondsPerMinute);
};node_modules\es-abstract\2015\SameValue.js (Line 1:1 - Line 13:2), node_modules\es-abstract\5\SameValue.js (Line 1:1 - Line 13:2)
'use strict';
var $isNaN = require('math-intrinsics/isNaN');
// http://262.ecma-international.org/5.1/#sec-9.12
module.exports = function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
};node_modules\es-abstract\2015\RegExpExec.js (Line 1:1 - Line 29:2), node_modules\es-abstract\2025\RegExpExec.js (Line 1:1 - Line 29:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var regexExec = require('call-bound')('RegExp.prototype.exec');
var Call = require('./Call');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-regexpexec
module.exports = function RegExpExec(R, S) {
if (!isObject(R)) {
throw new $TypeError('Assertion failed: `R` must be an Object');
}
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
var exec = Get(R, 'exec');
if (IsCallable(exec)) {
var result = Call(exec, R, [S]);
if (result === null || isObject(result)) {
return result;
}
throw new $TypeError('"exec" method must return `null` or an Object');
}
return regexExec(R, S);
};node_modules\es-abstract\2015\RegExpCreate.js (Line 1:1 - Line 21:2), node_modules\es-abstract\2025\RegExpCreate.js (Line 1:1 - Line 21:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
// var RegExpAlloc = require('./RegExpAlloc');
// var RegExpInitialize = require('./RegExpInitialize');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-regexpcreate
module.exports = function RegExpCreate(P, F) {
// var obj = RegExpAlloc($RegExp);
// return RegExpInitialize(obj, P, F);
// covers spec mechanics; bypass regex brand checking
var pattern = typeof P === 'undefined' ? '' : ToString(P);
var flags = typeof F === 'undefined' ? '' : ToString(F);
return new $RegExp(pattern, flags);
};node_modules\es-abstract\2015\QuoteJSONString.js (Line 1:1 - Line 48:2), node_modules\es-abstract\2017\QuoteJSONString.js (Line 1:1 - Line 48:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $numberToString = callBound('Number.prototype.toString');
var $toLowerCase = callBound('String.prototype.toLowerCase');
var $strSlice = callBound('String.prototype.slice');
var $strSplit = callBound('String.prototype.split');
// https://262.ecma-international.org/6.0/#sec-quotejsonstring
var escapes = {
'\u0008': 'b',
'\u000C': 'f',
'\u000A': 'n',
'\u000D': 'r',
'\u0009': 't'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(value, ''), function (C) {
if (C === '"' || C === '\\') {
product += '\u005C' + C;
} else if (C === '\u0008' || C === '\u000C' || C === '\u000A' || C === '\u000D' || C === '\u0009') {
var abbrev = escapes[C];
product += '\u005C' + abbrev;
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20) {
product += '\u005Cu' + $toLowerCase($strSlice('0000' + $numberToString(cCharCode, 16), -4));
} else {
product += C;
}
}
});
}
product += '"';
return product;
};node_modules\es-abstract\2015\OrdinaryHasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\OrdinaryHasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
module.exports = function OrdinaryHasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2015\OrdinaryHasInstance.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\OrdinaryHasInstance.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
module.exports = function OrdinaryHasInstance(C, O) {
if (!IsCallable(C)) {
return false;
}
if (!isObject(O)) {
return false;
}
var P = Get(C, 'prototype');
if (!isObject(P)) {
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
}
return O instanceof C;
};node_modules\es-abstract\2015\OrdinaryGetOwnProperty.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2020\OrdinaryGetOwnProperty.js (Line 1:1 - Line 41:2)
'use strict';
var $gOPD = require('gopd');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var hasOwn = require('hasown');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var IsArray = require('./IsArray');
var isPropertyKey = require('../helpers/isPropertyKey');
var IsRegExp = require('./IsRegExp');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
module.exports = function OrdinaryGetOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!hasOwn(O, P)) {
return void 0;
}
if (!$gOPD) {
// ES3 / IE 8 fallback
var arrayLength = IsArray(O) && P === 'length';
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
return {
'[[Configurable]]': !(arrayLength || regexLastIndex),
'[[Enumerable]]': $isEnumerable(O, P),
'[[Value]]': O[P],
'[[Writable]]': true
};
}
return ToPropertyDescriptor($gOPD(O, P));
};node_modules\es-abstract\2015\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2), node_modules\es-abstract\2025\OrdinaryDefineOwnProperty.js (Line 1:1 - Line 54:2)
'use strict';
var $gOPD = require('gopd');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsExtensible = require('./IsExtensible');
var isPropertyKey = require('../helpers/isPropertyKey');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var SameValue = require('./SameValue');
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!$gOPD) {
// ES3/IE 8 fallback
if (IsAccessorDescriptor(Desc)) {
throw new $SyntaxError('This environment does not support accessor property descriptors.');
}
var creatingNormalDataProperty = !(P in O)
&& Desc['[[Writable]]']
&& Desc['[[Enumerable]]']
&& Desc['[[Configurable]]']
&& '[[Value]]' in Desc;
var settingExistingDataProperty = (P in O)
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
&& '[[Value]]' in Desc;
if (creatingNormalDataProperty || settingExistingDataProperty) {
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
return SameValue(O[P], Desc['[[Value]]']);
}
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
}
var desc = $gOPD(O, P);
var current = desc && ToPropertyDescriptor(desc);
var extensible = IsExtensible(O);
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
};node_modules\es-abstract\2015\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2019\OrdinaryCreateFromConstructor.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
var IsArray = require('./IsArray');
var ObjectCreate = require('./ObjectCreate');
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
var slots = arguments.length < 3 ? [] : arguments[2];
if (!IsArray(slots)) {
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
}
return ObjectCreate(proto, slots);
};node_modules\es-abstract\2015\ObjectDefineProperties.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2025\ObjectDefineProperties.js (Line 1:1 - Line 37:2)
'use strict';
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var Get = require('./Get');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToObject = require('./ToObject');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
var forEach = require('../helpers/forEach');
var OwnPropertyKeys = require('own-keys');
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
/** @type {<T extends Record<PropertyKey, unknown> = {}>(O: T, Properties: object) => T} */
module.exports = function ObjectDefineProperties(O, Properties) {
var props = ToObject(Properties); // step 1
var keys = OwnPropertyKeys(props); // step 2
/** @type {[string | symbol, import('../types').Descriptor][]} */
var descriptors = []; // step 3
forEach(keys, function (nextKey) { // step 4
var propDesc = OrdinaryGetOwnProperty(props, nextKey); // ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
var descObj = Get(props, nextKey); // step 4.b.i
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
descriptors[descriptors.length] = [nextKey, desc]; // step 4.b.iii
}
});
forEach(descriptors, function (pair) { // step 5
var P = pair[0]; // step 5.a
var desc = pair[1]; // step 5.b
DefinePropertyOrThrow(O, P, desc); // step 5.c
});
return O; // step 6
};node_modules\es-abstract\2015\ObjectCreate.js (Line 1:1 - Line 50:2), node_modules\es-abstract\2025\OrdinaryObjectCreate.js (Line 1:1 - Line 50:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/6.0/#sec-objectcreate
module.exports = function ObjectCreate(proto, internalSlotsList) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1
if (arguments.length >= 2 && !IsArray(slots)) {
throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array');
}
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (slots.length > 0) {
forEach(slots, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O; // step 6
};node_modules\es-abstract\2015\NewPromiseCapability.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\NewPromiseCapability.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsCallable = require('./IsCallable');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
module.exports = function NewPromiseCapability(C) {
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor'); // step 1
}
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
var promise = new C(function (resolve, reject) { // steps 4-5
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
}
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
}); // step 4-6
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
}
return {
'[[Promise]]': promise,
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
'[[Reject]]': resolvingFunctions['[[Reject]]']
}; // step 9
};node_modules\es-abstract\2015\MonthFromTime.js (Line 1:1 - Line 51:2), node_modules\es-abstract\5\MonthFromTime.js (Line 1:1 - Line 51:2)
'use strict';
var $RangeError = require('es-errors/range');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function MonthFromTime(t) {
var day = DayWithinYear(t);
if (0 <= day && day < 31) {
return 0;
}
var leap = InLeapYear(t);
if (31 <= day && day < (59 + leap)) {
return 1;
}
if ((59 + leap) <= day && day < (90 + leap)) {
return 2;
}
if ((90 + leap) <= day && day < (120 + leap)) {
return 3;
}
if ((120 + leap) <= day && day < (151 + leap)) {
return 4;
}
if ((151 + leap) <= day && day < (181 + leap)) {
return 5;
}
if ((181 + leap) <= day && day < (212 + leap)) {
return 6;
}
if ((212 + leap) <= day && day < (243 + leap)) {
return 7;
}
if ((243 + leap) <= day && day < (273 + leap)) {
return 8;
}
if ((273 + leap) <= day && day < (304 + leap)) {
return 9;
}
if ((304 + leap) <= day && day < (334 + leap)) {
return 10;
}
if ((334 + leap) <= day && day < (365 + leap)) {
return 11;
}
throw new $RangeError('Assertion failed: `day` is out of range');
};node_modules\es-abstract\2015\MinFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MinFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerMinute = timeConstants.msPerMinute;
var MinutesPerHour = timeConstants.MinutesPerHour;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function MinFromTime(t) {
return modulo(floor(t / msPerMinute), MinutesPerHour);
};node_modules\es-abstract\2015\MakeTime.js (Line 1:1 - Line 24:2), node_modules\es-abstract\5\MakeTime.js (Line 1:1 - Line 24:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var timeConstants = require('../helpers/timeConstants');
var msPerSecond = timeConstants.msPerSecond;
var msPerMinute = timeConstants.msPerMinute;
var msPerHour = timeConstants.msPerHour;
var ToInteger = require('./ToInteger');
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
module.exports = function MakeTime(hour, min, sec, ms) {
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
return NaN;
}
var h = ToInteger(hour);
var m = ToInteger(min);
var s = ToInteger(sec);
var milli = ToInteger(ms);
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
return t;
};node_modules\es-abstract\2015\MakeDay.js (Line 1:1 - Line 33:2), node_modules\es-abstract\5\MakeDay.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};node_modules\es-abstract\2015\MakeDate.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\MakeDate.js (Line 1:1 - Line 14:2)
'use strict';
var $isFinite = require('math-intrinsics/isFinite');
var msPerDay = require('../helpers/timeConstants').msPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
module.exports = function MakeDate(day, time) {
if (!$isFinite(day) || !$isFinite(time)) {
return NaN;
}
return (day * msPerDay) + time;
};node_modules\es-abstract\2015\IteratorValue.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2025\IteratorValue.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
module.exports = function IteratorValue(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return Get(iterResult, 'value');
};node_modules\es-abstract\2015\IteratorStep.js (Line 1:1 - Line 12:2), node_modules\es-abstract\2022\IteratorStep.js (Line 1:1 - Line 12:2)
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};node_modules\es-abstract\2015\IteratorNext.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2022\IteratorNext.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Invoke = require('./Invoke');
// https://262.ecma-international.org/6.0/#sec-iteratornext
module.exports = function IteratorNext(iterator, value) {
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
if (!isObject(result)) {
throw new $TypeError('iterator next must return an object');
}
return result;
};node_modules\es-abstract\2015\IteratorComplete.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\IteratorComplete.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (!isObject(iterResult)) {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};node_modules\es-abstract\2015\IteratorClose.js (Line 1:1 - Line 49:2), node_modules\es-abstract\2025\IteratorClose.js (Line 1:1 - Line 49:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};node_modules\es-abstract\2015\IsWordChar.js (Line 1:1 - Line 37:2), node_modules\es-abstract\2016\IsWordChar.js (Line 1:1 - Line 37:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var every = require('../helpers/every');
var regexTester = require('safe-regex-test');
var isChar = function isChar(c) {
return typeof c === 'string' && c.length === 1;
};
var isWordCharacter = regexTester(/^[a-zA-Z0-9_]$/);
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input) {
if (!IsInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!IsInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
return isWordCharacter(c); // steps 3-4
};node_modules\es-abstract\2015\IsRegExp.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\IsRegExp.js (Line 1:1 - Line 25:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $match = GetIntrinsic('%Symbol.match%', true);
var hasRegExpMatcher = require('is-regex');
var isObject = require('es-object-atoms/isObject');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-isregexp
module.exports = function IsRegExp(argument) {
if (!isObject(argument)) {
return false;
}
if ($match) {
var isRegExp = argument[$match];
if (typeof isRegExp !== 'undefined') {
return ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
};node_modules\es-abstract\2015\IsPromise.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\IsPromise.js (Line 1:1 - Line 24:2)
'use strict';
var callBound = require('call-bound');
var $PromiseThen = callBound('Promise.prototype.then', true);
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-ispromise
module.exports = function IsPromise(x) {
if (!isObject(x)) {
return false;
}
if (!$PromiseThen) { // Promises are not supported
return false;
}
try {
$PromiseThen(x); // throws if not a promise
} catch (e) {
return false;
}
return true;
};node_modules\es-abstract\2015\IsGenericDescriptor.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsGenericDescriptor.js (Line 1:1 - Line 26:2)
'use strict';
var $TypeError = require('es-errors/type');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
module.exports = function IsGenericDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
return true;
}
return false;
};node_modules\es-abstract\2015\IsExtensible.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\IsExtensible.js (Line 1:1 - Line 18:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
var isPrimitive = require('../helpers/isPrimitive');
// https://262.ecma-international.org/6.0/#sec-isextensible-o
module.exports = $preventExtensions
? function IsExtensible(obj) {
return !isPrimitive(obj) && $isExtensible(obj);
}
: function IsExtensible(obj) {
return !isPrimitive(obj);
};node_modules\es-abstract\2015\IsDetachedBuffer.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2016\IsDetachedBuffer.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var isArrayBuffer = require('is-array-buffer');
var availableTypedArrays = require('available-typed-arrays')();
// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ($byteLength(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};node_modules\es-abstract\2015\IsDataDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsDataDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};node_modules\es-abstract\2015\IsConstructor.js (Line 1:1 - Line 40:2), node_modules\es-abstract\2025\IsConstructor.js (Line 1:1 - Line 40:2)
'use strict';
var GetIntrinsic = require('../GetIntrinsic.js');
var $construct = GetIntrinsic('%Reflect.construct%', true);
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
try {
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
} catch (e) {
// Accessor properties aren't supported
DefinePropertyOrThrow = null;
}
// https://262.ecma-international.org/6.0/#sec-isconstructor
if (DefinePropertyOrThrow && $construct) {
var isConstructorMarker = {};
var badArrayLike = {};
DefinePropertyOrThrow(badArrayLike, 'length', {
'[[Get]]': function () {
throw isConstructorMarker;
},
'[[Enumerable]]': true
});
module.exports = function IsConstructor(argument) {
try {
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
$construct(argument, badArrayLike);
} catch (err) {
return err === isConstructorMarker;
}
};
} else {
module.exports = function IsConstructor(argument) {
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
return typeof argument === 'function' && !!argument.prototype;
};
}node_modules\es-abstract\2015\IsConcatSpreadable.js (Line 1:1 - Line 26:2), node_modules\es-abstract\2025\IsConcatSpreadable.js (Line 1:1 - Line 26:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToBoolean = require('./ToBoolean');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
module.exports = function IsConcatSpreadable(O) {
if (!isObject(O)) {
return false;
}
if ($isConcatSpreadable) {
var spreadable = Get(O, $isConcatSpreadable);
if (typeof spreadable !== 'undefined') {
return ToBoolean(spreadable);
}
}
return IsArray(O);
};node_modules\es-abstract\2015\IsAccessorDescriptor.js (Line 1:1 - Line 25:2), node_modules\es-abstract\5\IsAccessorDescriptor.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.1
module.exports = function IsAccessorDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
return false;
}
return true;
};node_modules\es-abstract\2015\Invoke.js (Line 1:1 - Line 22:2), node_modules\es-abstract\2025\Invoke.js (Line 1:1 - Line 22:2)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsArray = require('./IsArray');
var GetV = require('./GetV');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-invoke
module.exports = function Invoke(O, P) {
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P must be a Property Key');
}
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
var func = GetV(O, P);
return Call(func, O, argumentsList);
};node_modules\es-abstract\2015\InternalizeJSONProperty.js (Line 1:1 - Line 68:2), node_modules\es-abstract\2016\InternalizeJSONProperty.js (Line 1:1 - Line 68:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnNames = require('./EnumerableOwnNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/6.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 3
var isArray = IsArray(val); // step 3.a
if (isArray) { // step 3.c
var I = 0; // step 3.c.i
var len = ToLength(Get(val, 'length')); // step 3.b.ii
while (I < len) { // step 3.b.iv
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 3.b.iv.1
if (typeof newElement === 'undefined') { // step 3.b.iv.3
delete val[ToString(I)]; // step 3.b.iv.3.a
} else { // step 3.b.iv.4
CreateDataProperty(val, ToString(I), newElement); // step 3.b.iv.4.a
}
I += 1; // step 3.b.iv.6
}
} else {
var keys = EnumerableOwnNames(val); // step 3.d.i
forEach(keys, function (P) { // step 3.d.iii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 3.d.iii.1
if (typeof newElement === 'undefined') { // step 3.d.iii.3
delete val[P]; // step 3.d.iii.3.a
} else { // step 3.d.iii.4
CreateDataProperty(val, P, newElement); // step 3.d.iii.4.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 4
};node_modules\es-abstract\2015\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2), node_modules\es-abstract\2019\IntegerIndexedElementSet.js (Line 1:1 - Line 62:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToNumber = require('./ToNumber');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/6.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 12
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020'); // step 2
}
var numValue = ToNumber(value); // step 3
var buffer = typedArrayBuffer(O); // step 5
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 6
}
if (!IsInteger(index) || isNegativeZero(index)) {
return false; // steps 7 - 8
}
var length = typedArrayLength(O); // step 9
if (index < 0 || index >= length) {
return false; // step 10
}
var offset = typedArrayByteOffset(O); // step 11
var elementType = tableTAO.name['$' + arrayTypeName]; // step 15
var elementSize = tableTAO.size['$' + elementType]; // step 13
var indexedPosition = (index * elementSize) + offset; // step 14
SetValueInBuffer(buffer, indexedPosition, elementType, numValue); // step 16
return true; // step 17
};node_modules\es-abstract\2015\IntegerIndexedElementGet.js (Line 1:1 - Line 57:2), node_modules\es-abstract\2016\IntegerIndexedElementGet.js (Line 1:1 - Line 57:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var typedArrayLength = require('typed-array-length');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/6.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 10
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 4
}
if (!IsInteger(index) || isNegativeZero(index)) {
return void undefined; // steps 5 - 6
}
var length = typedArrayLength(O); // step 7
if (index < 0 || index >= length) {
return void undefined; // step 8
}
var offset = typedArrayByteOffset(O); // step 9
var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
var elementSize = tableTAO.size['$' + elementType]; // step 11
var indexedPosition = (index * elementSize) + offset; // step 12
return GetValueFromBuffer(buffer, indexedPosition, elementType); // step 14
};node_modules\es-abstract\2015\InstanceofOperator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\InstanceofOperator.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
var ToBoolean = require('./ToBoolean');
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
module.exports = function InstanceofOperator(O, C) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
if (typeof instOfHandler !== 'undefined') {
return ToBoolean(Call(instOfHandler, C, [O]));
}
if (!IsCallable(C)) {
throw new $TypeError('`C` is not Callable');
}
return OrdinaryHasInstance(C, O);
};node_modules\es-abstract\2015\InLeapYear.js (Line 1:1 - Line 19:2), node_modules\es-abstract\5\InLeapYear.js (Line 1:1 - Line 19:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DaysInYear = require('./DaysInYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function InLeapYear(t) {
var days = DaysInYear(YearFromTime(t));
if (days === 365) {
return 0;
}
if (days === 366) {
return 1;
}
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
};node_modules\es-abstract\2015\HourFromTime.js (Line 1:1 - Line 14:2), node_modules\es-abstract\5\HourFromTime.js (Line 1:1 - Line 14:2)
'use strict';
var floor = require('./floor');
var modulo = require('./modulo');
var timeConstants = require('../helpers/timeConstants');
var msPerHour = timeConstants.msPerHour;
var HoursPerDay = timeConstants.HoursPerDay;
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
module.exports = function HourFromTime(t) {
return modulo(floor(t / msPerHour), HoursPerDay);
};node_modules\es-abstract\2015\HasProperty.js (Line 1:1 - Line 18:2), node_modules\es-abstract\2025\HasProperty.js (Line 1:1 - Line 18:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};node_modules\es-abstract\2015\HasOwnProperty.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\HasOwnProperty.js (Line 1:1 - Line 20:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-hasownproperty
module.exports = function HasOwnProperty(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return hasOwn(O, P);
};node_modules\es-abstract\2015\GetValueFromBuffer.js (Line 1:1 - Line 86:2), node_modules\es-abstract\2016\GetValueFromBuffer.js (Line 1:1 - Line 86:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var defaultEndianness = require('../helpers/defaultEndianness');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var isArrayBuffer = require('is-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var isUnsignedElementType = function isUnsignedElementType(type) { return $charAt(type, 0) === 'U'; };
// https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type) {
if (!isArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string') {
throw new $TypeError('Assertion failed: `type` must be a string');
}
if (arguments.length > 3 && typeof arguments[3] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
// 6. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
var rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 3 ? arguments[3] : defaultEndianness === 'little'; // step 7
if (!isLittleEndian) {
$reverse(rawValue); // step 8
}
var bytes = $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize);
if (type === 'Float32') { // step 3
return bytesAsFloat32(bytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(bytes);
}
return bytesAsInteger(bytes, elementSize, isUnsignedElementType(type), false);
};node_modules\es-abstract\2015\GetV.js (Line 1:1 - Line 23:2), node_modules\es-abstract\2025\GetV.js (Line 1:1 - Line 23:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
// var ToObject = require('./ToObject');
// https://262.ecma-international.org/6.0/#sec-getv
module.exports = function GetV(V, P) {
// 7.3.2.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.2.2-3
// var O = ToObject(V);
// 7.3.2.4
return V[P];
};node_modules\es-abstract\2015\GetSubstitution.js (Line 2:1 - Line 98:2), node_modules\es-abstract\2017\GetSubstitution.js (Line 2:1 - Line 98:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $parseInt = GetIntrinsic('%parseInt%');
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var regexTester = require('safe-regex-test');
var callBound = require('call-bound');
var every = require('../helpers/every');
var isDigit = regexTester(/^[0-9]$/);
var $charAt = callBound('String.prototype.charAt');
var $strSlice = callBound('String.prototype.slice');
var IsArray = require('./IsArray');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
// https://262.ecma-international.org/6.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};node_modules\es-abstract\2015\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2), node_modules\es-abstract\2025\GetPrototypeFromConstructor.js (Line 1:1 - Line 33:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Function = GetIntrinsic('%Function%');
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var Get = require('./Get');
var IsConstructor = require('./IsConstructor');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
if (!isObject(intrinsic)) {
throw new $TypeError('intrinsicDefaultProto must be an object');
}
if (!IsConstructor(constructor)) {
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
}
var proto = Get(constructor, 'prototype');
if (!isObject(proto)) {
if (!(constructor instanceof $Function)) {
// ignore other realms, for now
throw new $SyntaxError('cross-realm constructors not currently supported');
}
proto = intrinsic;
}
return proto;
};node_modules\es-abstract\2015\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2025\GetOwnPropertyKeys.js (Line 1:1 - Line 30:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var hasSymbols = require('has-symbols')();
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
module.exports = function GetOwnPropertyKeys(O, Type) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (Type === 'Symbol') {
return $gOPS ? $gOPS(O) : [];
}
if (Type === 'String') {
if (!$gOPN) {
return keys(O);
}
return $gOPN(O);
}
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
};node_modules\es-abstract\2015\GetMethod.js (Line 1:1 - Line 34:2), node_modules\es-abstract\2025\GetMethod.js (Line 1:1 - Line 34:2)
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};node_modules\es-abstract\2015\GetIterator.js (Line 1:1 - Line 30:2), node_modules\es-abstract\2019\GetIterator.js (Line 1:1 - Line 30:2)
'use strict';
var $TypeError = require('es-errors/type');
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var isObject = require('es-object-atoms/isObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/6.0/#sec-getiterator
module.exports = function GetIterator(obj, method) {
var actualMethod = method;
if (arguments.length < 2) {
actualMethod = getIteratorMethod(ES, obj);
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
};node_modules\es-abstract\2015\Get.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2025\Get.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isPropertyKey = require('../helpers/isPropertyKey');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-get-o-p
module.exports = function Get(O, P) {
// 7.3.1.1
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
// 7.3.1.2
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
}
// 7.3.1.3
return O[P];
};node_modules\es-abstract\2015\FromPropertyDescriptor.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2025\FromPropertyDescriptor.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};node_modules\es-abstract\2015\EnumerableOwnNames.js (Line 1:1 - Line 16:2), node_modules\es-abstract\2016\EnumerableOwnNames.js (Line 1:1 - Line 16:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var keys = require('object-keys');
// https://262.ecma-international.org/6.0/#sec-enumerableownnames
module.exports = function EnumerableOwnNames(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
return keys(O);
};node_modules\es-abstract\2015\DetachArrayBuffer.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2016\DetachArrayBuffer.js (Line 1:1 - Line 46:2)
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isArrayBuffer = require('is-array-buffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel; // node 11.7+
} catch (e) { /**/ }
// https://262.ecma-international.org/6.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};node_modules\es-abstract\2015\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\DeletePropertyOrThrow.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
module.exports = function DeletePropertyOrThrow(O, P) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// eslint-disable-next-line no-param-reassign
var success = delete O[P];
if (!success) {
throw new $TypeError('Attempt to delete property failed.');
}
return success;
};node_modules\es-abstract\2015\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2), node_modules\es-abstract\2025\DefinePropertyOrThrow.js (Line 1:1 - Line 39:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
module.exports = function DefinePropertyOrThrow(O, P, desc) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
}
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
};node_modules\es-abstract\2015\DayWithinYear.js (Line 1:1 - Line 11:2), node_modules\es-abstract\5\DayWithinYear.js (Line 1:1 - Line 11:2)
'use strict';
var Day = require('./Day');
var DayFromYear = require('./DayFromYear');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
module.exports = function DayWithinYear(t) {
return Day(t) - DayFromYear(YearFromTime(t));
};node_modules\es-abstract\2015\DaysInYear.js (Line 1:1 - Line 18:2), node_modules\es-abstract\5\DaysInYear.js (Line 1:1 - Line 18:2)
'use strict';
var modulo = require('./modulo');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DaysInYear(y) {
if (modulo(y, 4) !== 0) {
return 365;
}
if (modulo(y, 100) !== 0) {
return 366;
}
if (modulo(y, 400) !== 0) {
return 365;
}
return 366;
};node_modules\es-abstract\2015\DayFromYear.js (Line 1:1 - Line 9:2), node_modules\es-abstract\5\DayFromYear.js (Line 1:1 - Line 9:2)
'use strict';
var floor = require('./floor');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function DayFromYear(y) {
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
};node_modules\es-abstract\2015\DateFromTime.js (Line 1:1 - Line 52:2), node_modules\es-abstract\5\DateFromTime.js (Line 1:1 - Line 52:2)
'use strict';
var $EvalError = require('es-errors/eval');
var DayWithinYear = require('./DayWithinYear');
var InLeapYear = require('./InLeapYear');
var MonthFromTime = require('./MonthFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
module.exports = function DateFromTime(t) {
var m = MonthFromTime(t);
var d = DayWithinYear(t);
if (m === 0) {
return d + 1;
}
if (m === 1) {
return d - 30;
}
var leap = InLeapYear(t);
if (m === 2) {
return d - 58 - leap;
}
if (m === 3) {
return d - 89 - leap;
}
if (m === 4) {
return d - 119 - leap;
}
if (m === 5) {
return d - 150 - leap;
}
if (m === 6) {
return d - 180 - leap;
}
if (m === 7) {
return d - 211 - leap;
}
if (m === 8) {
return d - 242 - leap;
}
if (m === 9) {
return d - 272 - leap;
}
if (m === 10) {
return d - 303 - leap;
}
if (m === 11) {
return d - 333 - leap;
}
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
};node_modules\es-abstract\2015\CreateMethodProperty.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2023\CreateMethodProperty.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};node_modules\es-abstract\2015\CreateListFromArrayLike.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2024\CreateListFromArrayLike.js (Line 1:1 - Line 44:2)
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var Type = require('./Type');
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
module.exports = function CreateListFromArrayLike(obj) {
var elementTypes = arguments.length > 1
? arguments[1]
: defaultElementTypes;
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
if (!IsArray(elementTypes)) {
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
}
var len = ToLength(Get(obj, 'length'));
var list = [];
var index = 0;
while (index < len) {
var indexName = ToString(index);
var next = Get(obj, indexName);
var nextType = Type(next);
if ($indexOf(elementTypes, nextType) < 0) {
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
}
list[list.length] = next;
index += 1;
}
return list;
};node_modules\es-abstract\2015\CreateIterResultObject.js (Line 1:1 - Line 15:2), node_modules\es-abstract\2024\CreateIterResultObject.js (Line 1:1 - Line 15:2)
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
module.exports = function CreateIterResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};node_modules\es-abstract\2015\CreateHTML.js (Line 1:1 - Line 27:2), node_modules\es-abstract\2025\CreateHTML.js (Line 1:1 - Line 27:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $replace = callBound('String.prototype.replace');
var RequireObjectCoercible = require('./RequireObjectCoercible');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-createhtml
module.exports = function CreateHTML(string, tag, attribute, value) {
if (typeof tag !== 'string' || typeof attribute !== 'string') {
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
}
var str = RequireObjectCoercible(string);
var S = ToString(str);
var p1 = '<' + tag;
if (attribute !== '') {
var V = ToString(value);
var escapedV = $replace(V, /\x22/g, '"');
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
}
return p1 + '>' + S + '</' + tag + '>';
};node_modules\es-abstract\2015\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2), node_modules\es-abstract\2022\CreateDataPropertyOrThrow.js (Line 1:1 - Line 24:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var CreateDataProperty = require('./CreateDataProperty');
var isPropertyKey = require('../helpers/isPropertyKey');
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var success = CreateDataProperty(O, P, V);
if (!success) {
throw new $TypeError('unable to create data property');
}
return success;
};node_modules\es-abstract\2015\CreateDataProperty.js (Line 1:1 - Line 25:2), node_modules\es-abstract\2025\CreateDataProperty.js (Line 1:1 - Line 25:2)
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var isPropertyKey = require('../helpers/isPropertyKey');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
// https://262.ecma-international.org/6.0/#sec-createdataproperty
module.exports = function CreateDataProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Value]]': V,
'[[Writable]]': true
};
return OrdinaryDefineOwnProperty(O, P, newDesc);
};node_modules\es-abstract\2015\CompletionRecord.js (Line 9:1 - Line 16:11), node_modules\es-abstract\2025\CompletionRecord.js (Line 9:1 - Line 16:11)
var CompletionRecord = function CompletionRecord(type, value) {
if (!(this instanceof CompletionRecord)) {
return new CompletionRecord(type, value);
}
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
}
SLOT.set(this, '[[type]]'node_modules\es-abstract\2015\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2), node_modules\es-abstract\2025\CompletePropertyDescriptor.js (Line 1:1 - Line 43:2)
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;
};node_modules\es-abstract\2015\CharacterRange.js (Line 1:1 - Line 53:2), node_modules\es-abstract\2025\CharacterRange.js (Line 1:1 - Line 47:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var $TypeError = require('es-errors/type');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var CharSet = require('../helpers/CharSet').CharSet;
module.exports = function CharacterRange(A, B) {
var a;
var b;
if (A instanceof CharSet || B instanceof CharSet) {
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
}
A.yield(function (c) {
if (typeof a !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet A has more than one character');
}
a = c;
});
B.yield(function (c) {
if (typeof b !== 'undefined') {
throw new $TypeError('Assertion failed: CharSet B has more than one character');
}
b = c;
});
} else {
if (A.length !== 1 || B.length !== 1) {
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
}
a = A[0];
b = B[0];
}
var i = $charCodeAt(a, 0);
var j = $charCodeAt(b, 0);
if (!(i <= j)) {
throw new $TypeError('Assertion failed: i is not <= j');
}
var arr = [];
for (var k = i; k <= j; k += 1) {
arr[arr.length] = $fromCharCode(k);
}
return arr;
};node_modules\es-abstract\2015\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2), node_modules\es-abstract\2025\CanonicalNumericIndexString.js (Line 1:1 - Line 19:2)
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
module.exports = function CanonicalNumericIndexString(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` must be a String');
}
if (argument === '-0') { return -0; }
var n = ToNumber(argument);
if (SameValue(ToString(n), argument)) { return n; }
return void 0;
};node_modules\es-abstract\2015\Canonicalize.js (Line 1:1 - Line 51:2), node_modules\es-abstract\2022\Canonicalize.js (Line 1:1 - Line 38:2)
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
}
if (!IgnoreCase) {
return ch; // step 1
}
if (Unicode) { // step 2
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 2.b
}
var u = $toUpperCase(ch); // step 2
if (u.length !== 1) {
return ch; // step 3
}
var cu = u; // step 4
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 5
}
return cu;
};node_modules\es-abstract\2015\Call.js (Line 1:1 - Line 20:2), node_modules\es-abstract\2025\Call.js (Line 1:1 - Line 20:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var IsArray = require('./IsArray');
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
// https://262.ecma-international.org/6.0/#sec-call
module.exports = function Call(F, V) {
var argumentsList = arguments.length > 2 ? arguments[2] : [];
if (!IsArray(argumentsList)) {
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
}
return $apply(F, V, argumentsList);
};node_modules\es-abstract\2015\ArraySpeciesCreate.js (Line 1:1 - Line 45:2), node_modules\es-abstract\2020\ArraySpeciesCreate.js (Line 1:1 - Line 45:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};node_modules\es-abstract\2015\ArraySetLength.js (Line 1:1 - Line 77:2), node_modules\es-abstract\2025\ArraySetLength.js (Line 1:1 - Line 77:2)
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var assign = require('object.assign');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var IsArray = require('./IsArray');
var IsDataDescriptor = require('./IsDataDescriptor');
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/6.0/#sec-arraysetlength
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function ArraySetLength(A, Desc) {
if (!IsArray(A)) {
throw new $TypeError('Assertion failed: A must be an Array');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (!('[[Value]]' in Desc)) {
return OrdinaryDefineOwnProperty(A, 'length', Desc);
}
var newLenDesc = assign({}, Desc);
var newLen = ToUint32(Desc['[[Value]]']);
var numberLen = ToNumber(Desc['[[Value]]']);
if (newLen !== numberLen) {
throw new $RangeError('Invalid array length');
}
newLenDesc['[[Value]]'] = newLen;
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
if (!IsDataDescriptor(oldLenDesc)) {
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
}
var oldLen = oldLenDesc['[[Value]]'];
if (newLen >= oldLen) {
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
}
if (!oldLenDesc['[[Writable]]']) {
return false;
}
var newWritable;
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
newWritable = true;
} else {
newWritable = false;
newLenDesc['[[Writable]]'] = true;
}
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
if (!succeeded) {
return false;
}
while (newLen < oldLen) {
oldLen -= 1;
// eslint-disable-next-line no-param-reassign
var deleteSucceeded = delete A[ToString(oldLen)];
if (!deleteSucceeded) {
newLenDesc['[[Value]]'] = oldLen + 1;
if (!newWritable) {
newLenDesc['[[Writable]]'] = false;
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
return false;
}
}
}
if (!newWritable) {
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
}
return true;
};node_modules\es-abstract\2015\ArrayCreate.js (Line 1:1 - Line 42:2), node_modules\es-abstract\2025\ArrayCreate.js (Line 1:1 - Line 42:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
var $setProto = require('set-proto');
// https://262.ecma-international.org/6.0/#sec-arraycreate
module.exports = function ArrayCreate(length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
}
if (length > MAX_ARRAY_LENGTH) {
throw new $RangeError('length is greater than (2**32 - 1)');
}
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
var A = []; // steps 5 - 7, and 9
if (proto !== $ArrayPrototype) { // step 8
if (!$setProto) {
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
}
$setProto(A, proto);
}
if (length !== 0) { // bypasses the need for step 2
A.length = length;
}
/* step 10, the above as a shortcut for the below
OrdinaryDefineOwnProperty(A, 'length', {
'[[Configurable]]': false,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': true
});
*/
return A;
};node_modules\es-abstract\2015\AdvanceStringIndex.js (Line 1:1 - Line 44:2), node_modules\es-abstract\2019\AdvanceStringIndex.js (Line 1:1 - Line 44:2)
'use strict';
var isInteger = require('math-intrinsics/isInteger');
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $TypeError = require('es-errors/type');
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
// https://262.ecma-international.org/6.0/#sec-advancestringindex
module.exports = function AdvanceStringIndex(S, index, unicode) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
}
if (typeof unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
}
if (!unicode) {
return index + 1;
}
var length = S.length;
if ((index + 1) >= length) {
return index + 1;
}
var first = $charCodeAt(S, index);
if (!isLeadingSurrogate(first)) {
return index + 1;
}
var second = $charCodeAt(S, index + 1);
if (!isTrailingSurrogate(second)) {
return index + 1;
}
return index + 2;
};node_modules\es-abstract\2015\AbstractRelationalComparison.js (Line 1:1 - Line 62:2), node_modules\es-abstract\5\AbstractRelationalComparison.js (Line 1:1 - Line 62:2)
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var $isFinite = require('math-intrinsics/isFinite');
var isPrefixOf = require('../helpers/isPrefixOf');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/5.1/#sec-11.8.5
// eslint-disable-next-line max-statements
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
var bothStrings = typeof px === 'string' && typeof py === 'string';
if (!bothStrings) {
var nx = ToNumber(px);
var ny = ToNumber(py);
if ($isNaN(nx) || $isNaN(ny)) {
return undefined;
}
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
return false;
}
if (nx === Infinity) {
return false;
}
if (ny === Infinity) {
return true;
}
if (ny === -Infinity) {
return false;
}
if (nx === -Infinity) {
return true;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
}
if (isPrefixOf(py, px)) {
return false;
}
if (isPrefixOf(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f
};node_modules\es-abstract\2015\AbstractEqualityComparison.js (Line 1:1 - Line 38:2), node_modules\es-abstract\2019\AbstractEqualityComparison.js (Line 1:1 - Line 38:2)
'use strict';
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');
var isSameType = require('../helpers/isSameType');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
module.exports = function AbstractEqualityComparison(x, y) {
if (isSameType(x, y)) {
return x === y; // ES6+ specified this shortcut anyways.
}
if (x == null && y == null) {
return true;
}
if (typeof x === 'number' && typeof y === 'string') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if (typeof x === 'string' && typeof y === 'number') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof x === 'boolean') {
return AbstractEqualityComparison(ToNumber(x), y);
}
if (typeof y === 'boolean') {
return AbstractEqualityComparison(x, ToNumber(y));
}
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol') && isObject(y)) {
return AbstractEqualityComparison(x, ToPrimitive(y));
}
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol')) {
return AbstractEqualityComparison(ToPrimitive(x), y);
}
return false;
};node_modules\define-data-property\test\index.js (Line 244:5 - Line 263:50), node_modules\define-data-property\test\index.js (Line 207:5 - Line 226:40)
nonEnum: {
configurable: true,
enumerable: false,
value: null,
writable: true
},
nonWrit: {
configurable: true,
enumerable: true,
value: null,
writable: false
},
nonConf: {
configurable: false,
enumerable: true,
value: null,
writable: true
}
},
'obj initially has expected property descriptors'node_modules\debug\src\node.js (Line 32:2 - Line 115:83), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 29:2 - Line 34:2)
supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.node_modules\debug\src\node.js (Line 136:2 - Line 168:6), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 51:2 - Line 81:4)
val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ?
Boolean(exports.inspectOpts.colors) :
tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
constnode_modules\debug\src\node.js (Line 176:12 - Line 191:4), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 89:10 - Line 104:4)
);
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
*/node_modules\debug\src\node.js (Line 194:5 - Line 234:6), node_modules\sockjs-client\node_modules\debug\src\node.js (Line 108:10 - Line 148:4)
) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
constnode_modules\debug\src\common.js (Line 2:1 - Line 15:12), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 3:1 - Line 15:7)
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
createDebugnode_modules\debug\src\common.js (Line 76:2 - Line 90:4), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 79:2 - Line 92:4)
ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
}
// Apply any `formatters` transformations
letnode_modules\debug\src\common.js (Line 99:2 - Line 112:6), node_modules\sockjs-client\node_modules\debug\src\common.js (Line 103:2 - Line 114:4)
val = args[index];
match = formatter.call(self, val);
// Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
});
// Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
constnode_modules\debug\src\browser.js (Line 21:2 - Line 128:4), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 15:13 - Line 41:57)
();
/**
* Colors.
*/
exports.colors = [
'#0000CC',
'#0000FF',
'#0033CC',
'#0033FF',
'#0066CC',
'#0066FF',
'#0099CC',
'#0099FF',
'#00CC00',
'#00CC33',
'#00CC66',
'#00CC99',
'#00CCCC',
'#00CCFF',
'#3300CC',
'#3300FF',
'#3333CC',
'#3333FF',
'#3366CC',
'#3366FF',
'#3399CC',
'#3399FF',
'#33CC00',
'#33CC33',
'#33CC66',
'#33CC99',
'#33CCCC',
'#33CCFF',
'#6600CC',
'#6600FF',
'#6633CC',
'#6633FF',
'#66CC00',
'#66CC33',
'#9900CC',
'#9900FF',
'#9933CC',
'#9933FF',
'#99CC00',
'#99CC33',
'#CC0000',
'#CC0033',
'#CC0066',
'#CC0099',
'#CC00CC',
'#CC00FF',
'#CC3300',
'#CC3333',
'#CC3366',
'#CC3399',
'#CC33CC',
'#CC33FF',
'#CC6600',
'#CC6633',
'#CC9900',
'#CC9933',
'#CCCC00',
'#CCCC33',
'#FF0000',
'#FF0033',
'#FF0066',
'#FF0099',
'#FF00CC',
'#FF00FF',
'#FF3300',
'#FF3333',
'#FF3366',
'#FF3399',
'#FF33CC',
'#FF33FF',
'#FF6600',
'#FF6633',
'#FF9900',
'#FF9933',
'#FFCC00',
'#FFCC33'
];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
}
// Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
letnode_modules\debug\src\browser.js (Line 140:2 - Line 161:6), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 49:21 - Line 65:4)
);
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') +
this.namespace +
(this.useColors ? ' %c' : ' ') +
args[0] +
(this.useColors ? '%c ' : ' ') +
'+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
constnode_modules\debug\src\browser.js (Line 194:1 - Line 220:4), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 102:1 - Line 130:4)
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
letnode_modules\debug\src\browser.js (Line 228:2 - Line 260:6), node_modules\sockjs-client\node_modules\debug\src\browser.js (Line 136:3 - Line 168:4)
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
constnode_modules\data-view-byte-length\test\index.js (Line 16:19 - Line 22:2), node_modules\data-view-byte-offset\test\index.js (Line 16:19 - Line 22:2)
(nonDV); }, TypeError, inspect(nonDV) + ' is not a DataView');
}
);
t.test('DataView', { skip: typeof DataView !== 'function' }, function (st) {
var ab = new ArrayBuffer(42);
var dv = new DataView(ab)node_modules\call-bind\test\index.js (Line 1:1 - Line 14:4), node_modules\call-bind-apply-helpers\test\index.js (Line 1:1 - Line 11:5)
'use strict';
var callBind = require('../');
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var inspect = require('object-inspect');
var v = require('es-value-fixtures');
var test = require('tape');
/*
* older engines have length nonconfigurable
* in io.js v3, it is configurable except on bound functions, hence the .bind()
*/node_modules\call-bind\test\callBound.js (Line 7:1 - Line 26:22), node_modules\call-bound\test\index.js (Line 9:1 - Line 28:4)
test('callBound', function (t) {
// static primitive
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
// static non-function object
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
// static function
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
// prototype primitive
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
// prototype functionnode_modules\call-bind\test\callBound.js (Line 38:3 - Line 54:2), node_modules\call-bound\test\index.js (Line 45:3 - Line 61:2)
function () { callBound('does not exist', true); },
SyntaxError,
'allowMissing arg still throws for unknown intrinsic'
);
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
st['throws'](
function () { callBound('WeakRef'); },
TypeError,
'real but absent intrinsic throws'
);
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
st.end();
});
t.end();
});node_modules\axobject-query\lib\AXObjectsMap.js (Line 131:27 - Line 137:9), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 8:28 - Line 17:4)
));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
functionnode_modules\axobject-query\lib\AXObjectRoleMap.js (Line 8:17 - Line 17:21), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 8:28 - Line 17:17)
));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var AXObjectRoleElementsnode_modules\axobject-query\lib\AXObjectRoleMap.js (Line 17:2 - Line 28:7), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 17:2 - Line 28:7)
= [];
var _iterator = _createForOfIteratorHelper(_AXObjectsMap.default.entries()),
_step;
try {
var _loop = function _loop() {
var _step$value = _slicedToArray(_step.value, 2),
name = _step$value[0],
def = _step$value[1];
var relatedConcepts = def.relatedConcepts;
if (Array.isArray(relatedConcepts)) {
relatedConcepts.forEach(function (relation) {
if (relation.module === 'ARIA'node_modules\axobject-query\lib\AXObjectRoleMap.js (Line 41:11 - Line 54:4), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 55:11 - Line 68:9)
}
}
});
}
};
for (_iterator.s(); !(_step = _iterator.n()).done;) {
_loop();
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
varnode_modules\axobject-query\lib\AXObjectElementMap.js (Line 1:1 - Line 17:17), node_modules\axobject-query\lib\AXObjectRoleMap.js (Line 1:1 - Line 17:17)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
var _AXObjectsMap = _interopRequireDefault(require("./AXObjectsMap"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var AXObjectElementsnode_modules\axobject-query\lib\AXObjectElementMap.js (Line 17:2 - Line 30:2), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 17:2 - Line 30:3)
= [];
var _iterator = _createForOfIteratorHelper(_AXObjectsMap.default.entries()),
_step;
try {
var _loop = function _loop() {
var _step$value = _slicedToArray(_step.value, 2),
name = _step$value[0],
def = _step$value[1];
var relatedConcepts = def.relatedConcepts;
if (Array.isArray(relatedConcepts)) {
relatedConcepts.forEach(function (relation) {
if (relation.module === 'HTML') {
var concept = relation.concept;
if (concept)node_modules\axobject-query\lib\AXObjectElementMap.js (Line 40:17 - Line 54:19), node_modules\axobject-query\lib\AXObjectRoleMap.js (Line 40:21 - Line 54:16)
[index][1].push(concept);
}
}
});
}
};
for (_iterator.s(); !(_step = _iterator.n()).done;) {
_loop();
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
var AXObjectElementMapnode_modules\arraybuffer.prototype.slice\test\shimmed.js (Line 1:1 - Line 11:14), node_modules\string.prototype.trim\test\shimmed.js (Line 1:1 - Line 11:9)
'use strict';
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var hasStrictModenode_modules\arraybuffer.prototype.slice\test\implementation.js (Line 1:1 - Line 10:22), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 10:23)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('ArrayBuffer support'node_modules\array.prototype.tosorted\test\implementation.js (Line 7:20 - Line 21:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 6:2 - Line 20:2)
);
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\array.prototype.flatmap\test\implementation.js (Line 3:2 - Line 12:8), node_modules\string.prototype.trimstart\test\implementation.js (Line 3:2 - Line 12:15)
= require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { flatMapnode_modules\array.prototype.flat\test\shimmed.js (Line 7:16 - Line 14:5), node_modules\array.prototype.flatmap\test\shimmed.js (Line 7:12 - Line 14:8)
);
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = function f() {}.name === 'f';
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(Array.prototype.flatnode_modules\array.prototype.flat\test\shimmed.js (Line 21:31 - Line 28:5), node_modules\array.prototype.flatmap\test\shimmed.js (Line 21:34 - Line 28:8)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Array.prototype.flatnode_modules\array.prototype.flat\test\implementation.js (Line 3:2 - Line 12:5), node_modules\string.prototype.trimstart\test\implementation.js (Line 3:2 - Line 12:15)
= require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { flatnode_modules\array.prototype.findlastindex\test\tests.js (Line 163:2 - Line 172:21), node_modules\array.prototype.findlastindex\test\tests.js (Line 138:2 - Line 147:15)
), function (obj, index) {
actual[index] = obj;
count += 1;
return count === 4;
});
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.test('arraylike, context'node_modules\array.prototype.findlastindex\test\tests.js (Line 176:2 - Line 185:4), node_modules\array.prototype.findlastindex\test\tests.js (Line 151:2 - Line 160:5)
), function (obj, index) {
this.actual[index] = obj;
count += 1;
return count === 4;
}, context);
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.endnode_modules\array.prototype.findlastindex\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\array.prototype.findlast\test\tests.js (Line 1:1 - Line 31:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 1:1 - Line 31:14)
var hasStrictMode = require('has-strict-mode')();
var v = require('es-value-fixtures');
var forEach = require('for-each');
var inspect = require('object-inspect');
var maxSafeInteger = require('es-abstract/helpers/maxSafeInteger');
var global = require('globalthis')();
var trueThunk = function () { return true; };
var falseThunk = function () { return false; };
var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false.
var undefinedIfNoSparseBug = canDistinguishSparseFromUndefined ? undefined : { valueOf: function () { return 0; } };
var createArrayLikeFromArray = function createArrayLikeFromArray(arr) {
var o = {};
for (var i = 0; i < arr.length; i += 1) {
if (i in arr) {
o[i] = arr[i];
}
}
o.length = arr.length;
return o;
};
var getTestArr = function () {
var arr = [0, false, null, 'hej', true, undefinedIfNoSparseBug, 3, 2];
delete arr[6];
return arr;
};
module.exports = function (findLastnode_modules\array.prototype.findlast\test\tests.js (Line 45:9 - Line 60:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 45:14 - Line 60:14)
([], nonFunction); },
TypeError,
inspect(nonFunction) + ' is not a Function'
);
});
st.end();
});
t.test('passes the correct values to the callback', function (st) {
st.plan(5);
var expectedValue = {};
var arr = [expectedValue];
var context = {};
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 60:9 - Line 77:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 60:14 - Line 77:14)
(arr, function (value, key, list) {
st.equal(arguments.length, 3);
st.equal(value, expectedValue, 'first argument is the value');
st.equal(key, 0, 'second argument is the index');
st.equal(list, arr, 'third argument is the array being iterated');
st.equal(this, context, 'receiver is the expected value');
return true;
}, context);
st.end();
});
t.test('does not visit elements added to the array after it has begun', function (st) {
st.plan(2);
var arr = [1, 2, 3];
var i = 0;
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 77:9 - Line 83:39), node_modules\array.prototype.findlastindex\test\tests.js (Line 77:14 - Line 83:44)
(arr, function (a) {
i += 1;
arr.push(a + 3);
return i > 3;
});
st.deepEqual(arr, [1, 2, 3, 6, 5, 4], 'array has received 3 new elements');
st.equal(i, 3, 'findLast callback only called thrice'node_modules\array.prototype.findlast\test\tests.js (Line 91:9 - Line 103:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 91:14 - Line 103:14)
(arr, function (x, i) {
actual.push([i, x]);
delete arr[1];
return false;
});
st.deepEqual(actual, [[2, 3], [1, undefined], [0, 1]]);
st.end();
});
t.test('sets the right context when given none', function (st) {
var context;
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 107:9 - Line 120:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 107:14 - Line 120:14)
([1], function () {
'use strict';
context = this;
});
sst.equal(context, undefined, 'receiver is undefined in strict mode');
sst.end();
});
st.end();
});
t.test('empty array', function (st) {
st.equal(findLastnode_modules\array.prototype.findlast\test\tests.js (Line 138:9 - Line 151:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 138:14 - Line 151:14)
(getTestArr(), function (obj, index) {
actual[index] = obj;
count += 1;
return count === 4;
});
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.test('with context', function (sst) {
var actual = {};
var context = { actual: actual };
var count = 0;
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 151:9 - Line 163:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 151:14 - Line 163:14)
(getTestArr(), function (obj, index) {
this.actual[index] = obj;
count += 1;
return count === 4;
}, context);
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.test('arraylike, no context', function (sst) {
var actual = {};
var count = 0;
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 163:9 - Line 176:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 163:14 - Line 176:14)
(createArrayLikeFromArray(getTestArr()), function (obj, index) {
actual[index] = obj;
count += 1;
return count === 4;
});
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.test('arraylike, context', function (sst) {
var actual = {};
var count = 0;
var context = { actual: actual };
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 176:9 - Line 191:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 176:14 - Line 191:14)
(createArrayLikeFromArray(getTestArr()), function (obj, index) {
this.actual[index] = obj;
count += 1;
return count === 4;
}, context);
sst.deepEqual(actual, { 4: true, 5: undefinedIfNoSparseBug, 6: undefined, 7: 2 });
sst.end();
});
st.end();
});
t.test('list arg boxing', function (st) {
st.plan(3);
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 191:9 - Line 205:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 191:14 - Line 205:14)
('bar', function (item, index, list) {
st.equal(item, 'r', 'last letter matches');
st.equal(typeof list, 'object', 'primitive list arg is boxed');
st.equal(Object.prototype.toString.call(list), '[object String]', 'boxed list arg is a String');
return true;
});
st.end();
});
t.test('array altered during loop', function (st) {
var arr = ['Shoes', 'Car', 'Bike'];
var results = [];
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 205:9 - Line 217:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 205:14 - Line 217:14)
(arr, function (kValue) {
if (results.length === 0) {
arr.splice(1, 1);
}
results.push(kValue);
});
st.equal(results.length, 3, 'predicate called three times');
st.deepEqual(results, ['Bike', 'Bike', 'Shoes']);
results = [];
arr = ['Skateboard', 'Barefoot'];
findLastnode_modules\array.prototype.findlast\test\tests.js (Line 217:9 - Line 238:9), node_modules\array.prototype.findlastindex\test\tests.js (Line 217:14 - Line 238:14)
(arr, function (kValue) {
if (results.length === 0) {
arr.push('Motorcycle');
arr[0] = 'Magic Carpet';
}
results.push(kValue);
});
st.equal(results.length, 2, 'predicate called twice');
st.deepEqual(results, ['Barefoot', 'Magic Carpet']);
st.end();
});
t.test('maximum index', function (st) {
// https://github.com/tc39/test262/pull/3775
var arrayLike = { length: Number.MAX_VALUE };
var calledWithIndex = [];
findLastnode_modules\array.prototype.findlast\test\shimmed.js (Line 8:9 - Line 17:8), node_modules\array.prototype.flatmap\test\shimmed.js (Line 5:7 - Line 14:6)
);
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = function f() {}.name === 'f';
var runTests = require('./tests');
test('shimmed', function (t) {
t.commentnode_modules\array.prototype.findlast\test\shimmed.js (Line 26:35 - Line 33:9), node_modules\array.prototype.flatmap\test\shimmed.js (Line 21:34 - Line 28:8)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Array.prototype.findLastnode_modules\array.prototype.findlast\test\shimmed.js (Line 34:4 - Line 39:11), node_modules\array.prototype.findlastindex\test\shimmed.js (Line 33:2 - Line 38:16)
); }, TypeError, 'null is not an object');
st.end();
});
t.test('Symbol.unscopables', { skip: typeof Symbol !== 'function' || typeof Symbol.unscopables !== 'symbol' }, function (st) {
st.ok(hasOwn(Array.prototype[Symbol.unscopables], 'findLast'node_modules\array.prototype.findlast\test\index.js (Line 1:1 - Line 18:2), node_modules\array.prototype.findlastindex\test\index.js (Line 1:1 - Line 18:2)
'use strict';
var index = require('../');
var callBind = require('call-bind');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](callBind(index, null, undefined, function () {}), TypeError, 'undefined is not an object');
st['throws'](callBind(index, null, null, function () {}), TypeError, 'null is not an object');
st.end();
});
runTests(index, t);
t.end();
});node_modules\array.prototype.findlast\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\array-includes\test\shimmed.js (Line 3:9 - Line 16:8), node_modules\string.prototype.trim\test\shimmed.js (Line 1:13 - Line 14:6)
;
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.commentnode_modules\array-includes\test\shimmed.js (Line 24:35 - Line 31:9), node_modules\array.prototype.flatmap\test\shimmed.js (Line 21:34 - Line 28:8)
);
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Array.prototype.includesnode_modules\array-includes\test\index.js (Line 3:2 - Line 9:9), node_modules\string.prototype.trimstart\test\index.js (Line 3:2 - Line 10:10)
= require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { includesnode_modules\array-includes\test\implementation.js (Line 1:1 - Line 20:2), node_modules\string.prototype.trimstart\test\implementation.js (Line 1:1 - Line 20:2)
'use strict';
var implementation = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});node_modules\aria-query\lib\rolesMap.js (Line 13:2 - Line 18:2), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 12:2 - Line 20:2)
}; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.node_modules\aria-query\lib\roleElementMap.js (Line 9:8 - Line 16:12), node_modules\eslint-plugin-jsx-a11y\lib\util\isNonInteractiveElement.js (Line 12:10 - Line 18:13)
: e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var roleElementnode_modules\aria-query\lib\elementRoleMap.js (Line 1:1 - Line 16:13), node_modules\aria-query\lib\roleElementMap.js (Line 1:1 - Line 18:13)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
var _rolesMap = _interopRequireDefault(require("./rolesMap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var elementRolesnode_modules\aria-query\lib\elementRoleMap.js (Line 16:2 - Line 21:3), node_modules\aria-query\lib\roleElementMap.js (Line 16:2 - Line 21:4)
= [];
var keys = _rolesMap.default.keys();
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var role = _rolesMap.default.get(key);
ifnode_modules\aria-query\lib\elementRoleMap.js (Line 98:34 - Line 106:4), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 68:51 - Line 76:3)
(a, b) {
if (a === undefined && b !== undefined) {
return false;
}
if (a !== undefined && b === undefined) {
return false;
}
if (a !== undefined && b !== undefined) {
if (a.length !==node_modules\aria-query\lib\elementRoleMap.js (Line 117:39 - Line 128:4), node_modules\axobject-query\lib\elementAXObjectMap.js (Line 68:51 - Line 109:4)
(a, b) {
if (a === undefined && b !== undefined) {
return false;
}
if (a !== undefined && b === undefined) {
return false;
}
if (a !== undefined && b !== undefined) {
if (a.length !== b.length) {
return false;
}
for (var _i4node_modules\aria-query\lib\domMap.js (Line 7:28 - Line 15:4), node_modules\aria-query\lib\roleElementMap.js (Line 8:13 - Line 18:13)
));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var domnode_modules\aria-query\lib\ariaPropsMap.js (Line 1:1 - Line 15:11), node_modules\aria-query\lib\domMap.js (Line 1:1 - Line 18:13)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var propertiesnode_modules\acorn\dist\bin.js (Line 8:3 - Line 20:2), node_modules\espree\dist\espree.cjs (Line 13:5 - Line 25:2)
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.node_modules\.vite\deps\react_jsx-dev-runtime.js (Line 12:5 - Line 33:9), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 13:3 - Line 72:2)
(function() {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number"node_modules\.vite\deps\react_jsx-dev-runtime.js (Line 35:7 - Line 45:5), node_modules\react\cjs\react.react-server.development.js (Line 77:9 - Line 88:2)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (typenode_modules\.vite\deps\react_jsx-dev-runtime.js (Line 48:7 - Line 65:6), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 62:2 - Line 78:2)
;
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = falsenode_modules\.vite\deps\react_jsx-dev-runtime.js (Line 72:2 - Line 102:6), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 88:2 - Line 132:2)
|| value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return falsenode_modules\.vite\deps\react_jsx-dev-runtime.js (Line 121:5 - Line 131:2), node_modules\react\cjs\react.react-server.development.js (Line 154:2 - Line 174:2)
, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,node_modules\.vite\deps\react_jsx-dev-runtime.js (Line 162:5 - Line 187:5), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 199:2 - Line 241:2)
,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function(k) {
return "key" !== k;
});
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] || (keysnode_modules\.vite\deps\react_jsx-dev-runtime.js (Line 197:4 - Line 221:14), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 256:2 - Line 287:8)
);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children && defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
return ReactElement(
type,
children,
self,
source,
getOwner(),
maybeKey,
debugStack,
debugTask
);
}
function validateChildKeys(node) {
"object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
}
var React = require_reactnode_modules\.vite\deps\react_jsx-dev-runtime.js (Line 221:2 - Line 253:2), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 287:8 - Line 349:2)
), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
return null;
};
React = {
react_stack_bottom_frame: function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren, source, self) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
source,
self,
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();node_modules\.vite\deps\react-i18next.js (Line 12:2 - Line 28:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 11:2 - Line 28:4)
= {
"area": true,
"base": true,
"br": true,
"col": true,
"embed": true,
"hr": true,
"img": true,
"input": true,
"link": true,
"meta": true,
"param": true,
"source": true,
"track": true,
"wbr": true
};
}node_modules\.vite\deps\react-i18next.js (Line 106:18 - Line 115:4), node_modules\react-i18next\dist\umd\react-i18next.js (Line 127:18 - Line 136:6)
, true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
varnode_modules\.vite\deps\react-i18next.js (Line 217:2 - Line 223:4), node_modules\react-i18next\dist\umd\react-i18next.js (Line 234:2 - Line 240:6)
hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
varnode_modules\.vite\deps\react-i18next.js (Line 239:3 - Line 247:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 256:3 - Line 264:6)
;
const childrenArray = getAsArray(children);
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
childrenArray.forEach((child, childIndex) => {
if (isString(child)) {
stringNode += `${child}`;
return;
}
if ((node_modules\.vite\deps\react-i18next.js (Line 247:13 - Line 272:19), node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 44:7 - Line 289:19)
.isValidElement)(child)) {
const {
props,
type
} = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
stringNode += `<${type}/>`;
return;
}
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
stringNode += `<${childIndex}></${childIndex}>`;
return;
}
if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
stringNode += `<${type}>${childChildren}</${type}>`;
return;
}
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
warn(i18n, "TRANS_NULL_VALUE"node_modules\.vite\deps\react-i18next.js (Line 272:19 - Line 288:20), node_modules\react-i18next\dist\umd\react-i18next.js (Line 289:19 - Line 305:20)
, `Passed in a null value as child`, {
i18nKey
});
return;
}
if (isObject(child)) {
const {
format,
...clone
} = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
warn(i18n, "TRANS_INVALID_OBJ"node_modules\.vite\deps\react-i18next.js (Line 306:3 - Line 312:2), node_modules\react-i18next\src\TransWithoutContext.js (Line 137:3 - Line 145:15)
const data = knownComponentsMap ?? {};
const getData = (childs) => {
const childrenArray = getAsArray(childs);
childrenArray.forEach((child) => {
if (isString(child)) return;
if (hasChildren(child)) getData(getChildren(child));
else if (isObject(child) && !(node_modules\.vite\deps\react-i18next.js (Line 316:36 - Line 326:3), node_modules\react-i18next\dist\umd\react-i18next.js (Line 332:2 - Line 342:2)
.parse(`<0>${targetString}</0>`);
const opts = {
...data,
...combinedTOpts
};
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
};
const pushTranslatedJSX = (child, inner, mem, i2node_modules\.vite\deps\react-i18next.js (Line 341:3 - Line 349:3), node_modules\react-i18next\dist\umd\react-i18next.js (Line 357:2 - Line 365:2)
.ref
}, isVoid ? null : inner);
}));
}
};
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i2node_modules\.vite\deps\react-i18next.js (Line 351:6 - Line 359:13), node_modules\react-i18next\dist\umd\react-i18next.js (Line 367:6 - Line 156:7)
) {
let tmp = reactNodes[parseInt(node.name, 10)];
if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
if (!tmp) tmp = {};
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
props: node.attrs
}, tmp) : tmp;
const isElement = (0, import_reactnode_modules\.vite\deps\react-i18next.js (Line 359:2 - Line 368:3), node_modules\react-i18next\dist\umd\react-i18next.js (Line 375:15 - Line 384:2)
(child);
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
if (isString(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (hasChildren(child) || isValidTranslationWithChildren) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i2node_modules\.vite\deps\react-i18next.js (Line 384:3 - Line 397:3), node_modules\react-i18next\dist\umd\react-i18next.js (Line 400:2 - Line 413:2)
}`
}, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if (isObject(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
if (content) mem.push(content);
} else {
pushTranslatedJSX(child, translationContent, mem, i2node_modules\.vite\deps\react-i18next.js (Line 404:3 - Line 419:4), node_modules\react-i18next\dist\umd\react-i18next.js (Line 420:2 - Line 435:6)
}`
}, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
const result = mapAST([{
dummy: true,
children: children || []
}], ast, getAsArray(children || []));
return getChildren(result[0]);
};
varnode_modules\.vite\deps\react-i18next.js (Line 421:13 - Line 428:13), node_modules\react-i18next\dist\commonjs\TransWithoutContext.js (Line 218:7 - Line 225:7)
.cloneElement)(component, {
key: componentKey
});
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
return comp;
}
function Componentized() {
return (0, import_reactnode_modules\.vite\deps\react-i18next.js (Line 444:2 - Line 452:27), node_modules\react-i18next\dist\umd\react-i18next.js (Line 460:2 - Line 468:27)
generateComponents = (components, translation, i18n, i18nKey) => {
if (!components) return null;
if (Array.isArray(components)) {
return generateArrayComponents(components, translation);
}
if (isObject(components)) {
return generateObjectComponents(components, translation);
}
warnOnce(i18n, "TRANS_INVALID_COMPONENTS"node_modules\.vite\deps\react-i18next.js (Line 457:2 - Line 478:8), node_modules\react-i18next\src\TransWithoutContext.js (Line 380:2 - Line 275:2)
isComponentsMap = (object) => {
if (!isObject(object)) return false;
if (Array.isArray(object)) return false;
return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);
};
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18nnode_modules\.vite\deps\react-i18next.js (Line 462:1 - Line 480:22), node_modules\react-i18next\dist\es\TransWithoutContext.js (Line 250:2 - Line 496:22)
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18n();
if (!i18n) {
warnOnce(i18n, "NO_I18NEXT_INSTANCE"node_modules\.vite\deps\react-i18next.js (Line 491:14 - Line 506:5), node_modules\react-i18next\dist\umd\react-i18next.js (Line 507:14 - Line 522:10)
];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const {
hashTransKey
} = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
values = values && Object.keys(values).length > 0 ? {
...values,
...i18n.options.interpolation.defaultVariables
} : {
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== voidnode_modules\.vite\deps\react-i18next.js (Line 522:3 - Line 532:13), node_modules\react-i18next\dist\umd\react-i18next.js (Line 538:2 - Line 329:7)
(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
return useAsParent ? (0, import_reactnode_modules\.vite\deps\react-i18next.js (Line 549:2 - Line 561:2), node_modules\react-i18next\src\context.js (Line 10:2 - Line 26:7)
{
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach((ns) => {
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
};node_modules\.vite\deps\react-i18next.js (Line 570:2 - Line 584:2), node_modules\react-i18next\src\context.js (Line 37:2 - Line 54:2)
getInitialProps = () => {
const i18n = getI18n();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach((l) => {
initialI18nStore[l] = {};
namespaces.forEach((ns) => {
initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
});
});
ret.initialI18nStore = initialI18nStore;
ret.initialLanguage = i18n.language;
return ret;
};node_modules\.vite\deps\react-i18next.js (Line 587:7 - Line 606:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 597:6 - Line 35:7)
({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = (0, import_react3node_modules\.vite\deps\react-i18next.js (Line 649:89 - Line 661:20), node_modules\react-i18next\dist\umd\react-i18next.js (Line 657:89 - Line 669:20)
);
const notReadyT = (k, optsOrDefaultValue) => {
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION"node_modules\.vite\deps\react-i18next.js (Line 661:118 - Line 672:14), node_modules\react-i18next\dist\umd\react-i18next.js (Line 669:118 - Line 680:14)
);
const i18nOptions = {
...getDefaults(),
...i18n.options.react,
...props
};
const {
useSuspense,
keyPrefix
} = i18nOptions;
let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"node_modules\.vite\deps\react-i18next.js (Line 683:2 - Line 710:4), node_modules\react-i18next\dist\umd\react-i18next.js (Line 691:10 - Line 718:4)
(() => {
const {
bindI18n,
bindI18nStore
} = i18nOptions;
isMounted.current = true;
if (!ready && !useSuspense) {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
} else {
loadNamespaces(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
if (bindI18n) i18n?.on(bindI18n, boundReset);
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
return () => {
isMounted.current = false;
if (i18n && bindI18n) bindI18n?.split(" "node_modules\.vite\deps\react-i18next.js (Line 725:3 - Line 734:57), node_modules\react-i18next\src\useTranslation.js (Line 164:3 - Line 742:6)
throw new Promise((resolve) => {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => resolve());
} else {
loadNamespaces(i18n, namespaces, () => resolve());
}
});
};
// node_modules/react-i18next/dist/es/withTranslation.jsnode_modules\.vite\deps\react-i18next.js (Line 806:2 - Line 812:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 804:11 - Line 810:3)
(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n.options?.isClone) return;
if (initialI18nStore && !i18n.initializedStoreOnce) {
i18n.services.resourceStore.data = initialI18nStore;
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach((node_modules\.vite\deps\react-i18next.js (Line 811:5 - Line 826:49), node_modules\react-i18next\src\useSSR.js (Line 18:5 - Line 824:6)
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach((ns) => {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};
// node_modules/react-i18next/dist/es/withSSR.jsnode_modules\.vite\deps\jwt-decode.js (Line 5:2 - Line 58:7), node_modules\jwt-decode\build\cjs\index.js (Line 6:18 - Line 62:8)
;
InvalidTokenError.prototype.name = "InvalidTokenError";
function b64DecodeUnicode(str) {
return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {
let code = p.charCodeAt(0).toString(16).toUpperCase();
if (code.length < 2) {
code = "0" + code;
}
return "%" + code;
}));
}
function base64UrlDecode(str) {
let output = str.replace(/-/g, "+").replace(/_/g, "/");
switch (output.length % 4) {
case 0:
break;
case 2:
output += "==";
break;
case 3:
output += "=";
break;
default:
throw new Error("base64 string is not of the correct length");
}
try {
return b64DecodeUnicode(output);
} catch (err) {
return atob(output);
}
}
function jwtDecode(token, options) {
if (typeof token !== "string") {
throw new InvalidTokenError("Invalid token specified: must be a string");
}
options || (options = {});
const pos = options.header === true ? 0 : 1;
const part = token.split(".")[pos];
if (typeof part !== "string") {
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
}
let decoded;
try {
decoded = base64UrlDecode(part);
} catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
}
try {
return JSON.parse(decoded);
} catch (e) {
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
}
}
exportnode_modules\.vite\deps\chunk-OBYCLIUT.js (Line 10:58 - Line 246:6), node_modules\.vite\deps\react_jsx-dev-runtime.js (Line 10:62 - Line 333:2)
(exports) {
"use strict";
(function() {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function(k) {
return "key" !== k;
});
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
), didWarnAboutKeySpread[children + isStaticChildren] = true);
}
children = null;
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children && defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
return ReactElement(
type,
children,
self,
source,
getOwner(),
maybeKey,
debugStack,
debugTask
);
}
function validateChildKeys(node) {
"object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
}
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
Symbol.for("react.provider");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
return null;
};
React = {
react_stack_bottom_frame: function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function(type, config, maybeKey, source, self) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
falsenode_modules\.vite\deps\chunk-OBYCLIUT.js (Line 246:6 - Line 259:5), node_modules\react\cjs\react-jsx-runtime.react-server.development.js (Line 360:17 - Line 349:2)
,
source,
self,
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function(type, config, maybeKey, source, self) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
truenode_modules\.vite\deps\chunk-G3PMV62Z.js (Line 1:1 - Line 31:7), node_modules\vite\dist\node\chunks\dep-lCKrEJQm.js (Line 4:1 - Line 48:4)
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
exportnode_modules\.vite\deps\chunk-D7552MD7.js (Line 12:5 - Line 22:6), node_modules\react-dom\cjs\react-dom.development.js (Line 13:3 - Line 23:2)
(function() {
function noop() {
}
function testStringCoercion(value) {
return "" + value;
}
function createPortal$1(children, containerInfo, implementation) {
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
try {
testStringCoercion(key);
var JSCompiler_inline_result = falsenode_modules\.vite\deps\chunk-D7552MD7.js (Line 35:11 - Line 57:14), node_modules\react-dom\cjs\react-dom.development.js (Line 42:2 - Line 84:8)
implementation
};
}
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
function getValueDescriptorExpectingObjectForWarning(thing) {
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
}
function getValueDescriptorExpectingEnumForWarning(thing) {
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher && console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require_reactnode_modules\.vite\deps\chunk-D7552MD7.js (Line 57:2 - Line 76:11), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 42:8 - Line 107:2)
), Internals = {
d: {
f: noop,
r: function() {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
}, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
"function"node_modules\.vite\deps\chunk-D7552MD7.js (Line 76:2 - Line 82:2), node_modules\react-dom\cjs\react-dom.development.js (Line 113:2 - Line 124:2)
|| console.error(
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
);
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
exports.createPortal = function(children, container) {
var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (!container || 1node_modules\.vite\deps\chunk-D7552MD7.js (Line 92:23 - Line 108:8), node_modules\react-dom\cjs\react-dom.development.js (Line 139:2 - Line 97:2)
, Internals.d.f() && console.error(
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
);
}
};
exports.preconnect = function(href, options) {
"string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
getValueDescriptorExpectingEnumForWarning(options)
) : null != options && "string" !== typeof options.crossOrigin && console.error(
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
) : console.error(
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
"string" === typeof href && (options ? (optionsnode_modules\.vite\deps\chunk-D7552MD7.js (Line 108:5 - Line 145:2), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 104:2 - Line 75:2)
, Internals.d.C(href, options));
};
exports.prefetchDNS = function(href) {
if ("string" !== typeof href || !href)
console.error(
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
else if (1 < arguments.length) {
var options = arguments[1];
"object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
) : console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
);
}
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function(href, options) {
"string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
getValueDescriptorExpectingEnumForWarning(options)
) : "style" !== options.as && "script" !== options.as && console.error(
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
getValueDescriptorExpectingEnumForWarning(options.as)
) : console.error(
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
if ("string" === typeof href && options && "string" === typeof options.as) {
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
"style" === as ? Internals.d.S(
href,
"string" === typeof options.precedence ? options.precedence : void 0,
{
crossOrigin,node_modules\.vite\deps\chunk-D7552MD7.js (Line 183:15 - Line 192:9), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 225:2 - Line 239:2)
), Internals.d.M(href, {
crossOrigin: encountered,
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
} else null == options && Internals.d.M(href);
};
exports.preload = function(href, options) {
var encountered = "";
"string"node_modules\.vite\deps\chunk-D7552MD7.js (Line 193:2 - Line 205:2), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 249:2 - Line 271:2)
|| (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
encountered && console.error(
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
encountered
);
if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
encountered = options.as;
var crossOrigin = getCrossOriginStringAs(
encountered,
options.crossOrigin
);
Internals.d.L(href, encountered, {
crossOrigin,node_modules\.vite\deps\chunk-D7552MD7.js (Line 205:13 - Line 219:9), node_modules\react-dom\cjs\react-dom.react-server.production.js (Line 116:2 - Line 298:2)
crossOrigin,
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function(href, options) {
var encountered = "";
"string"node_modules\.vite\deps\chunk-D7552MD7.js (Line 228:9 - Line 248:2), node_modules\react-dom\cjs\react-dom.react-server.development.js (Line 325:2 - Line 424:2)
), Internals.d.m(href, {
as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
crossOrigin: encountered,
integrity: "string" === typeof options.integrity ? options.integrity : void 0
})) : Internals.d.m(href));
};
exports.requestFormReset = function(form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function(fn, a) {
return fn(a);
};
exports.useFormState = function(action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function() {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.1";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 48:21 - Line 72:25), node_modules\.vite\deps\react_jsx-dev-runtime.js (Line 57:5 - Line 81:12)
;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromTypenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 63:2 - Line 118:12), node_modules\react\cjs\react.react-server.development.js (Line 38:2 - Line 59:19)
|| value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return (type.displayName || "Context") + ".Provider";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function getTaskNamenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 107:7 - Line 205:19), node_modules\react\cjs\react.react-server.development.js (Line 97:2 - Line 168:11)
;
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
self = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKeynode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 199:5 - Line 220:9), node_modules\react\cjs\react.react-server.development.js (Line 207:2 - Line 229:2)
,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
oldElement.type,
newKey,
void 0,
void 0,
oldElement._owner,
oldElement.props,
oldElement._debugStack,
oldElement._debugTask
);
oldElement._store && (newKey._store.validated = oldElement._store.validated);
return newKey;
}
function isValidElement(object) {
return "object"node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 226:2 - Line 231:7), node_modules\react\cjs\react.react-server.development.js (Line 242:7 - Line 251:5)
);
}
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
}
function noop$1node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 247:7 - Line 259:6), node_modules\react\cjs\react.react-server.production.js (Line 114:7 - Line 126:2)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = falsenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 296:14 - Line 303:10), node_modules\react\cjs\react.react-server.development.js (Line 353:2 - Line 361:2)
), array.push(callback));
return 1;
}
invokeCallback = 0;
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
nameSoFarnode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 320:13 - Line 352:8), node_modules\react\cjs\react.react-server.development.js (Line 391:2 - Line 249:2)
);
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [], count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function(moduleObject) {
if (0 === payload._status || -1 === payload._status)
payloadnode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 471:7 - Line 482:4), node_modules\react\cjs\react.production.js (Line 47:1 - Line 62:9)
Component.prototype.isReactComponent = {};
Component.prototype.setState = function(partialState, callback) {
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
varnode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 533:13 - Line 541:2), node_modules\react\cjs\react.production.js (Line 306:2 - Line 317:2)
error
});
if (!window.dispatchEvent(event)) return;
} else if ("object" === typeof process && "function" === typeof process.emit) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
},node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 551:2 - Line 571:12), node_modules\react\cjs\react.react-server.development.js (Line 514:7 - Line 286:2)
;
exports.Children = {
map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) {
mapChildren(
children,
function() {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function(children) {
var n = 0;
mapChildren(children, function() {
n++;
});
return n;
},
toArray: function(children) {
return mapChildrennode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 573:2 - Line 590:15), node_modules\react\cjs\react.production.js (Line 342:2 - Line 360:2)
;
},
only: function(children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
exports.__COMPILER_RUNTIME = deprecatedAPIsnode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 671:9 - Line 690:6), node_modules\react\cjs\react.react-server.development.js (Line 596:7 - Line 623:2)
};
};
exports.captureOwnerStack = function() {
var getCurrentStack = ReactSharedInternals.getCurrentStack;
return null === getCurrentStack ? null : getCurrentStack();
};
exports.cloneElement = function(element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props), key = element.key, owner = element._owner;
if (null != config) {
var JSCompiler_inline_result;
a: {
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
config,
"ref"
).get) && JSCompiler_inline_result.isReactWarning) {
JSCompiler_inline_result = falsenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 698:2 - Line 719:6), node_modules\react\cjs\react.react-server.development.js (Line 636:2 - Line 658:2)
|| (props[propName] = config[propName]);
}
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
JSCompiler_inline_result = Array(propName);
for (var i = 0; i < propName; i++)
JSCompiler_inline_result[i] = arguments[i + 2];
props.children = JSCompiler_inline_result;
}
props = ReactElement(
element.type,
key,
void 0,
void 0,
owner,
props,
element._debugStack,
element._debugTask
);
for (key = 2; key < arguments.length; key++)
ownernode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 720:6 - Line 736:13), node_modules\react\cjs\react.production.js (Line 396:2 - Line 412:7)
;
};
exports.createContext = function(defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
defaultValuenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 738:13 - Line 748:26), node_modules\react\cjs\react.react-server.development.js (Line 660:6 - Line 670:2)
;
};
exports.createElement = function(type, config, children) {
for (var i = 2; i < arguments.length; i++) {
var node = arguments[i];
isValidElement(node) && node._store && (node._store.validated = 1);
}
i = {};
node = null;
if (null != config)
for (propName in didWarnAboutOldJSXRuntimenode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 750:7 - Line 761:15), node_modules\react\cjs\react.react-server.development.js (Line 679:2 - Line 698:2)
)
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) i.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
childArray[_i] = arguments[_i + 2];
Object.freeze && Object.freeze(childArray);
i.children = childArray;
}
if (type && type.defaultProps)
for (propName in childrenLengthnode_modules\.vite\deps\chunk-BQYK6RGN.js (Line 761:15 - Line 797:2), node_modules\react\cjs\react.react-server.development.js (Line 698:2 - Line 747:2)
)
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
node && defineKeyPropWarningGetter(
i,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return ReactElement(
type,
node,
void 0,
void 0,
getOwner(),
i,
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.createRef = function() {
var refObject = { current: null };
Object.seal(refObject);
return refObject;
};
exports.forwardRef = function(render) {
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
) : "function" !== typeof render ? console.error(
"forwardRef requires a render function but was given %s.",
null === render ? "null" : typeof render
) : 0 !== render.length && 2 !== render.length && console.error(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
);
null != render && null != render.defaultProps && console.error(
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
);
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 806:5 - Line 826:2), node_modules\react\cjs\react.react-server.development.js (Line 760:2 - Line 781:2)
);
}
});
return elementType;
};
exports.isValidElement = isValidElement;
exports.lazy = function(ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function(type, compare) {
null == type && console.error(
"memo: The first argument must be a component. Instead received: %s",
null === type ? "null" : typeof type
);
compare = {
$$typeof: REACT_MEMO_TYPE,
type,node_modules\.vite\deps\chunk-BQYK6RGN.js (Line 846:2 - Line 854:5), node_modules\react\cjs\react.production.js (Line 462:18 - Line 475:21)
;
try {
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
} catch (error) {
reportGlobalError(error);
} finally {
nullnode_modules\yallist\yallist.js (Line 295:2 - Line 314:5), node_modules\yallist\yallist.js (Line 267:2 - Line 286:2)
= function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = thisnode_modules\which\which.js (Line 94:5 - Line 101:4), node_modules\which\which.js (Line 59:5 - Line 66:8)
const ppRaw = pathEnv[i]
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
const pCmd = path.join(pathPart, cmd)
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
: pCmd
fornode_modules\void-elements\index.js (Line 6:1 - Line 21:2), node_modules\.vite\deps\react-i18next.js (Line 12:5 - Line 26:2)
module.exports = {
"area": true,
"base": true,
"br": true,
"col": true,
"embed": true,
"hr": true,
"img": true,
"input": true,
"link": true,
"meta": true,
"param": true,
"source": true,
"track": true,
"wbr": true
};node_modules\url-parse\index.js (Line 1:1 - Line 589:2), node_modules\url-parse\dist\url-parse.js (Line 3:1 - Line 591:2)
'use strict';
var required = require('requires-port')
, qs = require('querystringify')
, controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/
, CRHTLF = /[\n\r\t]/g
, slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
, port = /:\d+$/
, protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
, windowsDriveLetter = /^[a-zA-Z]:/;
/**
* Remove control characters and whitespace from the beginning of a string.
*
* @param {Object|String} str String to trim.
* @returns {String} A new string representing `str` stripped of control
* characters and whitespace from its beginning.
* @public
*/
function trimLeft(str) {
return (str ? str : '').toString().replace(controlOrWhitespace, '');
}
/**
* These are the parse rules for the URL parser, it informs the parser
* about:
*
* 0. The char it Needs to parse, if it's a string it should be done using
* indexOf, RegExp using exec and NaN means set as current value.
* 1. The property we should set when parsing this value.
* 2. Indication if it's backwards or forward parsing, when set as number it's
* the value of extra chars that should be split off.
* 3. Inherit from location if non existing in the parser.
* 4. `toLowerCase` the resulting value.
*/
var rules = [
['#', 'hash'], // Extract from the back.
['?', 'query'], // Extract from the back.
function sanitize(address, url) { // Sanitize what is left of the address
return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
},
['/', 'pathname'], // Extract from the back.
['@', 'auth', 1], // Extract from the front.
[NaN, 'host', undefined, 1, 1], // Set left over value.
[/:(\d*)$/, 'port', undefined, 1], // RegExp the back.
[NaN, 'hostname', undefined, 1, 1] // Set left over.
];
/**
* These properties should not be copied or inherited from. This is only needed
* for all non blob URL's as a blob URL does not include a hash, only the
* origin.
*
* @type {Object}
* @private
*/
var ignore = { hash: 1, query: 1 };
/**
* The location object differs when your code is loaded through a normal page,
* Worker or through a worker using a blob. And with the blobble begins the
* trouble as the location object will contain the URL of the blob, not the
* location of the page where our code is loaded in. The actual origin is
* encoded in the `pathname` so we can thankfully generate a good "default"
* location from it so we can generate proper relative URL's again.
*
* @param {Object|String} loc Optional default location object.
* @returns {Object} lolcation object.
* @public
*/
function lolcation(loc) {
var globalVar;
if (typeof window !== 'undefined') globalVar = window;
else if (typeof global !== 'undefined') globalVar = global;
else if (typeof self !== 'undefined') globalVar = self;
else globalVar = {};
var location = globalVar.location || {};
loc = loc || location;
var finaldestination = {}
, type = typeof loc
, key;
if ('blob:' === loc.protocol) {
finaldestination = new Url(unescape(loc.pathname), {});
} else if ('string' === type) {
finaldestination = new Url(loc, {});
for (key in ignore) delete finaldestination[key];
} else if ('object' === type) {
for (key in loc) {
if (key in ignore) continue;
finaldestination[key] = loc[key];
}
if (finaldestination.slashes === undefined) {
finaldestination.slashes = slashes.test(loc.href);
}
}
return finaldestination;
}
/**
* Check whether a protocol scheme is special.
*
* @param {String} The protocol scheme of the URL
* @return {Boolean} `true` if the protocol scheme is special, else `false`
* @private
*/
function isSpecial(scheme) {
return (
scheme === 'file:' ||
scheme === 'ftp:' ||
scheme === 'http:' ||
scheme === 'https:' ||
scheme === 'ws:' ||
scheme === 'wss:'
);
}
/**
* @typedef ProtocolExtract
* @type Object
* @property {String} protocol Protocol matched in the URL, in lowercase.
* @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
* @property {String} rest Rest of the URL that is not part of the protocol.
*/
/**
* Extract protocol information from a URL with/without double slash ("//").
*
* @param {String} address URL we want to extract from.
* @param {Object} location
* @return {ProtocolExtract} Extracted information.
* @private
*/
function extractProtocol(address, location) {
address = trimLeft(address);
address = address.replace(CRHTLF, '');
location = location || {};
var match = protocolre.exec(address);
var protocol = match[1] ? match[1].toLowerCase() : '';
var forwardSlashes = !!match[2];
var otherSlashes = !!match[3];
var slashesCount = 0;
var rest;
if (forwardSlashes) {
if (otherSlashes) {
rest = match[2] + match[3] + match[4];
slashesCount = match[2].length + match[3].length;
} else {
rest = match[2] + match[4];
slashesCount = match[2].length;
}
} else {
if (otherSlashes) {
rest = match[3] + match[4];
slashesCount = match[3].length;
} else {
rest = match[4]
}
}
if (protocol === 'file:') {
if (slashesCount >= 2) {
rest = rest.slice(2);
}
} else if (isSpecial(protocol)) {
rest = match[4];
} else if (protocol) {
if (forwardSlashes) {
rest = rest.slice(2);
}
} else if (slashesCount >= 2 && isSpecial(location.protocol)) {
rest = match[4];
}
return {
protocol: protocol,
slashes: forwardSlashes || isSpecial(protocol),
slashesCount: slashesCount,
rest: rest
};
}
/**
* Resolve a relative URL pathname against a base URL pathname.
*
* @param {String} relative Pathname of the relative URL.
* @param {String} base Pathname of the base URL.
* @return {String} Resolved pathname.
* @private
*/
function resolve(relative, base) {
if (relative === '') return base;
var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))
, i = path.length
, last = path[i - 1]
, unshift = false
, up = 0;
while (i--) {
if (path[i] === '.') {
path.splice(i, 1);
} else if (path[i] === '..') {
path.splice(i, 1);
up++;
} else if (up) {
if (i === 0) unshift = true;
path.splice(i, 1);
up--;
}
}
if (unshift) path.unshift('');
if (last === '.' || last === '..') path.push('');
return path.join('/');
}
/**
* The actual URL instance. Instead of returning an object we've opted-in to
* create an actual constructor as it's much more memory efficient and
* faster and it pleases my OCD.
*
* It is worth noting that we should not use `URL` as class name to prevent
* clashes with the global URL instance that got introduced in browsers.
*
* @constructor
* @param {String} address URL we want to parse.
* @param {Object|String} [location] Location defaults for relative paths.
* @param {Boolean|Function} [parser] Parser for the query string.
* @private
*/
function Url(address, location, parser) {
address = trimLeft(address);
address = address.replace(CRHTLF, '');
if (!(this instanceof Url)) {
return new Url(address, location, parser);
}
var relative, extracted, parse, instruction, index, key
, instructions = rules.slice()
, type = typeof location
, url = this
, i = 0;
//
// The following if statements allows this module two have compatibility with
// 2 different API:
//
// 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
// where the boolean indicates that the query string should also be parsed.
//
// 2. The `URL` interface of the browser which accepts a URL, object as
// arguments. The supplied object will be used as default values / fall-back
// for relative paths.
//
if ('object' !== type && 'string' !== type) {
parser = location;
location = null;
}
if (parser && 'function' !== typeof parser) parser = qs.parse;
location = lolcation(location);
//
// Extract protocol information before running the instructions.
//
extracted = extractProtocol(address || '', location);
relative = !extracted.protocol && !extracted.slashes;
url.slashes = extracted.slashes || relative && location.slashes;
url.protocol = extracted.protocol || location.protocol || '';
address = extracted.rest;
//
// When the authority component is absent the URL starts with a path
// component.
//
if (
extracted.protocol === 'file:' && (
extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||
(!extracted.slashes &&
(extracted.protocol ||
extracted.slashesCount < 2 ||
!isSpecial(url.protocol)))
) {
instructions[3] = [/(.*)/, 'pathname'];
}
for (; i < instructions.length; i++) {
instruction = instructions[i];
if (typeof instruction === 'function') {
address = instruction(address, url);
continue;
}
parse = instruction[0];
key = instruction[1];
if (parse !== parse) {
url[key] = address;
} else if ('string' === typeof parse) {
index = parse === '@'
? address.lastIndexOf(parse)
: address.indexOf(parse);
if (~index) {
if ('number' === typeof instruction[2]) {
url[key] = address.slice(0, index);
address = address.slice(index + instruction[2]);
} else {
url[key] = address.slice(index);
address = address.slice(0, index);
}
}
} else if ((index = parse.exec(address))) {
url[key] = index[1];
address = address.slice(0, index.index);
}
url[key] = url[key] || (
relative && instruction[3] ? location[key] || '' : ''
);
//
// Hostname, host and protocol should be lowercased so they can be used to
// create a proper `origin`.
//
if (instruction[4]) url[key] = url[key].toLowerCase();
}
//
// Also parse the supplied query string in to an object. If we're supplied
// with a custom parser as function use that instead of the default build-in
// parser.
//
if (parser) url.query = parser(url.query);
//
// If the URL is relative, resolve the pathname against the base URL.
//
if (
relative
&& location.slashes
&& url.pathname.charAt(0) !== '/'
&& (url.pathname !== '' || location.pathname !== '')
) {
url.pathname = resolve(url.pathname, location.pathname);
}
//
// Default to a / for pathname if none exists. This normalizes the URL
// to always have a /
//
if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
url.pathname = '/' + url.pathname;
}
//
// We should not add port numbers if they are already the default port number
// for a given protocol. As the host also contains the port number we're going
// override it with the hostname which contains no port number.
//
if (!required(url.port, url.protocol)) {
url.host = url.hostname;
url.port = '';
}
//
// Parse down the `auth` for the username and password.
//
url.username = url.password = '';
if (url.auth) {
index = url.auth.indexOf(':');
if (~index) {
url.username = url.auth.slice(0, index);
url.username = encodeURIComponent(decodeURIComponent(url.username));
url.password = url.auth.slice(index + 1);
url.password = encodeURIComponent(decodeURIComponent(url.password))
} else {
url.username = encodeURIComponent(decodeURIComponent(url.auth));
}
url.auth = url.password ? url.username +':'+ url.password : url.username;
}
url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
? url.protocol +'//'+ url.host
: 'null';
//
// The href is just the compiled result.
//
url.href = url.toString();
}
/**
* This is convenience method for changing properties in the URL instance to
* insure that they all propagate correctly.
*
* @param {String} part Property we need to adjust.
* @param {Mixed} value The newly assigned value.
* @param {Boolean|Function} fn When setting the query, it will be the function
* used to parse the query.
* When setting the protocol, double slash will be
* removed from the final url if it is true.
* @returns {URL} URL instance for chaining.
* @public
*/
function set(part, value, fn) {
var url = this;
switch (part) {
case 'query':
if ('string' === typeof value && value.length) {
value = (fn || qs.parse)(value);
}
url[part] = value;
break;
case 'port':
url[part] = value;
if (!required(value, url.protocol)) {
url.host = url.hostname;
url[part] = '';
} else if (value) {
url.host = url.hostname +':'+ value;
}
break;
case 'hostname':
url[part] = value;
if (url.port) value += ':'+ url.port;
url.host = value;
break;
case 'host':
url[part] = value;
if (port.test(value)) {
value = value.split(':');
url.port = value.pop();
url.hostname = value.join(':');
} else {
url.hostname = value;
url.port = '';
}
break;
case 'protocol':
url.protocol = value.toLowerCase();
url.slashes = !fn;
break;
case 'pathname':
case 'hash':
if (value) {
var char = part === 'pathname' ? '/' : '#';
url[part] = value.charAt(0) !== char ? char + value : value;
} else {
url[part] = value;
}
break;
case 'username':
case 'password':
url[part] = encodeURIComponent(value);
break;
case 'auth':
var index = value.indexOf(':');
if (~index) {
url.username = value.slice(0, index);
url.username = encodeURIComponent(decodeURIComponent(url.username));
url.password = value.slice(index + 1);
url.password = encodeURIComponent(decodeURIComponent(url.password));
} else {
url.username = encodeURIComponent(decodeURIComponent(value));
}
}
for (var i = 0; i < rules.length; i++) {
var ins = rules[i];
if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
}
url.auth = url.password ? url.username +':'+ url.password : url.username;
url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
? url.protocol +'//'+ url.host
: 'null';
url.href = url.toString();
return url;
}
/**
* Transform the properties back in to a valid and full URL string.
*
* @param {Function} stringify Optional query stringify function.
* @returns {String} Compiled version of the URL.
* @public
*/
function toString(stringify) {
if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
var query
, url = this
, host = url.host
, protocol = url.protocol;
if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
var result =
protocol +
((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : '');
if (url.username) {
result += url.username;
if (url.password) result += ':'+ url.password;
result += '@';
} else if (url.password) {
result += ':'+ url.password;
result += '@';
} else if (
url.protocol !== 'file:' &&
isSpecial(url.protocol) &&
!host &&
url.pathname !== '/'
) {
//
// Add back the empty userinfo, otherwise the original invalid URL
// might be transformed into a valid one with `url.pathname` as host.
//
result += '@';
}
//
// Trailing colon is removed from `url.host` when it is parsed. If it still
// ends with a colon, then add back the trailing colon that was removed. This
// prevents an invalid URL from being transformed into a valid one.
//
if (host[host.length - 1] === ':' || (port.test(url.hostname) && !url.port)) {
host += ':';
}
result += host + url.pathname;
query = 'object' === typeof url.query ? stringify(url.query) : url.query;
if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;
if (url.hash) result += url.hash;
return result;
}
Url.prototype = { set: set, toString: toString };
//
// Expose the URL parser and some additional properties that might be useful for
// others or testing.
//
Url.extractProtocol = extractProtocol;
Url.location = lolcation;
Url.trimLeft = trimLeft;
Url.qs = qs;
module.exports = Url;node_modules\tslib\tslib.js (Line 84:5 - Line 92:7), node_modules\tsconfig-paths\lib\tsconfig-loader.js (Line 3:5 - Line 11:7)
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__restnode_modules\tslib\tslib.js (Line 206:2 - Line 216:2), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 2:2 - Line 12:2)
Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});node_modules\tslib\tslib.js (Line 263:2 - Line 273:8), node_modules\tsconfig-paths\lib\register.js (Line 2:2 - Line 11:7)
function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
__awaitnode_modules\tslib\tslib.js (Line 315:5 - Line 324:13), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 19:5 - Line 27:7)
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
__importStarnode_modules\tslib\tslib.js (Line 324:2 - Line 332:16), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 27:2 - Line 34:2)
function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
__importDefaultnode_modules\tslib\tslib.es6.mjs (Line 24:10 - Line 32:7), node_modules\tslib\tslib.js (Line 76:2 - Line 82:2)
(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
exportnode_modules\tslib\tslib.es6.mjs (Line 33:9 - Line 40:7), node_modules\tsconfig-paths\lib\tsconfig-loader.js (Line 3:9 - Line 10:2)
(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
returnnode_modules\tslib\tslib.es6.mjs (Line 43:7 - Line 55:7), node_modules\tslib\tslib.js (Line 92:2 - Line 102:2)
(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
exportnode_modules\tslib\tslib.es6.mjs (Line 55:11 - Line 62:7), node_modules\tslib\tslib.js (Line 104:2 - Line 109:2)
(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
exportnode_modules\tslib\tslib.es6.mjs (Line 66:13 - Line 94:7), node_modules\tslib\tslib.js (Line 115:2 - Line 143:18)
(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
exportnode_modules\tslib\tslib.es6.mjs (Line 94:18 - Line 102:7), node_modules\tslib\tslib.js (Line 143:2 - Line 151:10)
(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
exportnode_modules\tslib\tslib.es6.mjs (Line 106:18 - Line 111:7), node_modules\tslib\tslib.js (Line 155:2 - Line 160:11)
(f, name, prefix) {
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
exportnode_modules\tslib\tslib.es6.mjs (Line 115:10 - Line 125:7), node_modules\tslib\tslib.js (Line 164:2 - Line 172:2)
(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
exportnode_modules\tslib\tslib.es6.mjs (Line 125:12 - Line 153:7), node_modules\tslib\tslib.js (Line 174:2 - Line 200:2)
(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
exportnode_modules\tslib\tslib.es6.mjs (Line 153:2 - Line 165:7), node_modules\tslib\tslib.js (Line 206:5 - Line 218:9)
__createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
exportnode_modules\tslib\tslib.es6.mjs (Line 169:9 - Line 181:7), node_modules\tslib\tslib.js (Line 218:2 - Line 228:2)
(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
exportnode_modules\tslib\tslib.es6.mjs (Line 181:7 - Line 198:19), node_modules\tslib\tslib.js (Line 230:2 - Line 245:2)
(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
/** @deprecated */node_modules\tslib\tslib.es6.mjs (Line 206:15 - Line 214:7), node_modules\tslib\tslib.js (Line 255:2 - Line 261:2)
() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
exportnode_modules\tslib\tslib.es6.mjs (Line 214:14 - Line 224:7), node_modules\tsconfig-paths\lib\register.js (Line 2:2 - Line 10:2)
(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
exportnode_modules\tslib\tslib.es6.mjs (Line 228:17 - Line 241:7), node_modules\tslib\tslib.js (Line 277:2 - Line 288:2)
(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
exportnode_modules\tslib\tslib.es6.mjs (Line 241:17 - Line 247:7), node_modules\tslib\tslib.js (Line 290:2 - Line 294:2)
(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}
exportnode_modules\tslib\tslib.es6.mjs (Line 247:14 - Line 255:7), node_modules\tslib\tslib.js (Line 296:2 - Line 302:2)
(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
exportnode_modules\tslib\tslib.es6.mjs (Line 255:21 - Line 275:7), node_modules\tslib\tslib.js (Line 304:2 - Line 27:7)
(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
exportnode_modules\tslib\tslib.es6.mjs (Line 275:13 - Line 283:7), node_modules\@typescript-eslint\utils\dist\ast-utils\eslint-utils\scopeAnalysis.js (Line 27:2 - Line 33:2)
(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
}
exportnode_modules\tslib\tslib.es6.mjs (Line 287:23 - Line 293:7), node_modules\tslib\tslib.js (Line 336:2 - Line 340:2)
(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
exportnode_modules\tslib\tslib.es6.mjs (Line 293:23 - Line 300:7), node_modules\tslib\tslib.js (Line 342:2 - Line 347:2)
(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
exportnode_modules\tslib\tslib.es6.mjs (Line 305:24 - Line 328:4), node_modules\tslib\tslib.js (Line 354:2 - Line 375:2)
(env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
if (async) inner = dispose;
}
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
env.stack.push({ value: value, dispose: dispose, async: async });
}
else if (async) {
env.stack.push({ async: true });
}
return value;
}
varnode_modules\tslib\tslib.es6.mjs (Line 328:1 - Line 333:7), node_modules\tslib\tslib.js (Line 377:5 - Line 382:19)
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
exportnode_modules\tslib\tslib.es6.mjs (Line 333:19 - Line 359:7), node_modules\tslib\tslib.js (Line 382:2 - Line 406:2)
(env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
var r, s = 0;
function next() {
while (r = env.stack.pop()) {
try {
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
if (r.dispose) {
var result = r.dispose.call(r.value);
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
}
else s |= 1;
}
catch (e) {
fail(e);
}
}
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
if (env.hasError) throw env.error;
}
return next();
}
exportnode_modules\tslib\tslib.es6.mjs (Line 359:33 - Line 368:7), node_modules\tslib\tslib.js (Line 408:2 - Line 415:2)
(path, preserveJsx) {
if (typeof path === "string" && /^\.\.?\//.test(path)) {
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
});
}
return path;
}
exportnode_modules\tslib\tslib.es6.js (Line 15:1 - Line 370:2), node_modules\tslib\tslib.es6.mjs (Line 15:1 - Line 369:2)
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
export function __runInitializers(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
export function __propKey(x) {
return typeof x === "symbol" ? x : "".concat(x);
};
export function __setFunctionName(f, name, prefix) {
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
export var __createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
export function __exportStar(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
export function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
/** @deprecated */
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** @deprecated */
export function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
export function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
export function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
export function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
export function __classPrivateFieldIn(state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
export function __addDisposableResource(env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
if (async) inner = dispose;
}
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
env.stack.push({ value: value, dispose: dispose, async: async });
}
else if (async) {
env.stack.push({ async: true });
}
return value;
}
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
export function __disposeResources(env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
var r, s = 0;
function next() {
while (r = env.stack.pop()) {
try {
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
if (r.dispose) {
var result = r.dispose.call(r.value);
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
}
else s |= 1;
}
catch (e) {
fail(e);
}
}
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
if (env.hasError) throw env.error;
}
return next();
}
export function __rewriteRelativeImportExtension(path, preserveJsx) {
if (typeof path === "string" && /^\.\.?\//.test(path)) {
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
});
}
return path;
}
export default {
__extends:node_modules\tslib\tslib.es6.js (Line 383:13 - Line 402:2), node_modules\tslib\tslib.js (Line 465:16 - Line 484:2)
,
__values: __values,
__read: __read,
__spread: __spread,
__spreadArrays: __spreadArrays,
__spreadArray: __spreadArray,
__await: __await,
__asyncGenerator: __asyncGenerator,
__asyncDelegator: __asyncDelegator,
__asyncValues: __asyncValues,
__makeTemplateObject: __makeTemplateObject,
__importStar: __importStar,
__importDefault: __importDefault,
__classPrivateFieldGet: __classPrivateFieldGet,
__classPrivateFieldSet: __classPrivateFieldSet,
__classPrivateFieldIn: __classPrivateFieldIn,
__addDisposableResource: __addDisposableResource,
__disposeResources: __disposeResources,
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
};node_modules\string.prototype.trimend\index.js (Line 1:1 - Line 23:2), node_modules\string.prototype.trimstart\index.js (Line 1:1 - Line 23:2)
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var bound = callBind(getPolyfill());
var boundMethod = function trim(receiver) {
RequireObjectCoercible(receiver);
return bound(receiver);
};
define(boundMethod, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundMethod;node_modules\string.prototype.trim\index.js (Line 1:1 - Line 23:2), node_modules\string.prototype.trimstart\index.js (Line 1:1 - Line 23:2)
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var bound = callBind(getPolyfill());
var boundMethod = function trim(receiver) {
RequireObjectCoercible(receiver);
return bound(receiver);
};
define(boundMethod, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundMethod;node_modules\side-channel-map\index.js (Line 27:2 - Line 37:3), node_modules\side-channel-weakmap\index.js (Line 28:2 - Line 38:9)
var $m;
/** @type {Channel} */
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
'delete': function (key) {
if ($mnode_modules\requires-port\index.js (Line 1:1 - Line 38:2), node_modules\url-parse\dist\url-parse.js (Line 715:1 - Line 752:2)
'use strict';
/**
* Check if we're required to add a port number.
*
* @see https://url.spec.whatwg.org/#default-port
* @param {Number|String} port Port number we need to check
* @param {String} protocol Protocol we need to check against.
* @returns {Boolean} Is it a default port for the given protocol
* @api private
*/
module.exports = function required(port, protocol) {
protocol = protocol.split(':')[0];
port = +port;
if (!port) return false;
switch (protocol) {
case 'http':
case 'ws':
return port !== 80;
case 'https':
case 'wss':
return port !== 443;
case 'ftp':
return port !== 21;
case 'gopher':
return port !== 70;
case 'file':
return false;
}
return port !== 0;
};node_modules\reflect.getprototypeof\index.js (Line 1:1 - Line 10:7), node_modules\es-iterator-helpers\Iterator.from\index.js (Line 1:1 - Line 10:5)
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var bound = callBind(getPolyfill(), typeofnode_modules\react-i18next\react-i18next.js (Line 1:1 - Line 871:2), node_modules\react-i18next\dist\umd\react-i18next.js (Line 1:1 - Line 871:2)
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactI18next = {}, global.React));
})(this, (function (exports, react) { 'use strict';
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
var voidElements = {
"area": true,
"base": true,
"br": true,
"col": true,
"embed": true,
"hr": true,
"img": true,
"input": true,
"link": true,
"meta": true,
"param": true,
"source": true,
"track": true,
"wbr": true
};
var e = /*@__PURE__*/getDefaultExportFromCjs(voidElements);
var t = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
function n(n) {
var r = {
type: "tag",
name: "",
voidElement: false,
attrs: {},
children: []
},
i = n.match(/<\/?([^\s]+?)[/\s>]/);
if (i && (r.name = i[1], (e[i[1]] || "/" === n.charAt(n.length - 2)) && (r.voidElement = true), r.name.startsWith("!--"))) {
var s = n.indexOf("--\x3e");
return {
type: "comment",
comment: -1 !== s ? n.slice(4, s) : ""
};
}
for (var a = new RegExp(t), c = null; null !== (c = a.exec(n));) if (c[0].trim()) if (c[1]) {
var o = c[1].trim(),
l = [o, ""];
o.indexOf("=") > -1 && (l = o.split("=")), r.attrs[l[0]] = l[1], a.lastIndex--;
} else c[2] && (r.attrs[c[2]] = c[3].trim().substring(1, c[3].length - 1));
return r;
}
var r = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,
i = /^\s*$/,
s = Object.create(null);
function a(e, t) {
switch (t.type) {
case "text":
return e + t.content;
case "tag":
return e += "<" + t.name + (t.attrs ? function (e) {
var t = [];
for (var n in e) t.push(n + '="' + e[n] + '"');
return t.length ? " " + t.join(" ") : "";
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(a, "") + "</" + t.name + ">";
case "comment":
return e + "\x3c!--" + t.comment + "--\x3e";
}
}
var c = {
parse: function (e, t) {
t || (t = {}), t.components || (t.components = s);
var a,
c = [],
o = [],
l = -1,
m = false;
if (0 !== e.indexOf("<")) {
var u = e.indexOf("<");
c.push({
type: "text",
content: -1 === u ? e : e.substring(0, u)
});
}
return e.replace(r, function (r, s) {
if (m) {
if (r !== "</" + a.name + ">") return;
m = false;
}
var u,
f = "/" !== r.charAt(1),
h = r.startsWith("\x3c!--"),
p = s + r.length,
d = e.charAt(p);
if (h) {
var v = n(r);
return l < 0 ? (c.push(v), c) : ((u = o[l]).children.push(v), c);
}
if (f && (l++, "tag" === (a = n(r)).type && t.components[a.name] && (a.type = "component", m = true), a.voidElement || m || !d || "<" === d || a.children.push({
type: "text",
content: e.slice(p, e.indexOf("<", p))
}), 0 === l && c.push(a), (u = o[l - 1]) && u.children.push(a), o[l] = a), (!f || a.voidElement) && (l > -1 && (a.voidElement || a.name === r.slice(2, -1)) && (l--, a = -1 === l ? c : o[l]), !m && "<" !== d && d)) {
u = -1 === l ? c : o[l].children;
var x = e.indexOf("<", p),
g = e.slice(p, -1 === x ? void 0 : x);
i.test(g) && (g = " "), (x > -1 && l + u.length >= 0 || " " !== g) && u.push({
type: "text",
content: g
});
}
}), c;
},
stringify: function (e) {
return e.reduce(function (e, t) {
return e + a("", t);
}, "");
}
};
const warn = (i18n, code, msg, rest) => {
const args = [msg, {
code,
...(rest || {})
}];
if (i18n?.services?.logger?.forward) {
return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
}
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
if (i18n?.services?.logger?.warn) {
i18n.services.logger.warn(...args);
} else if (console?.warn) {
console.warn(...args);
}
};
const alreadyWarned = {};
const warnOnce = (i18n, code, msg, rest) => {
if (isString(msg) && alreadyWarned[msg]) return;
if (isString(msg)) alreadyWarned[msg] = new Date();
warn(i18n, code, msg, rest);
};
const loadedClb = (i18n, cb) => () => {
if (i18n.isInitialized) {
cb();
} else {
const initialized = () => {
setTimeout(() => {
i18n.off('initialized', initialized);
}, 0);
cb();
};
i18n.on('initialized', initialized);
}
};
const loadNamespaces = (i18n, ns, cb) => {
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
};
const loadLanguages = (i18n, lng, ns, cb) => {
if (isString(ns)) ns = [ns];
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
ns.forEach(n => {
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
});
i18n.loadLanguages(lng, loadedClb(i18n, cb));
};
const hasLoadedNamespace = (ns, i18n, options = {}) => {
if (!i18n.languages || !i18n.languages.length) {
warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
languages: i18n.languages
});
return true;
}
return i18n.hasLoadedNamespace(ns, {
lng: options.lng,
precheck: (i18nInstance, loadNotPending) => {
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
}
});
};
const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');
const isString = obj => typeof obj === 'string';
const isObject = obj => typeof obj === 'object' && obj !== null;
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
const htmlEntities = {
'&': '&',
'&': '&',
'<': '<',
'<': '<',
'>': '>',
'>': '>',
''': "'",
''': "'",
'"': '"',
'"': '"',
' ': ' ',
' ': ' ',
'©': '©',
'©': '©',
'®': '®',
'®': '®',
'…': '…',
'…': '…',
'/': '/',
'/': '/'
};
const unescapeHtmlEntity = m => htmlEntities[m];
const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);
let defaultOptions = {
bindI18n: 'languageChanged',
bindI18nStore: '',
transEmptyNodeValue: '',
transSupportBasicHtmlNodes: true,
transWrapTextNodes: '',
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
useSuspense: true,
unescape
};
const setDefaults = (options = {}) => {
defaultOptions = {
...defaultOptions,
...options
};
};
const getDefaults = () => defaultOptions;
let i18nInstance;
const setI18n = instance => {
i18nInstance = instance;
};
const getI18n = () => i18nInstance;
const hasChildren = (node, checkLength) => {
if (!node) return false;
const base = node.props?.children ?? node.children;
if (checkLength) return base.length > 0;
return !!base;
};
const getChildren = node => {
if (!node) return [];
const children = node.props?.children ?? node.children;
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
};
const hasValidReactChildren = children => Array.isArray(children) && children.every(react.isValidElement);
const getAsArray = data => Array.isArray(data) ? data : [data];
const mergeProps = (source, target) => {
const newTarget = {
...target
};
newTarget.props = Object.assign(source.props, target.props);
return newTarget;
};
const nodesToString = (children, i18nOptions, i18n, i18nKey) => {
if (!children) return '';
let stringNode = '';
const childrenArray = getAsArray(children);
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
childrenArray.forEach((child, childIndex) => {
if (isString(child)) {
stringNode += `${child}`;
return;
}
if (react.isValidElement(child)) {
const {
props,
type
} = child;
const childPropsCount = Object.keys(props).length;
const shouldKeepChild = keepArray.indexOf(type) > -1;
const childChildren = props.children;
if (!childChildren && shouldKeepChild && !childPropsCount) {
stringNode += `<${type}/>`;
return;
}
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
stringNode += `<${childIndex}></${childIndex}>`;
return;
}
if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
stringNode += `<${type}>${childChildren}</${type}>`;
return;
}
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
stringNode += `<${childIndex}>${content}</${childIndex}>`;
return;
}
if (child === null) {
warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {
i18nKey
});
return;
}
if (isObject(child)) {
const {
format,
...clone
} = child;
const keys = Object.keys(clone);
if (keys.length === 1) {
const value = format ? `${keys[0]}, ${format}` : keys[0];
stringNode += `{{${value}}}`;
return;
}
warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {
i18nKey,
child
});
return;
}
warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {
i18nKey,
child
});
});
return stringNode;
};
const renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {
if (targetString === '') return [];
const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);
if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];
const data = knownComponentsMap ?? {};
const getData = childs => {
const childrenArray = getAsArray(childs);
childrenArray.forEach(child => {
if (isString(child)) return;
if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !react.isValidElement(child)) Object.assign(data, child);
});
};
getData(children);
const ast = c.parse(`<0>${targetString}</0>`);
const opts = {
...data,
...combinedTOpts
};
const renderInner = (child, node, rootReactNode) => {
const childs = getChildren(child);
const mappedChildren = mapAST(childs, node.children, rootReactNode);
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
};
const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {
if (child.dummy) {
child.children = inner;
mem.push(react.cloneElement(child, {
key: i
}, isVoid ? undefined : inner));
} else {
mem.push(...react.Children.map([child], c => {
const props = {
...c.props
};
delete props.i18nIsDynamicList;
return react.createElement(c.type, {
...props,
key: i,
ref: c.props.ref ?? c.ref
}, isVoid ? null : inner);
}));
}
};
const mapAST = (reactNode, astNode, rootReactNode) => {
const reactNodes = getAsArray(reactNode);
const astNodes = getAsArray(astNode);
return astNodes.reduce((mem, node, i) => {
const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
if (node.type === 'tag') {
let tmp = reactNodes[parseInt(node.name, 10)];
if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
if (!tmp) tmp = {};
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
props: node.attrs
}, tmp) : tmp;
const isElement = react.isValidElement(child);
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
if (isString(child)) {
const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
mem.push(value);
} else if (hasChildren(child) || isValidTranslationWithChildren) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (isEmptyTransWithHTML) {
const inner = mapAST(reactNodes, node.children, rootReactNode);
pushTranslatedJSX(child, inner, mem, i);
} else if (Number.isNaN(parseFloat(node.name))) {
if (isKnownComponent) {
const inner = renderInner(child, node, rootReactNode);
pushTranslatedJSX(child, inner, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push(react.createElement(node.name, {
key: `${node.name}-${i}`
}));
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(react.createElement(node.name, {
key: `${node.name}-${i}`
}, inner));
}
} else if (node.voidElement) {
mem.push(`<${node.name} />`);
} else {
const inner = mapAST(reactNodes, node.children, rootReactNode);
mem.push(`<${node.name}>${inner}</${node.name}>`);
}
} else if (isObject(child) && !isElement) {
const content = node.children[0] ? translationContent : null;
if (content) mem.push(content);
} else {
pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);
}
} else if (node.type === 'text') {
const wrapTextNodes = i18nOptions.transWrapTextNodes;
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
if (wrapTextNodes) {
mem.push(react.createElement(wrapTextNodes, {
key: `${node.name}-${i}`
}, content));
} else {
mem.push(content);
}
}
return mem;
}, []);
};
const result = mapAST([{
dummy: true,
children: children || []
}], ast, getAsArray(children || []));
return getChildren(result[0]);
};
const fixComponentProps = (component, index, translation) => {
const componentKey = component.key || index;
const comp = react.cloneElement(component, {
key: componentKey
});
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
return comp;
}
function Componentized() {
return react.createElement(react.Fragment, null, comp);
}
return react.createElement(Componentized, {
key: componentKey
});
};
const generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));
const generateObjectComponents = (components, translation) => {
const componentMap = {};
Object.keys(components).forEach(c => {
Object.assign(componentMap, {
[c]: fixComponentProps(components[c], c, translation)
});
});
return componentMap;
};
const generateComponents = (components, translation, i18n, i18nKey) => {
if (!components) return null;
if (Array.isArray(components)) {
return generateArrayComponents(components, translation);
}
if (isObject(components)) {
return generateObjectComponents(components, translation);
}
warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> "components" prop expects an object or array`, {
i18nKey
});
return null;
};
const isComponentsMap = object => {
if (!isObject(object)) return false;
if (Array.isArray(object)) return false;
return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);
};
function Trans$1({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const i18n = i18nFromProps || getI18n();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {
i18nKey
});
return children;
}
const t = tFromProps || i18n.t.bind(i18n) || (k => k);
const reactI18nextOptions = {
...getDefaults(),
...i18n.options?.react
};
let namespaces = ns || t.ns || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
const {
hashTransKey
} = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
if (i18n.options?.interpolation?.defaultVariables) {
values = values && Object.keys(values).length > 0 ? {
...values,
...i18n.options.interpolation.defaultVariables
} : {
...i18n.options.interpolation.defaultVariables
};
}
const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
interpolation: {
...tOptions.interpolation,
prefix: '#$?',
suffix: '?$#'
}
};
const combinedTOpts = {
...tOptions,
context: context || tOptions.context,
count,
...values,
...interpolationOverride,
defaultValue,
ns: namespaces
};
const translation = key ? t(key, combinedTOpts) : defaultValue;
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
let indexedChildren = generatedComponents || children;
let componentsMap = null;
if (isComponentsMap(generatedComponents)) {
componentsMap = generatedComponents;
indexedChildren = children;
}
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
return useAsParent ? react.createElement(useAsParent, additionalProps, content) : content;
}
const initReactI18next = {
type: '3rdParty',
init(instance) {
setDefaults(instance.options.react);
setI18n(instance);
}
};
const I18nContext = react.createContext();
class ReportNamespaces {
constructor() {
this.usedNamespaces = {};
}
addUsedNamespaces(namespaces) {
namespaces.forEach(ns => {
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
});
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces);
}
}
const composeInitialProps = ForComponent => async ctx => {
const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};
const i18nInitialProps = getInitialProps();
return {
...componentsInitialProps,
...i18nInitialProps
};
};
const getInitialProps = () => {
const i18n = getI18n();
const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
const ret = {};
const initialI18nStore = {};
i18n.languages.forEach(l => {
initialI18nStore[l] = {};
namespaces.forEach(ns => {
initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
});
});
ret.initialI18nStore = initialI18nStore;
ret.initialLanguage = i18n.language;
return ret;
};
function Trans({
children,
count,
parent,
i18nKey,
context,
tOptions = {},
values,
defaults,
components,
ns,
i18n: i18nFromProps,
t: tFromProps,
shouldUnescape,
...additionalProps
}) {
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
const t = tFromProps || i18n?.t.bind(i18n);
return Trans$1({
children,
count,
parent,
i18nKey,
context,
tOptions,
values,
defaults,
components,
ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
i18n,
t: tFromProps,
shouldUnescape,
...additionalProps
});
}
const usePrevious = (value, ignore) => {
const ref = react.useRef();
react.useEffect(() => {
ref.current = value;
}, [value, ignore]);
return ref.current;
};
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
const useMemoizedT = (i18n, language, namespace, keyPrefix) => react.useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
const useTranslation = (ns, props = {}) => {
const {
i18n: i18nFromProps
} = props;
const {
i18n: i18nFromContext,
defaultNS: defaultNSFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
if (!i18n) {
warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');
const notReadyT = (k, optsOrDefaultValue) => {
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
return Array.isArray(k) ? k[k.length - 1] : k;
};
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
retNotReady.i18n = {};
retNotReady.ready = false;
return retNotReady;
}
if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
const i18nOptions = {
...getDefaults(),
...i18n.options.react,
...props
};
const {
useSuspense,
keyPrefix
} = i18nOptions;
let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const getT = () => memoGetT;
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
const [t, setT] = react.useState(getT);
let joinedNS = namespaces.join();
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
const previousJoinedNS = usePrevious(joinedNS);
const isMounted = react.useRef(true);
react.useEffect(() => {
const {
bindI18n,
bindI18nStore
} = i18nOptions;
isMounted.current = true;
if (!ready && !useSuspense) {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
} else {
loadNamespaces(i18n, namespaces, () => {
if (isMounted.current) setT(getNewT);
});
}
}
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
setT(getNewT);
}
const boundReset = () => {
if (isMounted.current) setT(getNewT);
};
if (bindI18n) i18n?.on(bindI18n, boundReset);
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
return () => {
isMounted.current = false;
if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
};
}, [i18n, joinedNS]);
react.useEffect(() => {
if (isMounted.current && ready) {
setT(getT);
}
}, [i18n, keyPrefix, ready]);
const ret = [t, i18n, ready];
ret.t = t;
ret.i18n = i18n;
ret.ready = ready;
if (ready) return ret;
if (!ready && !useSuspense) return ret;
throw new Promise(resolve => {
if (props.lng) {
loadLanguages(i18n, props.lng, namespaces, () => resolve());
} else {
loadNamespaces(i18n, namespaces, () => resolve());
}
});
};
const withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {
function I18nextWithTranslation({
forwardedRef,
...rest
}) {
const [t, i18n, ready] = useTranslation(ns, {
...rest,
keyPrefix: options.keyPrefix
});
const passDownProps = {
...rest,
t,
i18n,
tReady: ready
};
if (options.withRef && forwardedRef) {
passDownProps.ref = forwardedRef;
} else if (!options.withRef && forwardedRef) {
passDownProps.forwardedRef = forwardedRef;
}
return react.createElement(WrappedComponent, passDownProps);
}
I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;
I18nextWithTranslation.WrappedComponent = WrappedComponent;
const forwardRef = (props, ref) => react.createElement(I18nextWithTranslation, Object.assign({}, props, {
forwardedRef: ref
}));
return options.withRef ? react.forwardRef(forwardRef) : I18nextWithTranslation;
};
const Translation = ({
ns,
children,
...options
}) => {
const [t, i18n, ready] = useTranslation(ns, options);
return children(t, {
i18n,
lng: i18n.language
}, ready);
};
function I18nextProvider({
i18n,
defaultNS,
children
}) {
const value = react.useMemo(() => ({
i18n,
defaultNS
}), [i18n, defaultNS]);
return react.createElement(I18nContext.Provider, {
value
}, children);
}
const useSSR = (initialI18nStore, initialLanguage, props = {}) => {
const {
i18n: i18nFromProps
} = props;
const {
i18n: i18nFromContext
} = react.useContext(I18nContext) || {};
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n.options?.isClone) return;
if (initialI18nStore && !i18n.initializedStoreOnce) {
i18n.services.resourceStore.data = initialI18nStore;
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach(ns => {
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
i18n.initializedStoreOnce = true;
i18n.isInitialized = true;
}
if (initialLanguage && !i18n.initializedLanguageOnce) {
i18n.changeLanguage(initialLanguage);
i18n.initializedLanguageOnce = true;
}
};
const withSSR = () => function Extend(WrappedComponent) {
function I18nextWithSSR({
initialI18nStore,
initialLanguage,
...rest
}) {
useSSR(initialI18nStore, initialLanguage);
return react.createElement(WrappedComponent, {
...rest
});
}
I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);
I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;
I18nextWithSSR.WrappedComponent = WrappedComponent;
return I18nextWithSSR;
};
const date = () => '';
const time = () => '';
const number = () => '';
const select = () => '';
const plural = () => '';
const selectOrdinal = () => '';
exports.I18nContext = I18nContext;
exports.I18nextProvider = I18nextProvider;
exports.Trans = Trans;
exports.TransWithoutContext = Trans$1;
exports.Translation = Translation;
exports.composeInitialProps = composeInitialProps;
exports.date = date;
exports.getDefaults = getDefaults;
exports.getI18n = getI18n;
exports.getInitialProps = getInitialProps;
exports.initReactI18next = initReactI18next;
exports.number = number;
exports.plural = plural;
exports.select = select;
exports.selectOrdinal = selectOrdinal;
exports.setDefaults = setDefaults;
exports.setI18n = setI18n;
exports.time = time;
exports.useSSR = useSSR;
exports.useTranslation = useTranslation;
exports.withSSR = withSSR;
exports.withTranslation = withTranslation;
}));node_modules\react-i18next\icu.macro.js (Line 162:12 - Line 167:70), node_modules\react-i18next\icu.macro.js (Line 100:12 - Line 105:27)
(parentPath, { attributes }, babel) {
const t = babel.types;
const toObjectProperty = (name, value) =>
t.objectProperty(t.identifier(name), t.identifier(name), false, !value);
// will need to merge switch attribute with existing values attributenode_modules\react-i18next\icu.macro.js (Line 168:3 - Line 180:9), node_modules\react-i18next\icu.macro.js (Line 109:3 - Line 120:8)
const existingValuesAttribute = findAttribute('values', attributes);
const existingValues = existingValuesAttribute
? existingValuesAttribute.node.value.expression.properties
: [];
let componentStartIndex = 0;
const extracted = attributes.reduce(
(mem, attr) => {
if (attr.node.name.name === 'i18nKey') {
// copy the i18nKey
mem.attributesToCopy.push(attr.node);
} else if (attr.node.name.name === 'switch'node_modules\react-i18next\icu.macro.js (Line 200:5 - Line 214:11), node_modules\react-i18next\icu.macro.js (Line 148:11 - Line 162:12)
} {${thisTrans.defaults}}`;
mem.components = mem.components.concat(thisTrans.components);
componentStartIndex += thisTrans.components.length;
}
return mem;
},
{ attributesToCopy: [], values: existingValues, components: [], defaults: '' },
);
// replace the node with the new Trans
parentPath.replaceWith(buildTransElement(extracted, extracted.attributesToCopy, t, true));
}
function transAsJSXnode_modules\react-dom\index.js (Line 1:1 - Line 35:32), node_modules\react-dom\profiling.js (Line 1:1 - Line 35:41)
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.production.js'node_modules\react-dom\client.js (Line 1:1 - Line 35:39), node_modules\react-dom\profiling.js (Line 1:1 - Line 35:41)
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom-client.production.js'node_modules\querystringify\index.js (Line 1:1 - Line 118:2), node_modules\url-parse\dist\url-parse.js (Line 595:1 - Line 712:2)
'use strict';
var has = Object.prototype.hasOwnProperty
, undef;
/**
* Decode a URI encoded string.
*
* @param {String} input The URI encoded string.
* @returns {String|Null} The decoded string.
* @api private
*/
function decode(input) {
try {
return decodeURIComponent(input.replace(/\+/g, ' '));
} catch (e) {
return null;
}
}
/**
* Attempts to encode a given input.
*
* @param {String} input The string that needs to be encoded.
* @returns {String|Null} The encoded string.
* @api private
*/
function encode(input) {
try {
return encodeURIComponent(input);
} catch (e) {
return null;
}
}
/**
* Simple query string parser.
*
* @param {String} query The query string that needs to be parsed.
* @returns {Object}
* @api public
*/
function querystring(query) {
var parser = /([^=?#&]+)=?([^&]*)/g
, result = {}
, part;
while (part = parser.exec(query)) {
var key = decode(part[1])
, value = decode(part[2]);
//
// Prevent overriding of existing properties. This ensures that build-in
// methods like `toString` or __proto__ are not overriden by malicious
// querystrings.
//
// In the case if failed decoding, we want to omit the key/value pairs
// from the result.
//
if (key === null || value === null || key in result) continue;
result[key] = value;
}
return result;
}
/**
* Transform a query string to an object.
*
* @param {Object} obj Object that should be transformed.
* @param {String} prefix Optional prefix.
* @returns {String}
* @api public
*/
function querystringify(obj, prefix) {
prefix = prefix || '';
var pairs = []
, value
, key;
//
// Optionally prefix with a '?' if needed
//
if ('string' !== typeof prefix) prefix = '?';
for (key in obj) {
if (has.call(obj, key)) {
value = obj[key];
//
// Edge cases where we actually want to encode the value to an empty
// string instead of the stringified value.
//
if (!value && (value === null || value === undef || isNaN(value))) {
value = '';
}
key = encode(key);
value = encode(value);
//
// If we failed to encode the strings, we should bail out as we don't
// want to add invalid strings to the query.
//
if (key === null || value === null) continue;
pairs.push(key +'='+ value);
}
}
return pairs.length ? prefix + pairs.join('&') : '';
}
//
// Expose the module.
//
exports.stringify = querystringify;
exports.parse = querystring;node_modules\punycode\punycode.es6.js (Line 1:1 - Line 443:7), node_modules\punycode\punycode.js (Line 1:1 - Line 443:7)
'use strict';
/** Highest positive signed 32-bit float value */
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
const base = 36;
const tMin = 1;
const tMax = 26;
const skew = 38;
const damp = 700;
const initialBias = 72;
const initialN = 128; // 0x80
const delimiter = '-'; // '\x2D'
/** Regular expressions */
const regexPunycode = /^xn--/;
const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
/** Error messages */
const errors = {
'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
};
/** Convenience shortcuts */
const baseMinusTMin = base - tMin;
const floor = Math.floor;
const stringFromCharCode = String.fromCharCode;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, callback) {
const result = [];
let length = array.length;
while (length--) {
result[length] = callback(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {String} A new string of characters returned by the callback
* function.
*/
function mapDomain(domain, callback) {
const parts = domain.split('@');
let result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
domain = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
domain = domain.replace(regexSeparators, '\x2E');
const labels = domain.split('.');
const encoded = map(labels, callback).join('.');
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
const output = [];
let counter = 0;
const length = string.length;
while (counter < length) {
const value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// It's a high surrogate, and there is a next character.
const extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
const basicToDigit = function(codePoint) {
if (codePoint >= 0x30 && codePoint < 0x3A) {
return 26 + (codePoint - 0x30);
}
if (codePoint >= 0x41 && codePoint < 0x5B) {
return codePoint - 0x41;
}
if (codePoint >= 0x61 && codePoint < 0x7B) {
return codePoint - 0x61;
}
return base;
};
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
const digitToBasic = function(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
};
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
const adapt = function(delta, numPoints, firstTime) {
let k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/
const decode = function(input) {
// Don't use UCS-2.
const output = [];
const inputLength = input.length;
let i = 0;
let n = initialN;
let bias = initialBias;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
let basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (let j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
const oldi = i;
for (let w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
const digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base) {
error('invalid-input');
}
if (digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
const baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
const out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output.
output.splice(i++, 0, n);
}
return String.fromCodePoint(...output);
};
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/
const encode = function(input) {
const output = [];
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode(input);
// Cache the length.
const inputLength = input.length;
// Initialize the state.
let n = initialN;
let delta = 0;
let bias = initialBias;
// Handle the basic code points.
for (const currentValue of input) {
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
const basicLength = output.length;
let handledCPCount = basicLength;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string with a delimiter unless it's empty.
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
let m = maxInt;
for (const currentValue of input) {
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow.
const handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (const currentValue of input) {
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue === n) {
// Represent delta as a generalized variable-length integer.
let q = delta;
for (let k = base; /* no condition */; k += base) {
const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
const qMinusT = q - t;
const baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
};
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
const toUnicode = function(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
};
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
const toASCII = function(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
};
/*--------------------------------------------------------------------------*/
/** Define the public API */
const punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '2.3.1',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
exportnode_modules\proxy-from-env\test.js (Line 256:12 - Line 268:39), node_modules\proxy-from-env\test.js (Line 233:11 - Line 245:13)
;
testProxyUrl(env, 'http://proxy', 'http://example');
testProxyUrl(env, 'http://proxy', 'http://example:80');
testProxyUrl(env, 'http://proxy', 'http://example:1337');
testProxyUrl(env, '', 'http://sub.example');
testProxyUrl(env, '', 'http://sub.example:80');
testProxyUrl(env, '', 'http://sub.example:1337');
testProxyUrl(env, 'http://proxy', 'http://prefexample');
testProxyUrl(env, 'http://proxy', 'http://example.no');
testProxyUrl(env, '', 'http://a.b.example');
});
describe('no_proxy=*example (substring suffix)'node_modules\prop-types\factoryWithTypeCheckers.js (Line 442:29 - Line 449:79), node_modules\prop-types\factoryWithTypeCheckers.js (Line 420:23 - Line 427:4)
(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
// We need to check all keys in case some are required but missing from props.node_modules\object.values\index.js (Line 1:1 - Line 10:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 10:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill(),node_modules\object.fromentries\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill(), Object);
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\object.entries\index.js (Line 1:1 - Line 18:2), node_modules\es-iterator-helpers\Iterator.prototype.toArray\index.js (Line 1:1 - Line 18:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind(getPolyfill(), Object);
define(polyfill, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = polyfill;node_modules\nanoid\index.cjs (Line 10:1 - Line 26:82), node_modules\nanoid\index.js (Line 3:1 - Line 17:9)
const POOL_SIZE_MULTIPLIER = 128
let pool, poolOffset
let fillPool = bytes => {
if (!pool || pool.length < bytes) {
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
crypto.randomFillSync(pool)
poolOffset = 0
} else if (poolOffset + bytes > pool.length) {
crypto.randomFillSync(pool)
poolOffset = 0
}
poolOffset += bytes
}
let random = bytes => {
// `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollutionnode_modules\nanoid\index.cjs (Line 31:10 - Line 51:7), node_modules\nanoid\async\index.cjs (Line 21:3 - Line 41:4)
) => {
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
// values closer to the alphabet size. The bitmask calculates the closest
// `2^31 - 1` number, which exceeds the alphabet size.
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
// Though, the bitmask solution is not perfect since the bytes exceeding
// the alphabet size are refused. Therefore, to reliably generate the ID,
// the random bytes redundancy has to be satisfied.
// Note: every hardware random generator call is performance expensive,
// because the system call for entropy collection takes a lot of time.
// So, to avoid additional system calls, extra bytes are requested in advance.
// Next, a step determines how many random bytes to generate.
// The number of random bytes gets decided upon the ID size, mask,
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
// according to benchmarks).
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
returnnode_modules\nanoid\index.cjs (Line 59:9 - Line 70:81), node_modules\nanoid\index.js (Line 29:9 - Line 38:9)
id += alphabet[bytes[i] & mask] || ''
if (id.length === size) return id
}
}
}
}
let customAlphabet = (alphabet, size = 21) =>
customRandom(alphabet, size, random)
let nanoid = (size = 21) => {
// `|=` convert `size` to number to prevent `valueOf` abusing and pool pollutionnode_modules\nanoid\index.browser.cjs (Line 8:10 - Line 32:2), node_modules\nanoid\async\index.browser.cjs (Line 3:3 - Line 27:6)
) => {
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
// values closer to the alphabet size. The bitmask calculates the closest
// `2^31 - 1` number, which exceeds the alphabet size.
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
// `Math.clz32` is not used, because it is not available in browsers.
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
// Though, the bitmask solution is not perfect since the bytes exceeding
// the alphabet size are refused. Therefore, to reliably generate the ID,
// the random bytes redundancy has to be satisfied.
// Note: every hardware random generator call is performance expensive,
// because the system call for entropy collection takes a lot of time.
// So, to avoid additional system calls, extra bytes are requested in advance.
// Next, a step determines how many random bytes to generate.
// The number of random bytes gets decided upon the ID size, mask,
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
// according to benchmarks).
// `-~f => Math.ceil(f)` if f is a float
// `-~i => i + 1` if i is an integer
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
return (node_modules\nanoid\index.browser.cjs (Line 40:9 - Line 52:61), node_modules\nanoid\index.browser.js (Line 12:9 - Line 22:5)
id += alphabet[bytes[j] & mask] || ''
if (id.length === size) return id
}
}
}
}
let customAlphabet = (alphabet, size = 21) =>
customRandom(alphabet, size, random)
let nanoid = (size = 21) =>
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
// It is incorrect to use bytes exceeding the alphabet size.node_modules\micromatch\index.js (Line 300:2 - Line 305:2), node_modules\micromatch\index.js (Line 264:2 - Line 269:6)
= (list, patterns, options) => {
let items = [].concat(list);
for (let pattern of [].concat(patterns)) {
let isMatch = picomatch(String(pattern), options);
if (!node_modules\is-glob\index.js (Line 109:5 - Line 133:7), node_modules\is-glob\index.js (Line 77:5 - Line 101:4)
}
if (str[index] === '\\') {
var open = str[index + 1];
index += 2;
var close = chars[open];
if (close) {
var n = str.indexOf(close, index);
if (n !== -1) {
index = n + 1;
}
}
if (str[index] === '!') {
return true;
}
} else {
index++;
}
}
return false;
};
modulenode_modules\internal-slot\index.js (Line 26:4 - Line 33:4), node_modules\internal-slot\index.js (Line 14:7 - Line 21:8)
: function (O, slot) {
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
throw new $TypeError('`O` is not an object');
}
if (typeof slot !== 'string') {
throw new $TypeError('`slot` must be a string');
}
varnode_modules\internal-slot\index.js (Line 37:4 - Line 46:2), node_modules\internal-slot\index.js (Line 14:7 - Line 35:6)
: function (O, slot) {
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
throw new $TypeError('`O` is not an object');
}
if (typeof slot !== 'string') {
throw new $TypeError('`slot` must be a string');
}
var slots = channel.get(O);
// eslint-disable-next-line no-extra-parens
return !node_modules\internal-slot\index.js (Line 48:2 - Line 56:3), node_modules\internal-slot\index.js (Line 26:5 - Line 34:44)
) {
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
throw new $TypeError('`O` is not an object');
}
if (typeof slot !== 'string') {
throw new $TypeError('`slot` must be a string');
}
var slots = channel.get(O);
ifnode_modules\imurmurhash\imurmurhash.js (Line 102:2 - Line 107:2), node_modules\imurmurhash\imurmurhash.js (Line 58:2 - Line 64:3)
) {
k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;
k1 = (k1 << 15) | (k1 >>> 17);
k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;
h1 ^= k1;
}node_modules\ignore\legacy.js (Line 8:2 - Line 15:41), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 7:2 - Line 14:9)
}
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
// A simple implementation of make-arraynode_modules\ignore\legacy.js (Line 32:15 - Line 43:7), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 40:6 - Line 51:7)
;
var SLASH = '/';
// Do not use ternary expression here, since "istanbul ignore next" is buggy
var TMP_KEY_IGNORE = 'node-ignore';
/* istanbul ignore else */
if (typeof Symbol !== 'undefined') {
TMP_KEY_IGNORE = Symbol["for"]('node-ignore');
}
var KEY_IGNORE = TMP_KEY_IGNORE;
var define = function define(object, key, value) {
returnnode_modules\ignore\legacy.js (Line 45:2 - Line 81:14), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 54:6 - Line 90:14)
;
};
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
var RETURN_FALSE = function RETURN_FALSE() {
return false;
};
// Sanitize the range of a regular expression
// The cases are complicated, see test cases for details
var sanitizeRange = function sanitizeRange(range) {
return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) {
return from.charCodeAt(0) <= to.charCodeAt(0) ? match
// Invalid range (out of order) which is ok for gitignore rules but
// fatal for JavaScript regular expression, so eliminate it.
: EMPTY;
});
};
// See fixtures #59
var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) {
var length = slashes.length;
return slashes.slice(0, length - length % 2);
};
// > If the pattern ends with a slash,
// > it is removed for the purpose of the following description,
// > but it would only find a match with a directory.
// > In other words, foo/ will match a directory foo and paths underneath it,
// > but will not match a regular file or a symbolic link foo
// > (this is consistent with the way how pathspec works in general in Git).
// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
// you could use option `mark: true` with `glob`
// '`foo/`' should not continue with the '`..`'
var REPLACERS = [[
// remove BOMnode_modules\ignore\legacy.js (Line 82:1 - Line 96:25), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 91:1 - Line 105:25)
// TODO:
// Other similar zero-width characters?
/^\uFEFF/, function () {
return EMPTY;
}],
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
[
// (a\ ) -> (a )
// (a ) -> (a)
// (a ) -> (a)
// (a \ ) -> (a )
/((?:\\\\)*?)(\\?\s+)$/, function (_, m1, m2) {
return m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY);
}],
// replace (\ ) with ' 'node_modules\ignore\legacy.js (Line 97:1 - Line 268:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 106:1 - Line 277:2)
// (\ ) -> ' '
// (\\ ) -> '\\ '
// (\\\ ) -> '\\ '
[/(\\+?)\s/g, function (_, m1) {
var length = m1.length;
return m1.slice(0, length - length % 2) + SPACE;
}],
// Escape metacharacters
// which is written down by users but means special for regular expressions.
// > There are 12 characters with special meanings:
// > - the backslash \,
// > - the caret ^,
// > - the dollar sign $,
// > - the period or dot .,
// > - the vertical bar or pipe symbol |,
// > - the question mark ?,
// > - the asterisk or star *,
// > - the plus sign +,
// > - the opening parenthesis (,
// > - the closing parenthesis ),
// > - and the opening square bracket [,
// > - the opening curly brace {,
// > These special characters are often called "metacharacters".
[/[\\$.|*+(){^]/g, function (match) {
return "\\".concat(match);
}], [
// > a question mark (?) matches a single character
/(?!\\)\?/g, function () {
return '[^/]';
}],
// leading slash
[
// > A leading slash matches the beginning of the pathname.
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
// A leading slash matches the beginning of the pathname
/^\//, function () {
return '^';
}],
// replace special metacharacter slash after the leading slash
[/\//g, function () {
return '\\/';
}], [
// > A leading "**" followed by a slash means match in all directories.
// > For example, "**/foo" matches file or directory "foo" anywhere,
// > the same as pattern "foo".
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
// > under directory "foo".
// Notice that the '*'s have been replaced as '\\*'
/^\^*\\\*\\\*\\\//,
// '**/foo' <-> 'foo'
function () {
return '^(?:.*\\/)?';
}],
// starting
[
// there will be no leading '/'
// (which has been replaced by section "leading slash")
// If starts with '**', adding a '^' to the regular expression also works
/^(?=[^^])/, function startingReplacer() {
// If has a slash `/` at the beginning or middle
return !/\/(?!$)/.test(this)
// > Prior to 2.22.1
// > If the pattern does not contain a slash /,
// > Git treats it as a shell glob pattern
// Actually, if there is only a trailing slash,
// git also treats it as a shell glob pattern
// After 2.22.1 (compatible but clearer)
// > If there is a separator at the beginning or middle (or both)
// > of the pattern, then the pattern is relative to the directory
// > level of the particular .gitignore file itself.
// > Otherwise the pattern may also match at any level below
// > the .gitignore level.
? '(?:^|\\/)'
// > Otherwise, Git treats the pattern as a shell glob suitable for
// > consumption by fnmatch(3)
: '^';
}],
// two globstars
[
// Use lookahead assertions so that we could match more than one `'/**'`
/\\\/\\\*\\\*(?=\\\/|$)/g,
// Zero, one or several directories
// should not use '*', or it will be replaced by the next replacer
// Check if it is not the last `'/**'`
function (_, index, str) {
return index + 6 < str.length
// case: /**/
// > A slash followed by two consecutive asterisks then a slash matches
// > zero or more directories.
// > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
// '/**/'
? '(?:\\/[^\\/]+)*'
// case: /**
// > A trailing `"/**"` matches everything inside.
// #21: everything inside but it should not include the current folder
: '\\/.+';
}],
// normal intermediate wildcards
[
// Never replace escaped '*'
// ignore rule '\*' will match the path '*'
// 'abc.*/' -> go
// 'abc.*' -> skip this rule,
// coz trailing single wildcard will be handed by [trailing wildcard]
/(^|[^\\]+)(\\\*)+(?=.+)/g,
// '*.js' matches '.js'
// '*.js' doesn't match 'abc'
function (_, p1, p2) {
// 1.
// > An asterisk "*" matches anything except a slash.
// 2.
// > Other consecutive asterisks are considered regular asterisks
// > and will match according to the previous rules.
var unescaped = p2.replace(/\\\*/g, '[^\\/]*');
return p1 + unescaped;
}], [
// unescape, revert step 3 except for back slash
// For example, if a user escape a '\\*',
// after step 3, the result will be '\\\\\\*'
/\\\\\\(?=[$.|*+(){^])/g, function () {
return ESCAPE;
}], [
// '\\\\' -> '\\'
/\\\\/g, function () {
return ESCAPE;
}], [
// > The range notation, e.g. [a-zA-Z],
// > can be used to match one of the characters in a range.
// `\` is escaped by step 3
/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) {
return leadEscape === ESCAPE
// '\\[bar]' -> '\\\\[bar\\]'
? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0
// A normal case, and it is a range notation
// '[bar]'
// '[bar\\\\]'
? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton
// '[bar\\]' -> '[bar\\\\]'
: '[]' : '[]';
}],
// ending
[
// 'js' will not match 'js.'
// 'ab' will not match 'abc'
/(?:[^*])$/,
// WTF!
// https://git-scm.com/docs/gitignore
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
// which re-fixes #24, #38
// > If there is a separator at the end of the pattern then the pattern
// > will only match directories, otherwise the pattern can match both
// > files and directories.
// 'js*' will not match 'a.js'
// 'js/' will not match 'a.js'
// 'js' will match 'a.js' and 'a.js/'
function (match) {
return /\/$/.test(match)
// foo/ will not match 'foo'
? "".concat(match, "$") // foo matches 'foo' and 'foo/'
: "".concat(match, "(?=$|\\/$)");
}],node_modules\ignore\legacy.js (Line 291:2 - Line 297:11), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 307:2 - Line 313:2)
REPLACERS.reduce(function (prev, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
matcher = _ref2[0],
replacer = _ref2[1];
return prev.replace(matcher, replacer.bind(pattern));
}, pattern);
regexCachenode_modules\ignore\legacy.js (Line 299:7 - Line 313:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 312:8 - Line 326:2)
);
};
var isString = function isString(subject) {
return typeof subject === 'string';
};
// > A blank line matches no files, so it can serve as a separator for readability.
var checkPattern = function checkPattern(pattern) {
return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
// > A line starting with # serves as a comment.
&& pattern.indexOf('#') !== 0;
};
var splitPattern = function splitPattern(pattern) {
return pattern.split(REGEX_SPLITALL_CRLF);node_modules\ignore\legacy.js (Line 340:2 - Line 354:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 475:2 - Line 489:34)
;
var throwError = function throwError(message, Ctor) {
throw new Ctor(message);
};
var checkPath = function checkPath(path, originalPath, doThrow) {
if (!isString(path)) {
return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError);
}
// We don't know if we should ignore EMPTY, so throw
if (!path) {
return doThrow("path must not be empty", TypeError);
}
/node_modules\ignore\legacy.js (Line 355:3 - Line 365:10), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 490:3 - Line 501:55)
if (checkPath.isNotRelative(path)) {
var r = '`path.relative()`d';
return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError);
}
return true;
};
var isNotRelative = function isNotRelative(path) {
return REGEX_TEST_INVALID_PATH.test(path);
};
checkPath.isNotRelative = isNotRelative;
checkPathnode_modules\ignore\legacy.js (Line 399:2 - Line 411:12), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 409:2 - Line 421:5)
pattern)) {
var rule = createRule(pattern, this._ignoreCase);
this._added = true;
this._rules.push(rule);
}
}
// @param {Array<string> | string | Ignore} pattern
}, {
key: "add",
value: function add(pattern) {
this._added = false;
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPatternnode_modules\ignore\legacy.js (Line 499:15 - Line 535:8), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 608:12 - Line 645:27)
);
}
}, {
key: "ignores",
value: function ignores(path) {
return this._test(path, this._ignoreCache, false).ignored;
}
}, {
key: "createFilter",
value: function createFilter() {
var _this = this;
return function (path) {
return !_this.ignores(path);
};
}
}, {
key: "filter",
value: function filter(paths) {
return makeArray(paths).filter(this.createFilter());
}
// @returns {TestResult}
}, {
key: "test",
value: function test(path) {
return this._test(path, this._testCache, true);
}
}]);
return Ignore;
}();
var factory = function factory(options) {
return new Ignore(options);
};
var isPathValid = function isPathValid(path) {
return checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
};
factorynode_modules\ignore\legacy.js (Line 546:2 - Line 555:31), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\legacy.js (Line 646:2 - Line 655:33)
) {
/* eslint no-control-regex: "off" */
var makePosix = function makePosix(str) {
return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/');
};
checkPath.convert = makePosix;
// 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/'
// 'd:\\foo'
var REGIX_IS_WINDOWS_PATH_ABSOLUTEnode_modules\ignore\index.js (Line 36:1 - Line 71:14), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 45:1 - Line 80:14)
const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g
const RETURN_FALSE = () => false
// Sanitize the range of a regular expression
// The cases are complicated, see test cases for details
const sanitizeRange = range => range.replace(
REGEX_REGEXP_RANGE,
(match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)
? match
// Invalid range (out of order) which is ok for gitignore rules but
// fatal for JavaScript regular expression, so eliminate it.
: EMPTY
)
// See fixtures #59
const cleanRangeBackSlash = slashes => {
const {length} = slashes
return slashes.slice(0, length - length % 2)
}
// > If the pattern ends with a slash,
// > it is removed for the purpose of the following description,
// > but it would only find a match with a directory.
// > In other words, foo/ will match a directory foo and paths underneath it,
// > but will not match a regular file or a symbolic link foo
// > (this is consistent with the way how pathspec works in general in Git).
// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
// you could use option `mark: true` with `glob`
// '`foo/`' should not continue with the '`..`'
const REPLACERS = [
[
// remove BOMnode_modules\ignore\index.js (Line 72:5 - Line 92:25), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 81:5 - Line 101:25)
// TODO:
// Other similar zero-width characters?
/^\uFEFF/,
() => EMPTY
],
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
[
// (a\ ) -> (a )
// (a ) -> (a)
// (a ) -> (a)
// (a \ ) -> (a )
/((?:\\\\)*?)(\\?\s+)$/,
(_, m1, m2) => m1 + (
m2.indexOf('\\') === 0
? SPACE
: EMPTY
)
],
// replace (\ ) with ' 'node_modules\ignore\index.js (Line 93:3 - Line 296:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 102:3 - Line 306:2)
// (\ ) -> ' '
// (\\ ) -> '\\ '
// (\\\ ) -> '\\ '
[
/(\\+?)\s/g,
(_, m1) => {
const {length} = m1
return m1.slice(0, length - length % 2) + SPACE
}
],
// Escape metacharacters
// which is written down by users but means special for regular expressions.
// > There are 12 characters with special meanings:
// > - the backslash \,
// > - the caret ^,
// > - the dollar sign $,
// > - the period or dot .,
// > - the vertical bar or pipe symbol |,
// > - the question mark ?,
// > - the asterisk or star *,
// > - the plus sign +,
// > - the opening parenthesis (,
// > - the closing parenthesis ),
// > - and the opening square bracket [,
// > - the opening curly brace {,
// > These special characters are often called "metacharacters".
[
/[\\$.|*+(){^]/g,
match => `\\${match}`
],
[
// > a question mark (?) matches a single character
/(?!\\)\?/g,
() => '[^/]'
],
// leading slash
[
// > A leading slash matches the beginning of the pathname.
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
// A leading slash matches the beginning of the pathname
/^\//,
() => '^'
],
// replace special metacharacter slash after the leading slash
[
/\//g,
() => '\\/'
],
[
// > A leading "**" followed by a slash means match in all directories.
// > For example, "**/foo" matches file or directory "foo" anywhere,
// > the same as pattern "foo".
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
// > under directory "foo".
// Notice that the '*'s have been replaced as '\\*'
/^\^*\\\*\\\*\\\//,
// '**/foo' <-> 'foo'
() => '^(?:.*\\/)?'
],
// starting
[
// there will be no leading '/'
// (which has been replaced by section "leading slash")
// If starts with '**', adding a '^' to the regular expression also works
/^(?=[^^])/,
function startingReplacer () {
// If has a slash `/` at the beginning or middle
return !/\/(?!$)/.test(this)
// > Prior to 2.22.1
// > If the pattern does not contain a slash /,
// > Git treats it as a shell glob pattern
// Actually, if there is only a trailing slash,
// git also treats it as a shell glob pattern
// After 2.22.1 (compatible but clearer)
// > If there is a separator at the beginning or middle (or both)
// > of the pattern, then the pattern is relative to the directory
// > level of the particular .gitignore file itself.
// > Otherwise the pattern may also match at any level below
// > the .gitignore level.
? '(?:^|\\/)'
// > Otherwise, Git treats the pattern as a shell glob suitable for
// > consumption by fnmatch(3)
: '^'
}
],
// two globstars
[
// Use lookahead assertions so that we could match more than one `'/**'`
/\\\/\\\*\\\*(?=\\\/|$)/g,
// Zero, one or several directories
// should not use '*', or it will be replaced by the next replacer
// Check if it is not the last `'/**'`
(_, index, str) => index + 6 < str.length
// case: /**/
// > A slash followed by two consecutive asterisks then a slash matches
// > zero or more directories.
// > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
// '/**/'
? '(?:\\/[^\\/]+)*'
// case: /**
// > A trailing `"/**"` matches everything inside.
// #21: everything inside but it should not include the current folder
: '\\/.+'
],
// normal intermediate wildcards
[
// Never replace escaped '*'
// ignore rule '\*' will match the path '*'
// 'abc.*/' -> go
// 'abc.*' -> skip this rule,
// coz trailing single wildcard will be handed by [trailing wildcard]
/(^|[^\\]+)(\\\*)+(?=.+)/g,
// '*.js' matches '.js'
// '*.js' doesn't match 'abc'
(_, p1, p2) => {
// 1.
// > An asterisk "*" matches anything except a slash.
// 2.
// > Other consecutive asterisks are considered regular asterisks
// > and will match according to the previous rules.
const unescaped = p2.replace(/\\\*/g, '[^\\/]*')
return p1 + unescaped
}
],
[
// unescape, revert step 3 except for back slash
// For example, if a user escape a '\\*',
// after step 3, the result will be '\\\\\\*'
/\\\\\\(?=[$.|*+(){^])/g,
() => ESCAPE
],
[
// '\\\\' -> '\\'
/\\\\/g,
() => ESCAPE
],
[
// > The range notation, e.g. [a-zA-Z],
// > can be used to match one of the characters in a range.
// `\` is escaped by step 3
/(\\)?\[([^\]/]*?)(\\*)($|\])/g,
(match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE
// '\\[bar]' -> '\\\\[bar\\]'
? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`
: close === ']'
? endEscape.length % 2 === 0
// A normal case, and it is a range notation
// '[bar]'
// '[bar\\\\]'
? `[${sanitizeRange(range)}${endEscape}]`
// Invalid range notaton
// '[bar\\]' -> '[bar\\\\]'
: '[]'
: '[]'
],
// ending
[
// 'js' will not match 'js.'
// 'ab' will not match 'abc'
/(?:[^*])$/,
// WTF!
// https://git-scm.com/docs/gitignore
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
// which re-fixes #24, #38
// > If there is a separator at the end of the pattern then the pattern
// > will only match directories, otherwise the pattern can match both
// > files and directories.
// 'js*' will not match 'a.js'
// 'js/' will not match 'a.js'
// 'js' will match 'a.js' and 'a.js/'
match => /\/$/.test(match)
// foo/ will not match 'foo'
? `${match}$`
// foo matches 'foo' and 'foo/'
: `${match}(?=$|\\/$)`
],node_modules\ignore\index.js (Line 341:1 - Line 354:6), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 353:1 - Line 366:2)
const isString = subject => typeof subject === 'string'
// > A blank line matches no files, so it can serve as a separator for readability.
const checkPattern = pattern => pattern
&& isString(pattern)
&& !REGEX_TEST_BLANK_LINE.test(pattern)
&& !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
// > A line starting with # serves as a comment.
&& pattern.indexOf('#') !== 0
const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)
classnode_modules\ignore\index.js (Line 394:1 - Line 428:10), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 554:1 - Line 589:55)
}
const throwError = (message, Ctor) => {
throw new Ctor(message)
}
const checkPath = (path, originalPath, doThrow) => {
if (!isString(path)) {
return doThrow(
`path must be a string, but got \`${originalPath}\``,
TypeError
)
}
// We don't know if we should ignore EMPTY, so throw
if (!path) {
return doThrow(`path must not be empty`, TypeError)
}
// Check if it is a relative path
if (checkPath.isNotRelative(path)) {
const r = '`path.relative()`d'
return doThrow(
`path should be a ${r} string, but got "${originalPath}"`,
RangeError
)
}
return true
}
const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)
checkPath.isNotRelative = isNotRelative
checkPathnode_modules\ignore\index.js (Line 457:2 - Line 472:12), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 475:2 - Line 490:5)
pattern)) {
const rule = createRule(pattern, this._ignoreCase)
this._added = true
this._rules.push(rule)
}
}
// @param {Array<string> | string | Ignore} pattern
add (pattern) {
this._added = false
makeArray(
isString(pattern)
? splitPattern(pattern)
: pattern
).forEach(this._addPatternnode_modules\ignore\index.js (Line 578:15 - Line 604:8), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\index.js (Line 716:12 - Line 742:27)
)
}
ignores (path) {
return this._test(path, this._ignoreCache, false).ignored
}
createFilter () {
return path => !this.ignores(path)
}
filter (paths) {
return makeArray(paths).filter(this.createFilter())
}
// @returns {TestResult}
test (path) {
return this._test(path, this._testCache, true)
}
}
const factory = options => new Ignore(options)
const isPathValid = path =>
checkPath(path && checkPath.convert(path), path, RETURN_FALSE)
factorynode_modules\http-parser-js\http-parser.js (Line 439:2 - Line 446:12), node_modules\http-parser-js\http-parser.js (Line 396:2 - Line 403:6)
= function () {
var length = Math.min(this.end - this.offset, this.body_bytes);
// 0, length are for backwards compatibility. See: https://github.com/creationix/http-parser-js/pull/98
this.userCall()(this[kOnBody](this.chunk.slice(this.offset, this.offset + length), 0, length));
this.offset += length;
this.body_bytes -= length;
if (!this.body_bytes) {
this.nextRequestnode_modules\has-symbols\shams.js (Line 10:2 - Line 18:71), node_modules\object.assign\hasSymbols.js (Line 9:2 - Line 22:5)
var obj = {};
var sym = Symbol('test');
var symObj = Object(sym);
if (typeof sym === 'string') { return false; }
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
// temp disabled per https://github.com/ljharb/object.assign/issues/17node_modules\has-symbols\shams.js (Line 29:2 - Line 39:44), node_modules\object.assign\hasSymbols.js (Line 28:2 - Line 38:4)
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
var syms = Object.getOwnPropertySymbols(obj);
if (syms.length !== 1 || syms[0] !== sym) { return false; }
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
if (typeof Object.getOwnPropertyDescriptor === 'function') {
// eslint-disable-next-line no-extra-parensnode_modules\glob-parent\index.js (Line 16:1 - Line 25:12), node_modules\fast-glob\node_modules\glob-parent\index.js (Line 19:1 - Line 28:10)
module.exports = function globParent(str, opts) {
var options = Object.assign({ flipBackslashes: true }, opts);
// flip windows path separators
if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
str = str.replace(backslash, slash);
}
// special case for strings ending in enclosure containing path separator
if (isEnclosurenode_modules\flatted\index.js (Line 4:3 - Line 14:46), node_modules\@babel\runtime\helpers\esm\typeof.js (Line 1:1 - Line 10:7)
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/// <reference types="../types/index.d.ts" />node_modules\flatted\index.js (Line 46:2 - Line 52:4), node_modules\flatted\esm\index.js (Line 34:2 - Line 42:4)
k,
a: [input, parsed, tmp, $]
});
} else output[k] = $.call(output, k, tmp);
} else if (output[k] !== ignore) output[k] = $.call(output, k, value);
}
for (varnode_modules\flatted\index.js (Line 99:2 - Line 110:4), node_modules\flatted\esm\index.js (Line 86:2 - Line 97:6)
firstRun = !i;
while (i < input.length) {
firstRun = true;
output[i] = $stringify(input[i++], replace, space);
}
return '[' + output.join(',') + ']';
function replace(key, value) {
if (firstRun) {
firstRun = !firstRun;
return value;
}
varnode_modules\find-up\index.js (Line 67:2 - Line 85:7), node_modules\find-up\index.js (Line 29:2 - Line 47:5)
runMatcher({...options, cwd: directory});
if (foundPath === stop) {
return;
}
if (foundPath) {
return path.resolve(directory, foundPath);
}
if (directory === root) {
return;
}
directory = path.dirname(directory);
}
};
module.exports.existsnode_modules\fastq\queue.js (Line 135:2 - Line 145:10), node_modules\fastq\queue.js (Line 111:2 - Line 121:10)
(value, done) {
var current = cache.get()
current.context = context
current.release = release
current.value = value
current.callback = done || noop
current.errorHandler = errorHandler
if (_running >= _concurrency || self.paused) {
if (queueHeadnode_modules\fast-levenshtein\levenshtein.js (Line 89:2 - Line 112:7), node_modules\fast-levenshtein\levenshtein.js (Line 57:2 - Line 80:5)
;
nextCol = prevRow[j] + (strCmp ? 0 : 1);
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// deletion
tmp = prevRow[j + 1] + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// copy current col value into previous (in preparation for next iteration)
prevRow[j] = curCol;
}
// copy last col value into previous (in preparation for next iteration)
prevRow[j] = nextCol;
}
}
returnnode_modules\fast-json-stable-stringify\index.js (Line 6:6 - Line 19:5), node_modules\json-stable-stringify-without-jsonify\index.js (Line 7:2 - Line 20:7)
;
var cmp = opts.cmp && (function (f) {
return function (node) {
return function (a, b) {
var aobj = { key: a, value: node[a] };
var bobj = { key: b, value: node[b] };
return f(aobj, bobj);
};
};
})(opts.cmp);
var seen = [];
return (function stringify (nodenode_modules\fast-deep-equal\react.js (Line 7:1 - Line 24:2), node_modules\fast-deep-equal\es6\react.js (Line 9:1 - Line 25:2)
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if (anode_modules\fast-deep-equal\react.js (Line 18:2 - Line 53:2), node_modules\fast-deep-equal\es6\react.js (Line 45:2 - Line 79:2)
) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (key === '_owner' && a.$$typeof) {
// React-specific: avoid traversing React elements' _owner.
// _owner contains circular references
// and is not needed when comparing the actual elements (and not their owners)
continue;
}
if (!equal(a[key], b[key])) return false;
}
return true;
}
// true if both NaN, false otherwise
return a!==a && b!==b;
};node_modules\fast-deep-equal\index.js (Line 1:1 - Line 46:2), node_modules\fast-deep-equal\react.js (Line 1:1 - Line 72:2)
'use strict';
// do not edit .js files directly - edit src/index.jst
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (!equal(a[key], b[key])) return false;
}
return true;
}
// true if both NaN, false otherwise
return a!==a && b!==b;
};node_modules\estraverse\estraverse.js (Line 626:13 - Line 650:11), node_modules\estraverse\estraverse.js (Line 463:17 - Line 488:27)
nodeType = node.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node);
} else {
throw new Error('Unknown node type ' + nodeType + '.');
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isPropertynode_modules\estraverse\estraverse.js (Line 773:17 - Line 791:7), node_modules\estraverse\estraverse.js (Line 740:16 - Line 758:7)
.push(comment);
comments.splice(cursor, 1);
} else {
cursor += 1;
}
}
// already out of owned node
if (cursor === comments.length) {
return VisitorOption.Break;
}
if (comments[cursor].extendedRange[0] > node.range[1]) {
return VisitorOption.Skip;
}
}
});
returnnode_modules\espree\espree.js (Line 81:4 - Line 109:7), node_modules\espree\dist\espree.cjs (Line 838:2 - Line 866:9)
(), espree());
}
return this._jsx;
},
get(options) {
const useJsx = Boolean(
options &&
options.ecmaFeatures &&
options.ecmaFeatures.jsx
);
return useJsx ? this.jsx : this.regular;
}
};
//------------------------------------------------------------------------------
// Tokenizer
//------------------------------------------------------------------------------
/**
* Tokenizes the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {Token[]} An array of tokens.
* @throws {SyntaxError} If the input code is invalid.
* @private
*/
exportnode_modules\espree\espree.js (Line 109:2 - Line 131:7), node_modules\espree\dist\espree.cjs (Line 866:1 - Line 888:9)
function tokenize(code, options) {
const Parser = parsers.get(options);
// Ensure to collect tokens.
if (!options || options.tokens !== true) {
options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign -- stylistic choice
}
return new Parser(options, code).tokenize();
}
//------------------------------------------------------------------------------
// Parser
//------------------------------------------------------------------------------
/**
* Parses the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {ASTNode} The "Program" AST node.
* @throws {SyntaxError} If the input code is invalid.
*/
exportnode_modules\espree\espree.js (Line 151:2 - Line 172:7), node_modules\espree\dist\espree.cjs (Line 908:1 - Line 929:6)
const Syntax = (function() {
let key,
types = {};
if (typeof Object.create === "function") {
types = Object.create(null);
}
for (key in VisitorKeys) {
if (Object.hasOwn(VisitorKeys, key)) {
types[key] = key;
}
}
if (typeof Object.freeze === "function") {
Object.freeze(types);
}
return types;
}());
exportnode_modules\esbuild\install.js (Line 1:1 - Line 25:28), node_modules\typescript\lib\_typingsInstaller.js (Line 17:1 - Line 48:4)
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// lib/npm/node-platform.tsnode_modules\color-convert\index.js (Line 30:12 - Line 42:6), node_modules\color-convert\index.js (Line 8:8 - Line 19:7)
(fn) {
const wrappedFn = function (...args) {
const arg0 = args[0];
if (arg0 === undefined || arg0 === null) {
return arg0;
}
if (arg0.length > 1) {
args = arg0;
}
constnode_modules\color-convert\conversions.js (Line 443:2 - Line 462:4), node_modules\color-convert\conversions.js (Line 225:2 - Line 244:4)
let x = xyz[0];
let y = xyz[1];
let z = xyz[2];
x /= 95.047;
y /= 100;
z /= 108.883;
x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
const l = (116 * y) - 16;
const a = 500 * (x - y);
const b = 200 * (y - z);
return [l, a, b];
};
convert.labnode_modules\classnames\dedupe.js (Line 104:2 - Line 115:2), node_modules\classnames\index.js (Line 66:2 - Line 77:2)
if (typeof module !== 'undefined' && module.exports) {
classNames.default = classNames;
module.exports = classNames;
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
// register as 'classnames', consistent with npm package name
define('classnames', [], function () {
return classNames;
});
} else {
window.classNames = classNames;
}
}());node_modules\classnames\bind.js (Line 1:1 - Line 19:11), node_modules\classnames\index.js (Line 1:1 - Line 19:11)
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames () {
var classes = '';
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (arg) {
classes = appendClass(classes, parseValuenode_modules\classnames\bind.js (Line 36:5 - Line 47:5), node_modules\classnames\index.js (Line 36:5 - Line 47:4)
, arg);
}
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
return arg.toString();
}
var classes = '';
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes = appendClass(classes, thisnode_modules\classnames\bind.js (Line 47:2 - Line 77:2), node_modules\classnames\index.js (Line 47:2 - Line 77:2)
key);
}
}
return classes;
}
function appendClass (value, newClass) {
if (!newClass) {
return value;
}
if (value) {
return value + ' ' + newClass;
}
return value + newClass;
}
if (typeof module !== 'undefined' && module.exports) {
classNames.default = classNames;
module.exports = classNames;
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
// register as 'classnames', consistent with npm package name
define('classnames', [], function () {
return classNames;
});
} else {
window.classNames = classNames;
}
}());node_modules\brace-expansion\index.js (Line 2:1 - Line 82:9), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\index.js (Line 1:1 - Line 81:8)
var balanced = require('balanced-match');
module.exports = expandTop;
var escSlash = '\0SLASH'+Math.random()+'\0';
var escOpen = '\0OPEN'+Math.random()+'\0';
var escClose = '\0CLOSE'+Math.random()+'\0';
var escComma = '\0COMMA'+Math.random()+'\0';
var escPeriod = '\0PERIOD'+Math.random()+'\0';
function numeric(str) {
return parseInt(str, 10) == str
? parseInt(str, 10)
: str.charCodeAt(0);
}
function escapeBraces(str) {
return str.split('\\\\').join(escSlash)
.split('\\{').join(escOpen)
.split('\\}').join(escClose)
.split('\\,').join(escComma)
.split('\\.').join(escPeriod);
}
function unescapeBraces(str) {
return str.split(escSlash).join('\\')
.split(escOpen).join('{')
.split(escClose).join('}')
.split(escComma).join(',')
.split(escPeriod).join('.');
}
// Basically just str.split(","), but handling cases
// where we have nested braced sections, which should be
// treated as individual members, like {a,{b,c},d}
function parseCommaParts(str) {
if (!str)
return [''];
var parts = [];
var m = balanced('{', '}', str);
if (!m)
return str.split(',');
var pre = m.pre;
var body = m.body;
var post = m.post;
var p = pre.split(',');
p[p.length-1] += '{' + body + '}';
var postParts = parseCommaParts(post);
if (post.length) {
p[p.length-1] += postParts.shift();
p.push.apply(p, postParts);
}
parts.push.apply(parts, p);
return parts;
}
function expandTop(str) {
if (!str)
return [];
// I don't know why Bash 4.3 does this, but it does.
// Anything starting with {} will have the first two bytes preserved
// but *only* at the top level, so {},a}b will not expand to anything,
// but a{},b}c will be expanded to [a}c,abc].
// One could argue that this is a bug in Bash, but since the goal of
// this module is to match Bash's rules, we escape a leading {}
if (str.substr(0, 2) === '{}') {
str = '\\{\\}' + str.substr(2);
}
return expand(escapeBraces(str), true).map(unescapeBraces);
}
function identitynode_modules\brace-expansion\index.js (Line 83:2 - Line 104:3), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\index.js (Line 78:2 - Line 99:2)
;
}
function embrace(str) {
return '{' + str + '}';
}
function isPadded(el) {
return /^-?0\d/.test(el);
}
function lte(i, y) {
return i <= y;
}
function gte(i, y) {
return i >= y;
}
function expand(str, isTop) {
var expansions = [];
var m = balanced('{', '}', str);
if (!m ||node_modules\brace-expansion\index.js (Line 106:3 - Line 128:4), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\index.js (Line 113:5 - Line 135:7)
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(',') >= 0;
if (!isSequence && !isOptions) {
// {a},b}
if (m.post.match(/,(?!,).*\}/)) {
str = m.pre + '{' + m.body + escClose + m.post;
return expand(str);
}
return [str];
}
var n;
if (isSequence) {
n = m.body.split(/\.\./);
} else {
n = parseCommaParts(m.body);
if (n.length === 1) {
// x{{a,b}}y ==> x{a}y x{b}y
n = expand(n[0], false).map(embrace);
if (n.length === 1) {
varnode_modules\brace-expansion\index.js (Line 147:3 - Line 188:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\index.js (Line 144:5 - Line 185:2)
var N;
if (isSequence) {
var x = numeric(n[0]);
var y = numeric(n[1]);
var width = Math.max(n[0].length, n[1].length)
var incr = n.length == 3
? Math.abs(numeric(n[2]))
: 1;
var test = lte;
var reverse = y < x;
if (reverse) {
incr *= -1;
test = gte;
}
var pad = n.some(isPadded);
N = [];
for (var i = x; test(i, y); i += incr) {
var c;
if (isAlphaSequence) {
c = String.fromCharCode(i);
if (c === '\\')
c = '';
} else {
c = String(i);
if (pad) {
var need = width - c.length;
if (need > 0) {
var z = new Array(need + 1).join('0');
if (i < 0)
c = '-' + z + c.slice(1);
else
c = z + c;
}
}
}
N.push(c);
}
} else {
N = concatMapnode_modules\brace-expansion\index.js (Line 189:3 - Line 199:7), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\index.js (Line 190:5 - Line 199:2)
}
for (var j = 0; j < N.length; j++) {
for (var k = 0; k < post.length; k++) {
var expansion = pre + N[j] + post[k];
if (!isTop || isSequence || expansion)
expansions.push(expansion);
}
}
returnnode_modules\asynckit\bench.js (Line 48:9 - Line 66:17), node_modules\asynckit\bench.js (Line 26:4 - Line 44:2)
(source,
function(i, cb)
{
setImmediate(function()
{
total += i;
cb(null, total);
});
},
function(err, result)
{
assert.ifError(err);
assert.equal(result[result.length - 1], expected);
deferred.resolve();
});
}, {'defer': true})
// add listenersnode_modules\array.prototype.tosorted\index.js (Line 1:1 - Line 11:2), node_modules\object.groupby\index.js (Line 1:1 - Line 11:2)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var bound = callBind(polyfill)node_modules\array.prototype.flatmap\index.js (Line 1:1 - Line 11:13), node_modules\object.groupby\index.js (Line 1:1 - Line 11:6)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var boundFlatMapnode_modules\array.prototype.flat\index.js (Line 1:1 - Line 11:10), node_modules\object.groupby\index.js (Line 1:1 - Line 11:6)
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var boundFlatnode_modules\array.prototype.findlast\index.js (Line 5:22 - Line 17:9), node_modules\array.prototype.findlastindex\index.js (Line 5:13 - Line 17:14)
);
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var $slice = callBound('Array.prototype.slice');
var bound = callBind.apply(polyfill);
// eslint-disable-next-line no-unused-vars
var boundFindLast = function findLastnode_modules\array.prototype.findlast\index.js (Line 17:9 - Line 28:2), node_modules\array.prototype.findlastindex\index.js (Line 17:14 - Line 28:2)
(array, predicate) {
RequireObjectCoercible(array);
return bound(array, $slice(arguments, 1));
};
define(boundFindLast, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundFindLast;node_modules\array.prototype.findlast\implementation.js (Line 1:1 - Line 13:9), node_modules\array.prototype.findlastindex\implementation.js (Line 1:1 - Line 13:14)
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var Get = require('es-abstract/2024/Get');
var IsCallable = require('es-abstract/2024/IsCallable');
var LengthOfArrayLike = require('es-abstract/2024/LengthOfArrayLike');
var ToBoolean = require('es-abstract/2024/ToBoolean');
var ToObject = require('es-object-atoms/ToObject');
var ToString = require('es-abstract/2024/ToString');
module.exports = function findLastnode_modules\array.prototype.findlast\implementation.js (Line 13:9 - Line 32:7), node_modules\array.prototype.findlastindex\implementation.js (Line 13:14 - Line 32:2)
(predicate) {
var O = ToObject(this);
var len = LengthOfArrayLike(O);
if (!IsCallable(predicate)) {
throw new $TypeError('predicate must be a function');
}
var thisArg;
if (arguments.length > 1) {
thisArg = arguments[1];
}
var k = len - 1;
while (k >= 0) {
var Pk = ToString(k);
var kValue = Get(O, Pk);
var testResult = ToBoolean(Call(predicate, thisArg, [kValue, k, O]));
if (testResult) {
return kValueeslint.config.js (Line 86:7 - Line 108:33), eslint.config.js (Line 36:7 - Line 58:41)
import: importPlugin,
react: reactPlugin,
'react-hooks': reactHooksPlugin,
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
pathGroups: [
{ pattern: 'react', group: 'external', position: 'before' },
{ pattern: '{components,constants,context,hooks,pages,services,types}/**', group: 'internal' },
],
pathGroupsExcludedImportTypes: ['react'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
// Formatting rules for JS filestypescript
node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\index.d.ts (Line 1:1 - Line 94:36), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\index.d.ts (Line 1:1 - Line 94:36)
import { AST } from './ast.js';
type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
export interface MinimatchOptions {
nobrace?: boolean;
nocomment?: boolean;
nonegate?: boolean;
debug?: boolean;
noglobstar?: boolean;
noext?: boolean;
nonull?: boolean;
windowsPathsNoEscape?: boolean;
allowWindowsEscape?: boolean;
partial?: boolean;
dot?: boolean;
nocase?: boolean;
nocaseMagicOnly?: boolean;
magicalBraces?: boolean;
matchBase?: boolean;
flipNegate?: boolean;
preserveMultipleSlashes?: boolean;
optimizationLevel?: number;
platform?: Platform;
windowsNoMagicRoot?: boolean;
}
export declare const minimatch: {
(p: string, pattern: string, options?: MinimatchOptions): boolean;
sep: Sep;
GLOBSTAR: typeof GLOBSTAR;
filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
defaults: (def: MinimatchOptions) => typeof minimatch;
braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
AST: typeof AST;
Minimatch: typeof Minimatch;
escape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, "windowsPathsNoEscape">) => string;
};
type Sep = '\\' | '/';
export declare const sep: Sep;
export declare const GLOBSTAR: unique symbol;
export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
export type MMRegExp = RegExp & {
_src?: string;
_glob?: string;
};
export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
export type ParseReturn = ParseReturnFiltered | false;
export declare class Minimatch {
options: MinimatchOptions;
set: ParseReturnFiltered[][];
pattern: string;
windowsPathsNoEscape: boolean;
nonegate: boolean;
negate: boolean;
comment: boolean;
empty: boolean;
preserveMultipleSlashes: boolean;
partial: boolean;
globSet: string[];
globParts: string[][];
nocase: boolean;
isWindows: boolean;
platform: Platform;
windowsNoMagicRoot: boolean;
regexp: false | null | MMRegExp;
constructor(pattern: string, options?: MinimatchOptions);
hasMagic(): boolean;
debug(..._: any[]): void;
make(): void;
preprocess(globParts: string[][]): string[][];
adjascentGlobstarOptimize(globParts: string[][]): string[][];
levelOneOptimize(globParts: string[][]): string[][];
levelTwoFileOptimize(parts: string | string[]): string[];
firstPhasePreProcess(globParts: string[][]): string[][];
secondPhasePreProcess(globParts: string[][]): string[][];
partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
parseNegate(): void;
matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
braceExpand(): string[];
parse(pattern: string): ParseReturn;
makeRe(): false | MMRegExp;
slashSplit(p: string): string[];
match(f: string, partial?: boolean): boolean;
static defaults(def: MinimatchOptions): typeof Minimatch;
}
export { AST } from './ast.js';
export { escape } from './escape.js';
export { unescape } from './unescape.js';
//# sourceMappingURL=index.d.ts.mapnode_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\commonjs\ast.d.ts (Line 1:1 - Line 20:34), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\dist\esm\ast.d.ts (Line 1:1 - Line 20:34)
import { MinimatchOptions, MMRegExp } from './index.js';
export type ExtglobType = '!' | '?' | '+' | '*' | '@';
export declare class AST {
#private;
type: ExtglobType | null;
constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
get hasMagic(): boolean | undefined;
toString(): string;
push(...parts: (string | AST)[]): void;
toJSON(): any[];
isStart(): boolean;
isEnd(): boolean;
copyIn(part: AST | string): void;
clone(parent: AST): AST;
static fromGlob(pattern: string, options?: MinimatchOptions): AST;
toMMPattern(): MMRegExp | string;
get options(): MinimatchOptions;
toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
}
//# sourceMappingURL=ast.d.ts.mapnode_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.d.cts (Line 1:1 - Line 28:2), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\dist\retrier.d.ts (Line 1:1 - Line 28:2)
/**
* A class that manages a queue of retry jobs.
*/
export class Retrier {
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
*/
constructor(check: Function, { timeout, maxDelay }?: {
timeout?: number | undefined;
maxDelay?: number | undefined;
} | undefined);
/**
* Adds a new retry job to the queue.
* @param {Function} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<any>} A promise that resolves when the queue is
* processed.
*/
retry(fn: Function, { signal }?: {
signal?: AbortSignal | undefined;
} | undefined): Promise<any>;
#private;
}node_modules\react-router\dist\production\lib\types\internal.d.mts (Line 3:30 - Line 160:2), node_modules\react-router\dist\production\lib\types\internal.d.ts (Line 2:29 - Line 159:2)
;
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo> = {
params: T["params"];
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
};
type CreateErrorBoundaryProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
unstable_MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
unstable_ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info>;
ComponentProps: CreateComponentProps<Info>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };node_modules\react-router\dist\development\lib\types\internal.d.ts (Line 1:1 - Line 159:2), node_modules\react-router\dist\production\lib\types\internal.d.ts (Line 1:1 - Line 159:2)
import { R as RouteModule, L as LinkDescriptor, a as Location, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, D as DataStrategyResult, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-rOzWJJ9x.js';
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.js';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo> = {
params: T["params"];
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
};
type CreateErrorBoundaryProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
unstable_MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
unstable_ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info>;
ComponentProps: CreateComponentProps<Info>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };node_modules\react-router\dist\development\lib\types\internal.d.mts (Line 1:1 - Line 160:2), node_modules\react-router\dist\production\lib\types\internal.d.mts (Line 1:1 - Line 159:2)
import { R as RouteModule, L as LinkDescriptor, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, C as ClientDataFunctionArgs, a as ServerDataFrom, N as Normalize, b as GetActionData } from '../../route-data-DAVP2QQ0.mjs';
import { L as Location, b as unstable_MiddlewareNextFunction, D as DataStrategyResult } from '../../context-jKip1TFB.mjs';
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.mjs';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo> = {
params: T["params"];
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
};
type CreateErrorBoundaryProps<T extends RouteInfo> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
loaderData?: T["loaderData"];
actionData?: T["actionData"];
};
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
unstable_MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
unstable_ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info>;
ComponentProps: CreateComponentProps<Info>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked-only.d.ts (Line 34:38 - Line 59:36), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked.d.ts (Line 66:46 - Line 91:44)
: "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNullish: boolean;
allowNumberAndString: boolean;
allowRegExp: boolean;
}];
'@typescript-eslint/restrict-template-expressions': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNever: boolean;
allowNullish: boolean;
allowNumber: boolean;
allowRegExp: boolean;
}];
'no-return-await': "off";
'@typescript-eslint/return-await': ["error", string];
'@typescript-eslint/unbound-method'node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked.d.ts (Line 27:52 - Line 41:45), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked.d.ts (Line 45:52 - Line 59:25)
: "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types'node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\all.d.ts (Line 87:46 - Line 102:46), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked.d.ts (Line 39:46 - Line 54:43)
: "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-type-assertion'node_modules\@types\react\ts5.0\v18\ts5.0\jsx-dev-runtime.d.ts (Line 1:1 - Line 15:7), node_modules\@types\react\ts5.0\v18\ts5.0\jsx-runtime.d.ts (Line 1:1 - Line 19:4)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
exportsrc\hooks\board\workspace\canvas\useCanvasInteractions.ts (Line 219:2 - Line 228:2), src\hooks\board\workspace\canvas\useCanvasInteractions.ts (Line 199:2 - Line 208:5)
* Math.sin(angle);
if (i === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
}
ctx.closePath();
ctx.stroke();
} else if ((src\hooks\board\workspace\canvas\useCanvasInteractions.ts (Line 460:13 - Line 468:2), src\hooks\board\workspace\canvas\useCanvasInteractions.ts (Line 448:20 - Line 456:12)
, 'instanceId'> = {
tool,
x1: startPoint.current.x / canvas.width,
y1: startPoint.current.y / canvas.height,
x2: coords.x / canvas.width,
y2: coords.y / canvas.height,
color: strokeColor,
strokeWidth,
}node_modules\vite\node_modules\fdir\dist\index.d.cts (Line 1:1 - Line 155:2), node_modules\vite\node_modules\fdir\dist\index.d.mts (Line 1:1 - Line 155:2)
/// <reference types="node" />
import * as nativeFs from "fs";
import picomatch from "picomatch";
//#region src/api/aborter.d.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
declare class Aborter {
aborted: boolean;
abort(): void;
}
//#endregion
//#region src/api/queue.d.ts
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
declare class Queue {
private onQueueEmpty?;
count: number;
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
enqueue(): number;
dequeue(error: Error | null, output: WalkerState): void;
}
//#endregion
//#region src/types.d.ts
type Counts = {
files: number;
directories: number;
/**
* @deprecated use `directories` instead. Will be removed in v7.0.
*/
dirs: number;
};
type Group = {
directory: string;
files: string[];
/**
* @deprecated use `directory` instead. Will be removed in v7.0.
*/
dir: string;
};
type GroupOutput = Group[];
type OnlyCountsOutput = Counts;
type PathsOutput = string[];
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
type FSLike = {
readdir: typeof nativeFs.readdir;
readdirSync: typeof nativeFs.readdirSync;
realpath: typeof nativeFs.realpath;
realpathSync: typeof nativeFs.realpathSync;
stat: typeof nativeFs.stat;
statSync: typeof nativeFs.statSync;
};
type WalkerState = {
root: string;
paths: string[];
groups: Group[];
counts: Counts;
options: Options;
queue: Queue;
controller: Aborter;
fs: FSLike;
symlinks: Map<string, string>;
visited: string[];
};
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
type PathSeparator = "/" | "\\";
type Options<TGlobFunction = unknown> = {
includeBasePath?: boolean;
includeDirs?: boolean;
normalizePath?: boolean;
maxDepth: number;
maxFiles?: number;
resolvePaths?: boolean;
suppressErrors: boolean;
group?: boolean;
onlyCounts?: boolean;
filters: FilterPredicate[];
resolveSymlinks?: boolean;
useRealPaths?: boolean;
excludeFiles?: boolean;
excludeSymlinks?: boolean;
exclude?: ExcludePredicate;
relativePaths?: boolean;
pathSeparator: PathSeparator;
signal?: AbortSignal;
globFunction?: TGlobFunction;
fs?: FSLike;
};
type GlobMatcher = (test: string) => boolean;
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
//#endregion
//#region src/builder/api-builder.d.ts
declare class APIBuilder<TReturnType extends Output> {
private readonly root;
private readonly options;
constructor(root: string, options: Options);
withPromise(): Promise<TReturnType>;
withCallback(cb: ResultCallback<TReturnType>): void;
sync(): TReturnType;
}
//#endregion
//#region src/builder/index.d.ts
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
private readonly globCache;
private options;
private globFunction?;
constructor(options?: Partial<Options<TGlobFunction>>);
group(): Builder<GroupOutput, TGlobFunction>;
withPathSeparator(separator: "/" | "\\"): this;
withBasePath(): this;
withRelativePaths(): this;
withDirs(): this;
withMaxDepth(depth: number): this;
withMaxFiles(limit: number): this;
withFullPaths(): this;
withErrors(): this;
withSymlinks({
resolvePaths
}?: {
resolvePaths?: boolean | undefined;
}): this;
withAbortSignal(signal: AbortSignal): this;
normalize(): this;
filter(predicate: FilterPredicate): this;
onlyDirs(): this;
exclude(predicate: ExcludePredicate): this;
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
crawl(root?: string): APIBuilder<TReturnType>;
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
}
//#endregion
//#region src/index.d.ts
type Fdir = typeof Builder;
//#endregion
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };node_modules\tsconfig-paths\lib\__tests__\data\match-path-data.d.ts (Line 8:5 - Line 17:7), node_modules\tsconfig-paths\src\__tests__\data\match-path-data.ts (Line 9:2 - Line 19:6)
};
readonly mainFields?: string[];
readonly addMatchAll?: boolean;
readonly existingFiles: ReadonlyArray<string>;
readonly requestedModule: string;
readonly extensions: ReadonlyArray<string>;
readonly packageJson?: {};
readonly expectedPath: string | undefined;
}
exportnode_modules\tinyglobby\node_modules\fdir\dist\index.d.mts (Line 1:1 - Line 155:2), node_modules\vite\node_modules\fdir\dist\index.d.mts (Line 1:1 - Line 155:2)
/// <reference types="node" />
import * as nativeFs from "fs";
import picomatch from "picomatch";
//#region src/api/aborter.d.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
declare class Aborter {
aborted: boolean;
abort(): void;
}
//#endregion
//#region src/api/queue.d.ts
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
declare class Queue {
private onQueueEmpty?;
count: number;
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
enqueue(): number;
dequeue(error: Error | null, output: WalkerState): void;
}
//#endregion
//#region src/types.d.ts
type Counts = {
files: number;
directories: number;
/**
* @deprecated use `directories` instead. Will be removed in v7.0.
*/
dirs: number;
};
type Group = {
directory: string;
files: string[];
/**
* @deprecated use `directory` instead. Will be removed in v7.0.
*/
dir: string;
};
type GroupOutput = Group[];
type OnlyCountsOutput = Counts;
type PathsOutput = string[];
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
type FSLike = {
readdir: typeof nativeFs.readdir;
readdirSync: typeof nativeFs.readdirSync;
realpath: typeof nativeFs.realpath;
realpathSync: typeof nativeFs.realpathSync;
stat: typeof nativeFs.stat;
statSync: typeof nativeFs.statSync;
};
type WalkerState = {
root: string;
paths: string[];
groups: Group[];
counts: Counts;
options: Options;
queue: Queue;
controller: Aborter;
fs: FSLike;
symlinks: Map<string, string>;
visited: string[];
};
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
type PathSeparator = "/" | "\\";
type Options<TGlobFunction = unknown> = {
includeBasePath?: boolean;
includeDirs?: boolean;
normalizePath?: boolean;
maxDepth: number;
maxFiles?: number;
resolvePaths?: boolean;
suppressErrors: boolean;
group?: boolean;
onlyCounts?: boolean;
filters: FilterPredicate[];
resolveSymlinks?: boolean;
useRealPaths?: boolean;
excludeFiles?: boolean;
excludeSymlinks?: boolean;
exclude?: ExcludePredicate;
relativePaths?: boolean;
pathSeparator: PathSeparator;
signal?: AbortSignal;
globFunction?: TGlobFunction;
fs?: FSLike;
};
type GlobMatcher = (test: string) => boolean;
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
//#endregion
//#region src/builder/api-builder.d.ts
declare class APIBuilder<TReturnType extends Output> {
private readonly root;
private readonly options;
constructor(root: string, options: Options);
withPromise(): Promise<TReturnType>;
withCallback(cb: ResultCallback<TReturnType>): void;
sync(): TReturnType;
}
//#endregion
//#region src/builder/index.d.ts
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
private readonly globCache;
private options;
private globFunction?;
constructor(options?: Partial<Options<TGlobFunction>>);
group(): Builder<GroupOutput, TGlobFunction>;
withPathSeparator(separator: "/" | "\\"): this;
withBasePath(): this;
withRelativePaths(): this;
withDirs(): this;
withMaxDepth(depth: number): this;
withMaxFiles(limit: number): this;
withFullPaths(): this;
withErrors(): this;
withSymlinks({
resolvePaths
}?: {
resolvePaths?: boolean | undefined;
}): this;
withAbortSignal(signal: AbortSignal): this;
normalize(): this;
filter(predicate: FilterPredicate): this;
onlyDirs(): this;
exclude(predicate: ExcludePredicate): this;
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
crawl(root?: string): APIBuilder<TReturnType>;
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
}
//#endregion
//#region src/index.d.ts
type Fdir = typeof Builder;
//#endregion
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };node_modules\tinyglobby\node_modules\fdir\dist\index.d.cts (Line 1:1 - Line 155:2), node_modules\vite\node_modules\fdir\dist\index.d.mts (Line 1:1 - Line 155:2)
/// <reference types="node" />
import * as nativeFs from "fs";
import picomatch from "picomatch";
//#region src/api/aborter.d.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
declare class Aborter {
aborted: boolean;
abort(): void;
}
//#endregion
//#region src/api/queue.d.ts
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
declare class Queue {
private onQueueEmpty?;
count: number;
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
enqueue(): number;
dequeue(error: Error | null, output: WalkerState): void;
}
//#endregion
//#region src/types.d.ts
type Counts = {
files: number;
directories: number;
/**
* @deprecated use `directories` instead. Will be removed in v7.0.
*/
dirs: number;
};
type Group = {
directory: string;
files: string[];
/**
* @deprecated use `directory` instead. Will be removed in v7.0.
*/
dir: string;
};
type GroupOutput = Group[];
type OnlyCountsOutput = Counts;
type PathsOutput = string[];
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
type FSLike = {
readdir: typeof nativeFs.readdir;
readdirSync: typeof nativeFs.readdirSync;
realpath: typeof nativeFs.realpath;
realpathSync: typeof nativeFs.realpathSync;
stat: typeof nativeFs.stat;
statSync: typeof nativeFs.statSync;
};
type WalkerState = {
root: string;
paths: string[];
groups: Group[];
counts: Counts;
options: Options;
queue: Queue;
controller: Aborter;
fs: FSLike;
symlinks: Map<string, string>;
visited: string[];
};
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
type PathSeparator = "/" | "\\";
type Options<TGlobFunction = unknown> = {
includeBasePath?: boolean;
includeDirs?: boolean;
normalizePath?: boolean;
maxDepth: number;
maxFiles?: number;
resolvePaths?: boolean;
suppressErrors: boolean;
group?: boolean;
onlyCounts?: boolean;
filters: FilterPredicate[];
resolveSymlinks?: boolean;
useRealPaths?: boolean;
excludeFiles?: boolean;
excludeSymlinks?: boolean;
exclude?: ExcludePredicate;
relativePaths?: boolean;
pathSeparator: PathSeparator;
signal?: AbortSignal;
globFunction?: TGlobFunction;
fs?: FSLike;
};
type GlobMatcher = (test: string) => boolean;
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
//#endregion
//#region src/builder/api-builder.d.ts
declare class APIBuilder<TReturnType extends Output> {
private readonly root;
private readonly options;
constructor(root: string, options: Options);
withPromise(): Promise<TReturnType>;
withCallback(cb: ResultCallback<TReturnType>): void;
sync(): TReturnType;
}
//#endregion
//#region src/builder/index.d.ts
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
private readonly globCache;
private options;
private globFunction?;
constructor(options?: Partial<Options<TGlobFunction>>);
group(): Builder<GroupOutput, TGlobFunction>;
withPathSeparator(separator: "/" | "\\"): this;
withBasePath(): this;
withRelativePaths(): this;
withDirs(): this;
withMaxDepth(depth: number): this;
withMaxFiles(limit: number): this;
withFullPaths(): this;
withErrors(): this;
withSymlinks({
resolvePaths
}?: {
resolvePaths?: boolean | undefined;
}): this;
withAbortSignal(signal: AbortSignal): this;
normalize(): this;
filter(predicate: FilterPredicate): this;
onlyDirs(): this;
exclude(predicate: ExcludePredicate): this;
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
crawl(root?: string): APIBuilder<TReturnType>;
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
}
//#endregion
//#region src/index.d.ts
type Fdir = typeof Builder;
//#endregion
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-magic-numbers.d.ts (Line 17:9 - Line 26:7), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-magic-numbers.d.ts (Line 3:9 - Line 12:8)
: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreEnums?: boolean;
ignoreNumericLiteralTypes?: boolean;
ignoreReadonlyClassProperties?: boolean;
ignoreTypeIndexes?: boolean;
}], importnode_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 32:13 - Line 39:18), node_modules\@typescript-eslint\eslint-plugin\dist\rules\max-params.d.ts (Line 16:9 - Line 23:7)
: import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({
countVoidThis?: boolean;
max: number;
} | {
countVoidThis?: boolean;
maximum: number;
})[], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
'member-ordering'node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 73:19 - Line 83:31), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-magic-numbers.d.ts (Line 3:9 - Line 27:7)
: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreEnums?: boolean;
ignoreNumericLiteralTypes?: boolean;
ignoreReadonlyClassProperties?: boolean;
ignoreTypeIndexes?: boolean;
}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
'no-meaningless-void-operator'node_modules\@typescript-eslint\eslint-plugin\dist\rules\dot-notation.d.ts (Line 14:9 - Line 21:7), node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 19:15 - Line 26:32)
: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{
allowIndexSignaturePropertyAccess?: boolean;
allowKeywords?: boolean;
allowPattern?: string;
allowPrivateClassPropertyAccess?: boolean;
allowProtectedClassPropertyAccess?: boolean;
}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
exportnode_modules\@types\react\ts5.0\v18\jsx-runtime.d.ts (Line 6:5 - Line 36:2), node_modules\@types\react\ts5.0\v18\ts5.0\jsx-runtime.d.ts (Line 5:5 - Line 35:2)
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsx(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxs(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;node_modules\@types\react\ts5.0\v18\jsx-dev-runtime.d.ts (Line 1:1 - Line 45:2), node_modules\@types\react\ts5.0\v18\jsx-runtime.d.ts (Line 1:1 - Line 44:2)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
type ElementType = React.JSX.ElementType;
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
export interface JSXSource {
/**
* The source file where the element originates from.
*/
fileName?: string | undefined;
/**
* The line number where the element was created.
*/
lineNumber?: number | undefined;
/**
* The column number where the element was created.
*/
columnNumber?: number | undefined;
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxDEV(
type: React.ElementType,
props: unknown,
key: React.Key | undefined,
isStatic: boolean,
source?: JSXSource,
self?: unknown,
): React.ReactElement;node_modules\@types\react\ts5.0\v18\global.d.ts (Line 1:1 - Line 161:2), node_modules\@types\react\ts5.0\v18\ts5.0\global.d.ts (Line 1:1 - Line 161:2)
/*
React projects that don't include the DOM library need these interfaces to compile.
React Native applications use React, but there is no DOM available. The JavaScript runtime
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
Warning: all of these interfaces are empty. If you want type definitions for various properties
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
*/
interface Event {}
interface AnimationEvent extends Event {}
interface ClipboardEvent extends Event {}
interface CompositionEvent extends Event {}
interface DragEvent extends Event {}
interface FocusEvent extends Event {}
interface InputEvent extends Event {}
interface KeyboardEvent extends Event {}
interface MouseEvent extends Event {}
interface TouchEvent extends Event {}
interface PointerEvent extends Event {}
interface ToggleEvent extends Event {}
interface TransitionEvent extends Event {}
interface UIEvent extends Event {}
interface WheelEvent extends Event {}
interface EventTarget {}
interface Document {}
interface DataTransfer {}
interface StyleMedia {}
interface Element {}
interface DocumentFragment {}
interface HTMLElement extends Element {}
interface HTMLAnchorElement extends HTMLElement {}
interface HTMLAreaElement extends HTMLElement {}
interface HTMLAudioElement extends HTMLElement {}
interface HTMLBaseElement extends HTMLElement {}
interface HTMLBodyElement extends HTMLElement {}
interface HTMLBRElement extends HTMLElement {}
interface HTMLButtonElement extends HTMLElement {}
interface HTMLCanvasElement extends HTMLElement {}
interface HTMLDataElement extends HTMLElement {}
interface HTMLDataListElement extends HTMLElement {}
interface HTMLDetailsElement extends HTMLElement {}
interface HTMLDialogElement extends HTMLElement {}
interface HTMLDivElement extends HTMLElement {}
interface HTMLDListElement extends HTMLElement {}
interface HTMLEmbedElement extends HTMLElement {}
interface HTMLFieldSetElement extends HTMLElement {}
interface HTMLFormElement extends HTMLElement {}
interface HTMLHeadingElement extends HTMLElement {}
interface HTMLHeadElement extends HTMLElement {}
interface HTMLHRElement extends HTMLElement {}
interface HTMLHtmlElement extends HTMLElement {}
interface HTMLIFrameElement extends HTMLElement {}
interface HTMLImageElement extends HTMLElement {}
interface HTMLInputElement extends HTMLElement {}
interface HTMLModElement extends HTMLElement {}
interface HTMLLabelElement extends HTMLElement {}
interface HTMLLegendElement extends HTMLElement {}
interface HTMLLIElement extends HTMLElement {}
interface HTMLLinkElement extends HTMLElement {}
interface HTMLMapElement extends HTMLElement {}
interface HTMLMetaElement extends HTMLElement {}
interface HTMLMeterElement extends HTMLElement {}
interface HTMLObjectElement extends HTMLElement {}
interface HTMLOListElement extends HTMLElement {}
interface HTMLOptGroupElement extends HTMLElement {}
interface HTMLOptionElement extends HTMLElement {}
interface HTMLOutputElement extends HTMLElement {}
interface HTMLParagraphElement extends HTMLElement {}
interface HTMLParamElement extends HTMLElement {}
interface HTMLPreElement extends HTMLElement {}
interface HTMLProgressElement extends HTMLElement {}
interface HTMLQuoteElement extends HTMLElement {}
interface HTMLSlotElement extends HTMLElement {}
interface HTMLScriptElement extends HTMLElement {}
interface HTMLSelectElement extends HTMLElement {}
interface HTMLSourceElement extends HTMLElement {}
interface HTMLSpanElement extends HTMLElement {}
interface HTMLStyleElement extends HTMLElement {}
interface HTMLTableElement extends HTMLElement {}
interface HTMLTableColElement extends HTMLElement {}
interface HTMLTableDataCellElement extends HTMLElement {}
interface HTMLTableHeaderCellElement extends HTMLElement {}
interface HTMLTableRowElement extends HTMLElement {}
interface HTMLTableSectionElement extends HTMLElement {}
interface HTMLTemplateElement extends HTMLElement {}
interface HTMLTextAreaElement extends HTMLElement {}
interface HTMLTimeElement extends HTMLElement {}
interface HTMLTitleElement extends HTMLElement {}
interface HTMLTrackElement extends HTMLElement {}
interface HTMLUListElement extends HTMLElement {}
interface HTMLVideoElement extends HTMLElement {}
interface HTMLWebViewElement extends HTMLElement {}
interface SVGElement extends Element {}
interface SVGSVGElement extends SVGElement {}
interface SVGCircleElement extends SVGElement {}
interface SVGClipPathElement extends SVGElement {}
interface SVGDefsElement extends SVGElement {}
interface SVGDescElement extends SVGElement {}
interface SVGEllipseElement extends SVGElement {}
interface SVGFEBlendElement extends SVGElement {}
interface SVGFEColorMatrixElement extends SVGElement {}
interface SVGFEComponentTransferElement extends SVGElement {}
interface SVGFECompositeElement extends SVGElement {}
interface SVGFEConvolveMatrixElement extends SVGElement {}
interface SVGFEDiffuseLightingElement extends SVGElement {}
interface SVGFEDisplacementMapElement extends SVGElement {}
interface SVGFEDistantLightElement extends SVGElement {}
interface SVGFEDropShadowElement extends SVGElement {}
interface SVGFEFloodElement extends SVGElement {}
interface SVGFEFuncAElement extends SVGElement {}
interface SVGFEFuncBElement extends SVGElement {}
interface SVGFEFuncGElement extends SVGElement {}
interface SVGFEFuncRElement extends SVGElement {}
interface SVGFEGaussianBlurElement extends SVGElement {}
interface SVGFEImageElement extends SVGElement {}
interface SVGFEMergeElement extends SVGElement {}
interface SVGFEMergeNodeElement extends SVGElement {}
interface SVGFEMorphologyElement extends SVGElement {}
interface SVGFEOffsetElement extends SVGElement {}
interface SVGFEPointLightElement extends SVGElement {}
interface SVGFESpecularLightingElement extends SVGElement {}
interface SVGFESpotLightElement extends SVGElement {}
interface SVGFETileElement extends SVGElement {}
interface SVGFETurbulenceElement extends SVGElement {}
interface SVGFilterElement extends SVGElement {}
interface SVGForeignObjectElement extends SVGElement {}
interface SVGGElement extends SVGElement {}
interface SVGImageElement extends SVGElement {}
interface SVGLineElement extends SVGElement {}
interface SVGLinearGradientElement extends SVGElement {}
interface SVGMarkerElement extends SVGElement {}
interface SVGMaskElement extends SVGElement {}
interface SVGMetadataElement extends SVGElement {}
interface SVGPathElement extends SVGElement {}
interface SVGPatternElement extends SVGElement {}
interface SVGPolygonElement extends SVGElement {}
interface SVGPolylineElement extends SVGElement {}
interface SVGRadialGradientElement extends SVGElement {}
interface SVGRectElement extends SVGElement {}
interface SVGSetElement extends SVGElement {}
interface SVGStopElement extends SVGElement {}
interface SVGSwitchElement extends SVGElement {}
interface SVGSymbolElement extends SVGElement {}
interface SVGTextElement extends SVGElement {}
interface SVGTextPathElement extends SVGElement {}
interface SVGTSpanElement extends SVGElement {}
interface SVGUseElement extends SVGElement {}
interface SVGViewElement extends SVGElement {}
interface FormData {}
interface Text {}
interface TouchList {}
interface WebGLRenderingContext {}
interface WebGL2RenderingContext {}
interface TrustedHTML {}node_modules\@eslint\plugin-kit\dist\cjs\index.d.cts (Line 1:1 - Line 16:14), node_modules\@eslint\plugin-kit\dist\esm\index.d.ts (Line 1:1 - Line 16:13)
export type VisitTraversalStep = import("@eslint/core").VisitTraversalStep;
export type CallTraversalStep = import("@eslint/core").CallTraversalStep;
export type TraversalStep = import("@eslint/core").TraversalStep;
export type SourceLocation = import("@eslint/core").SourceLocation;
export type SourceLocationWithOffset = import("@eslint/core").SourceLocationWithOffset;
export type SourceRange = import("@eslint/core").SourceRange;
export type IDirective = import("@eslint/core").Directive;
export type DirectiveType = import("@eslint/core").DirectiveType;
export type SourceCodeBaseTypeOptions = import("@eslint/core").SourceCodeBaseTypeOptions;
/**
* <Options>
*/
export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = import("@eslint/core").SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>;
export type RuleConfig = import("@eslint/core").RuleConfig;
export type RulesConfig = import("@eslint/core").RulesConfig;
export type StringConfig = import("./types.cts"node_modules\@eslint\plugin-kit\dist\cjs\index.d.cts (Line 17:14 - Line 298:2), node_modules\@eslint\plugin-kit\dist\esm\index.d.ts (Line 17:13 - Line 298:2)
).BooleanConfig;
/**
* A class to represent a step in the traversal process where a
* method is called.
* @implements {CallTraversalStep}
*/
export class CallMethodStep implements CallTraversalStep {
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {string} options.target The target of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, args }: {
target: string;
args: Array<any>;
});
/**
* The type of the step.
* @type {"call"}
* @readonly
*/
readonly type: "call";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {2}
* @readonly
*/
readonly kind: 2;
/**
* The name of the method to call.
* @type {string}
*/
target: string;
/**
* The arguments to pass to the method.
* @type {Array<any>}
*/
args: Array<any>;
}
/**
* Object to parse ESLint configuration comments.
*/
export class ConfigCommentParser {
/**
* Parses a list of "name:string_value" or/and "name" options divided by comma or
* whitespace. Used for "global" comments.
* @param {string} string The string to parse.
* @returns {StringConfig} Result map object of names and string values, or null values if no value was provided.
*/
parseStringConfig(string: string): StringConfig;
/**
* Parses a JSON-like config.
* @param {string} string The string to parse.
* @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object
*/
parseJSONLikeConfig(string: string): ({
ok: true;
config: RulesConfig;
} | {
ok: false;
error: {
message: string;
};
});
/**
* Parses a config of values separated by comma.
* @param {string} string The string to parse.
* @returns {BooleanConfig} Result map of values and true values
*/
parseListConfig(string: string): BooleanConfig;
/**
* Parses a directive comment into directive text and value.
* @param {string} string The string with the directive to be parsed.
* @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid.
*/
parseDirective(string: string): DirectiveComment | undefined;
#private;
}
/**
* A class to represent a directive comment.
* @implements {IDirective}
*/
export class Directive implements IDirective {
/**
* Creates a new instance.
* @param {Object} options The options for the directive.
* @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive.
* @param {unknown} options.node The node representing the directive.
* @param {string} options.value The value of the directive.
* @param {string} options.justification The justification for the directive.
*/
constructor({ type, node, value, justification }: {
type: "disable" | "enable" | "disable-next-line" | "disable-line";
node: unknown;
value: string;
justification: string;
});
/**
* The type of directive.
* @type {DirectiveType}
* @readonly
*/
readonly type: DirectiveType;
/**
* The node representing the directive.
* @type {unknown}
* @readonly
*/
readonly node: unknown;
/**
* Everything after the "eslint-disable" portion of the directive,
* but before the "--" that indicates the justification.
* @type {string}
* @readonly
*/
readonly value: string;
/**
* The justification for the directive.
* @type {string}
* @readonly
*/
readonly justification: string;
}
/**
* Source Code Base Object
* @template {SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {SyntaxElementWithLoc: object}]
* @implements {TextSourceCode<Options>}
*/
export class TextSourceCodeBase<Options extends SourceCodeBaseTypeOptions & {
SyntaxElementWithLoc: object;
} = import("@eslint/core").SourceCodeBaseTypeOptions & {
SyntaxElementWithLoc: object;
}> implements TextSourceCode<Options> {
/**
* Creates a new instance.
* @param {Object} options The options for the instance.
* @param {string} options.text The source code text.
* @param {Options['RootNode']} options.ast The root AST node.
* @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code.
*/
constructor({ text, ast, lineEndingPattern }: {
text: string;
ast: Options["RootNode"];
lineEndingPattern?: RegExp;
});
/**
* The AST of the source code.
* @type {Options['RootNode']}
*/
ast: Options["RootNode"];
/**
* The text of the source code.
* @type {string}
*/
text: string;
/**
* Returns the loc information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for.
* @returns {SourceLocation} The loc information for the node or token.
* @throws {Error} If the node or token does not have loc information.
*/
getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation;
/**
* Returns the range information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for.
* @returns {SourceRange} The range information for the node or token.
* @throws {Error} If the node or token does not have range information.
*/
getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange;
/**
* Returns the parent of the given node.
* @param {Options['SyntaxElementWithLoc']} node The node to get the parent of.
* @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node.
* @throws {Error} If the method is not implemented in the subclass.
*/
getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined;
/**
* Gets all the ancestors of a given node
* @param {Options['SyntaxElementWithLoc']} node The node
* @returns {Array<Options['SyntaxElementWithLoc']>} All the ancestor nodes in the AST, not including the provided node, starting
* from the root node at index 0 and going inwards to the parent node.
* @throws {TypeError} When `node` is missing.
*/
getAncestors(node: Options["SyntaxElementWithLoc"]): Array<Options["SyntaxElementWithLoc"]>;
/**
* Gets the source code for the given node.
* @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for.
* @param {number} [beforeCount] The number of characters before the node to retrieve.
* @param {number} [afterCount] The number of characters after the node to retrieve.
* @returns {string} The text representing the AST node.
* @public
*/
public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string;
/**
* Gets the entire source text split into an array of lines.
* @returns {Array<string>} The source text as an array of lines.
* @public
*/
public get lines(): Array<string>;
/**
* Traverse the source code and return the steps that were taken.
* @returns {Iterable<TraversalStep>} The steps that were taken while traversing the source code.
*/
traverse(): Iterable<TraversalStep>;
#private;
}
/**
* A class to represent a step in the traversal process where a node is visited.
* @implements {VisitTraversalStep}
*/
export class VisitNodeStep implements VisitTraversalStep {
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {object} options.target The target of the step.
* @param {1|2} options.phase The phase of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, phase, args }: {
target: object;
phase: 1 | 2;
args: Array<any>;
});
/**
* The type of the step.
* @type {"visit"}
* @readonly
*/
readonly type: "visit";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {1}
* @readonly
*/
readonly kind: 1;
/**
* The target of the step.
* @type {object}
*/
target: object;
/**
* The phase of the step.
* @type {1|2}
*/
phase: 1 | 2;
/**
* The arguments of the step.
* @type {Array<any>}
*/
args: Array<any>;
}
/**
* Represents a directive comment.
*/
declare class DirectiveComment {
/**
* Creates a new directive comment.
* @param {string} label The label of the directive.
* @param {string} value The value of the directive.
* @param {string} justification The justification of the directive.
*/
constructor(label: string, value: string, justification: string);
/**
* The label of the directive, such as "eslint", "eslint-disable", etc.
* @type {string}
*/
label: string;
/**
* The value of the directive (the string after the label).
* @type {string}
*/
value: string;
/**
* The justification of the directive (the string after the --).
* @type {string}
*/
justification: string;
}
export {};node_modules\@eslint\object-schema\dist\cjs\types.ts (Line 1:1 - Line 57:2), node_modules\@eslint\object-schema\dist\esm\types.ts (Line 1:1 - Line 57:2)
/**
* @fileoverview Types for object-schema package.
*/
/**
* Built-in validation strategies.
*/
export type BuiltInValidationStrategy =
| "array"
| "boolean"
| "number"
| "object"
| "object?"
| "string"
| "string!";
/**
* Built-in merge strategies.
*/
export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace";
/**
* Property definition.
*/
export interface PropertyDefinition {
/**
* Indicates if the property is required.
*/
required: boolean;
/**
* The other properties that must be present when this property is used.
*/
requires?: string[];
/**
* The strategy to merge the property.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
merge: BuiltInMergeStrategy | ((target: any, source: any) => any);
/**
* The strategy to validate the property.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
validate: BuiltInValidationStrategy | ((value: any) => void);
/**
* The schema for the object value of this property.
*/
schema?: ObjectDefinition;
}
/**
* Object definition.
*/
export type ObjectDefinition = Record<string, PropertyDefinition>;node_modules\@eslint\object-schema\dist\cjs\index.d.cts (Line 2:14 - Line 123:2), node_modules\@eslint\object-schema\dist\esm\index.d.ts (Line 2:13 - Line 123:2)
).PropertyDefinition;
/**
* @fileoverview Merge Strategy
*/
/**
* Container class for several different merge strategies.
*/
export class MergeStrategy {
/**
* Merges two keys by overwriting the first with the second.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value.
*/
static overwrite(value1: any, value2: any): any;
/**
* Merges two keys by replacing the first with the second only if the
* second is defined.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value if it is defined.
*/
static replace(value1: any, value2: any): any;
/**
* Merges two properties by assigning properties from the second to the first.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} A new object containing properties from both value1 and
* value2.
*/
static assign(value1: any, value2: any): any;
}
/**
* Represents an object validation/merging schema.
*/
export class ObjectSchema {
/**
* Creates a new instance.
* @param {ObjectDefinition} definitions The schema definitions.
*/
constructor(definitions: ObjectDefinition);
/**
* Determines if a strategy has been registered for the given object key.
* @param {string} key The object key to find a strategy for.
* @returns {boolean} True if the key has a strategy registered, false if not.
*/
hasKey(key: string): boolean;
/**
* Merges objects together to create a new object comprised of the keys
* of the all objects. Keys are merged based on the each key's merge
* strategy.
* @param {...Object} objects The objects to merge.
* @returns {Object} A new object with a mix of all objects' keys.
* @throws {Error} If any object is invalid.
*/
merge(...objects: any[]): any;
/**
* Validates an object's keys based on the validate strategy for each key.
* @param {Object} object The object to validate.
* @returns {void}
* @throws {Error} When the object is invalid.
*/
validate(object: any): void;
#private;
}
/**
* @fileoverview Validation Strategy
*/
/**
* Container class for several different validation strategies.
*/
export class ValidationStrategy {
/**
* Validates that a value is an array.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static array(value: any): void;
/**
* Validates that a value is a boolean.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static boolean(value: any): void;
/**
* Validates that a value is a number.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static number(value: any): void;
/**
* Validates that a value is a object.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static object(value: any): void;
/**
* Validates that a value is a object or null.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "object?"(value: any): void;
/**
* Validates that a value is a string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static string(value: any): void;
/**
* Validates that a value is a non-empty string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "string!"(value: any): void;
}node_modules\@eslint\core\dist\cjs\types.d.cts (Line 1:1 - Line 849:2), node_modules\@eslint\core\dist\esm\types.d.ts (Line 1:1 - Line 849:2)
/**
* @fileoverview Shared types for ESLint Core.
*/
import type { JSONSchema4 } from "json-schema";
/**
* Represents an error inside of a file.
*/
export interface FileError {
message: string;
line: number;
column: number;
endLine?: number;
endColumn?: number;
}
/**
* Represents a problem found in a file.
*/
export interface FileProblem {
ruleId: string | null;
message: string;
loc: SourceLocation;
}
/**
* Represents the start and end coordinates of a node inside the source.
*/
export interface SourceLocation {
start: Position;
end: Position;
}
/**
* Represents the start and end coordinates of a node inside the source with an offset.
*/
export interface SourceLocationWithOffset {
start: PositionWithOffset;
end: PositionWithOffset;
}
/**
* Represents a location coordinate inside the source. ESLint-style formats
* have just `line` and `column` while others may have `offset` as well.
*/
export interface Position {
line: number;
column: number;
}
/**
* Represents a location coordinate inside the source with an offset.
*/
export interface PositionWithOffset extends Position {
offset: number;
}
/**
* Represents a range of characters in the source.
*/
export type SourceRange = [number, number];
/**
* What the rule is responsible for finding:
* - `problem` means the rule has noticed a potential error.
* - `suggestion` means the rule suggests an alternate or better approach.
* - `layout` means the rule is looking at spacing, indentation, etc.
*/
export type RuleType = "problem" | "suggestion" | "layout";
/**
* The type of fix the rule can provide:
* - `code` means the rule can fix syntax.
* - `whitespace` means the rule can fix spacing and indentation.
*/
export type RuleFixType = "code" | "whitespace";
/**
* An object containing visitor information for a rule. Each method is either the
* name of a node type or a selector, or is a method that will be called at specific
* times during the traversal.
*/
export type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
/**
* Rule meta information used for documentation.
*/
export interface RulesMetaDocs {
/**
* A short description of the rule.
*/
description?: string | undefined;
/**
* The URL to the documentation for the rule.
*/
url?: string | undefined;
/**
* The category the rule falls under.
* @deprecated No longer used.
*/
category?: string | undefined;
/**
* Indicates if the rule is generally recommended for all users.
*
* Note - this will always be a boolean for core rules, but may be used in any way by plugins.
*/
recommended?: unknown;
/**
* Indicates if the rule is frozen (no longer accepting feature requests).
*/
frozen?: boolean | undefined;
}
/**
* Meta information about a rule.
*/
export interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[], ExtRuleDocs = unknown> {
/**
* Properties that are used when documenting the rule.
*/
docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
/**
* The type of rule.
*/
type?: RuleType | undefined;
/**
* The schema for the rule options. Required if the rule has options.
*/
schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
/**
* Any default options to be recursively merged on top of any user-provided options.
**/
defaultOptions?: RuleOptions;
/**
* The messages that the rule can report.
*/
messages?: Record<MessageIds, string>;
/**
* Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
*/
deprecated?: boolean | DeprecatedInfo | undefined;
/**
* @deprecated Use deprecated.replacedBy instead.
* The name of the rule(s) this rule was replaced by, if it was deprecated.
*/
replacedBy?: readonly string[] | undefined;
/**
* Indicates if the rule is fixable, and if so, what type of fix it provides.
*/
fixable?: RuleFixType | undefined;
/**
* Indicates if the rule may provide suggestions.
*/
hasSuggestions?: boolean | undefined;
/**
* The language the rule is intended to lint.
*/
language?: string;
/**
* The dialects of `language` that the rule is intended to lint.
*/
dialects?: string[];
}
/**
* Provides additional metadata about a deprecation.
*/
export interface DeprecatedInfo {
/**
* General message presented to the user, e.g. for the key rule why the rule
* is deprecated or for info how to replace the rule.
*/
message?: string;
/**
* URL to more information about this deprecation in general.
*/
url?: string;
/**
* An empty array explicitly states that there is no replacement.
*/
replacedBy?: ReplacedByInfo[];
/**
* The package version since when the rule is deprecated (should use full
* semver without a leading "v").
*/
deprecatedSince?: string;
/**
* The estimated version when the rule is removed (probably the next major
* version). null means the rule is "frozen" (will be available but will not
* be changed).
*/
availableUntil?: string | null;
}
/**
* Provides metadata about a replacement
*/
export interface ReplacedByInfo {
/**
* General message presented to the user, e.g. how to replace the rule
*/
message?: string;
/**
* URL to more information about this replacement in general
*/
url?: string;
/**
* Name should be "eslint" if the replacement is an ESLint core rule. Omit
* the property if the replacement is in the same plugin.
*/
plugin?: ExternalSpecifier;
/**
* Name and documentation of the replacement rule
*/
rule?: ExternalSpecifier;
}
/**
* Specifies the name and url of an external resource. At least one property
* should be set.
*/
export interface ExternalSpecifier {
/**
* Name of the referenced plugin / rule.
*/
name?: string;
/**
* URL pointing to documentation for the plugin / rule.
*/
url?: string;
}
/**
* Generic type for `RuleContext`.
*/
export interface RuleContextTypeOptions {
LangOptions: LanguageOptions;
Code: SourceCode;
RuleOptions: unknown[];
Node: unknown;
MessageIds: string;
}
/**
* Represents the context object that is passed to a rule. This object contains
* information about the current state of the linting process and is the rule's
* view into the outside world.
*/
export interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
/**
* The current working directory for the session.
*/
cwd: string;
/**
* Returns the current working directory for the session.
* @deprecated Use `cwd` instead.
*/
getCwd(): string;
/**
* The filename of the file being linted.
*/
filename: string;
/**
* Returns the filename of the file being linted.
* @deprecated Use `filename` instead.
*/
getFilename(): string;
/**
* The physical filename of the file being linted.
*/
physicalFilename: string;
/**
* Returns the physical filename of the file being linted.
* @deprecated Use `physicalFilename` instead.
*/
getPhysicalFilename(): string;
/**
* The source code object that the rule is running on.
*/
sourceCode: Options["Code"];
/**
* Returns the source code object that the rule is running on.
* @deprecated Use `sourceCode` instead.
*/
getSourceCode(): Options["Code"];
/**
* Shared settings for the configuration.
*/
settings: SettingsConfig;
/**
* Parser-specific options for the configuration.
* @deprecated Use `languageOptions.parserOptions` instead.
*/
parserOptions: Record<string, unknown>;
/**
* The language options for the configuration.
*/
languageOptions: Options["LangOptions"];
/**
* The CommonJS path to the parser used while parsing this file.
* @deprecated No longer used.
*/
parserPath: string | undefined;
/**
* The rule ID.
*/
id: string;
/**
* The rule's configured options.
*/
options: Options["RuleOptions"];
/**
* The report function that the rule should use to report problems.
* @param violation The violation to report.
*/
report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
}
/**
* Manager of text edits for a rule fix.
*/
export interface RuleTextEditor<EditableSyntaxElement = unknown> {
/**
* Inserts text after the specified node or token.
* @param syntaxElement The node or token to insert after.
* @param text The edit to insert after the node or token.
*/
insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
/**
* Inserts text after the specified range.
* @param range The range to insert after.
* @param text The edit to insert after the range.
*/
insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
/**
* Inserts text before the specified node or token.
* @param syntaxElement A syntax element with location information to insert before.
* @param text The edit to insert before the node or token.
*/
insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
/**
* Inserts text before the specified range.
* @param range The range to insert before.
* @param text The edit to insert before the range.
*/
insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
/**
* Removes the specified node or token.
* @param syntaxElement A syntax element with location information to remove.
* @returns The edit to remove the node or token.
*/
remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
/**
* Removes the specified range.
* @param range The range to remove.
* @returns The edit to remove the range.
*/
removeRange(range: SourceRange): RuleTextEdit;
/**
* Replaces the specified node or token with the given text.
* @param syntaxElement A syntax element with location information to replace.
* @param text The text to replace the node or token with.
* @returns The edit to replace the node or token.
*/
replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
/**
* Replaces the specified range with the given text.
* @param range The range to replace.
* @param text The text to replace the range with.
* @returns The edit to replace the range.
*/
replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
}
/**
* Represents a fix for a rule violation implemented as a text edit.
*/
export interface RuleTextEdit {
/**
* The range to replace.
*/
range: SourceRange;
/**
* The text to insert.
*/
text: string;
}
/**
* Fixes a violation.
* @param fixer The text editor to apply the fix.
* @returns The fix(es) for the violation.
*/
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
interface ViolationReportBase {
/**
* The type of node that the violation is for.
* @deprecated May be removed in the future.
*/
nodeType?: string | undefined;
/**
* The data to insert into the message.
*/
data?: Record<string, string> | undefined;
/**
* The fix to be applied for the violation.
*/
fix?: RuleFixer | null | undefined;
/**
* An array of suggested fixes for the problem. These fixes may change the
* behavior of the code, so they are not applied automatically.
*/
suggest?: SuggestedEdit[] | null | undefined;
}
type ViolationMessage<MessageIds = string> = {
message: string;
} | {
messageId: MessageIds;
};
type ViolationLocation<Node> = {
loc: SourceLocation | Position;
} | {
node: Node;
};
export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
interface SuggestedEditBase {
/**
* The data to insert into the message.
*/
data?: Record<string, string> | undefined;
/**
* The fix to be applied for the suggestion.
*/
fix?: RuleFixer | null | undefined;
}
type SuggestionMessage = {
desc: string;
} | {
messageId: string;
};
/**
* A suggested edit for a rule violation.
*/
export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
/**
* Generic options for the `RuleDefinition` type.
*/
export interface RuleDefinitionTypeOptions {
LangOptions: LanguageOptions;
Code: SourceCode;
RuleOptions: unknown[];
Visitor: RuleVisitor;
Node: unknown;
MessageIds: string;
ExtRuleDocs: unknown;
}
/**
* The definition of an ESLint rule.
*/
export interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
/**
* The meta information for the rule.
*/
meta?: RulesMeta<Options["MessageIds"], Options["RuleOptions"], Options["ExtRuleDocs"]>;
/**
* Creates the visitor that ESLint uses to apply the rule during traversal.
* @param context The rule context.
* @returns The rule visitor.
*/
create(context: RuleContext<{
LangOptions: Options["LangOptions"];
Code: Options["Code"];
RuleOptions: Options["RuleOptions"];
Node: Options["Node"];
MessageIds: Options["MessageIds"];
}>): Options["Visitor"];
}
/**
* Defaults for non-language-related `RuleDefinition` options.
*/
export interface CustomRuleTypeDefinitions {
RuleOptions: unknown[];
MessageIds: string;
ExtRuleDocs: Record<string, unknown>;
}
/**
* A helper type to define language specific specializations of the `RuleDefinition` type.
*
* @example
* ```ts
* type YourRuleDefinition<
* Options extends Partial<CustomRuleTypeDefinitions> = {},
* > = CustomRuleDefinitionType<
* {
* LangOptions: YourLanguageOptions;
* Code: YourSourceCode;
* Visitor: YourRuleVisitor;
* Node: YourNode;
* },
* Options
* >;
* ```
*/
export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>;
/**
* The human readable severity level used in a configuration.
*/
export type SeverityName = "off" | "warn" | "error";
/**
* The numeric severity level for a rule.
*
* - `0` means off.
* - `1` means warn.
* - `2` means error.
*/
export type SeverityLevel = 0 | 1 | 2;
/**
* The severity of a rule in a configuration.
*/
export type Severity = SeverityName | SeverityLevel;
/**
* Represents the configuration options for the core linter.
*/
export interface LinterOptionsConfig {
/**
* Indicates whether or not inline configuration is evaluated.
*/
noInlineConfig?: boolean;
/**
* Indicates what to do when an unused disable directive is found.
*/
reportUnusedDisableDirectives?: boolean | Severity;
/**
* A severity value indicating if and how unused inline configs should be
* tracked and reported.
*/
reportUnusedInlineConfigs?: Severity;
}
/**
* The configuration for a rule.
*/
export type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
/**
* A collection of rules and their configurations.
*/
export interface RulesConfig {
[key: string]: RuleConfig;
}
/**
* A collection of settings.
*/
export interface SettingsConfig {
[key: string]: unknown;
}
/**
* Generic options for the `Language` type.
*/
export interface LanguageTypeOptions {
LangOptions: LanguageOptions;
Code: SourceCode;
RootNode: unknown;
Node: unknown;
}
/**
* Represents a plugin language.
*/
export interface Language<Options extends LanguageTypeOptions = {
LangOptions: LanguageOptions;
Code: SourceCode;
RootNode: unknown;
Node: unknown;
}> {
/**
* Indicates how ESLint should read the file.
*/
fileType: "text";
/**
* First line number returned from the parser (text mode only).
*/
lineStart: 0 | 1;
/**
* First column number returned from the parser (text mode only).
*/
columnStart: 0 | 1;
/**
* The property to read the node type from. Used in selector querying.
*/
nodeTypeKey: string;
/**
* The traversal path that tools should take when evaluating the AST
*/
visitorKeys?: Record<string, string[]>;
/**
* Default language options. User-defined options are merged with this object.
*/
defaultLanguageOptions?: LanguageOptions;
/**
* Validates languageOptions for this language.
*/
validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
/**
* Normalizes languageOptions for this language.
*/
normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
/**
* Helper for esquery that allows languages to match nodes against
* class. esquery currently has classes like `function` that will
* match all the various function nodes. This method allows languages
* to implement similar shorthands.
*/
matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
/**
* Parses the given file input into its component parts. This file should not
* throws errors for parsing errors but rather should return any parsing
* errors as parse of the ParseResult object.
*/
parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
/**
* Creates SourceCode object that ESLint uses to work with a file.
*/
createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
}
/**
* Plugin-defined options for the language.
*/
export type LanguageOptions = Record<string, unknown>;
/**
* The context object that is passed to the language plugin methods.
*/
export interface LanguageContext<LangOptions = LanguageOptions> {
languageOptions: LangOptions;
}
/**
* Represents a file read by ESLint.
*/
export interface File {
/**
* The path that ESLint uses for this file. May be a virtual path
* if it was returned by a processor.
*/
path: string;
/**
* The path to the file on disk. This always maps directly to a file
* regardless of whether it was returned from a processor.
*/
physicalPath: string;
/**
* Indicates if the original source contained a byte-order marker.
* ESLint strips the BOM from the `body`, but this info is needed
* to correctly apply autofixing.
*/
bom: boolean;
/**
* The body of the file to parse.
*/
body: string | Uint8Array;
}
/**
* Represents the successful result of parsing a file.
*/
export interface OkParseResult<RootNode = unknown> {
/**
* Indicates if the parse was successful. If true, the parse was successful
* and ESLint should continue on to create a SourceCode object and run rules;
* if false, ESLint should just report the error(s) without doing anything
* else.
*/
ok: true;
/**
* The abstract syntax tree created by the parser. (only when ok: true)
*/
ast: RootNode;
/**
* Any additional data that the parser wants to provide.
*/
[key: string]: any;
}
/**
* Represents the unsuccessful result of parsing a file.
*/
export interface NotOkParseResult {
/**
* Indicates if the parse was successful. If true, the parse was successful
* and ESLint should continue on to create a SourceCode object and run rules;
* if false, ESLint should just report the error(s) without doing anything
* else.
*/
ok: false;
/**
* Any parsing errors, whether fatal or not. (only when ok: false)
*/
errors: FileError[];
/**
* Any additional data that the parser wants to provide.
*/
[key: string]: any;
}
export type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
/**
* Represents inline configuration found in the source code.
*/
interface InlineConfigElement {
/**
* The location of the inline config element.
*/
loc: SourceLocation;
/**
* The interpreted configuration from the inline config element.
*/
config: {
rules: RulesConfig;
};
}
/**
* Generic options for the `SourceCodeBase` type.
*/
export interface SourceCodeBaseTypeOptions {
LangOptions: LanguageOptions;
RootNode: unknown;
SyntaxElementWithLoc: unknown;
ConfigNode: unknown;
}
/**
* Represents the basic interface for a source code object.
*/
interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
LangOptions: LanguageOptions;
RootNode: unknown;
SyntaxElementWithLoc: unknown;
ConfigNode: unknown;
}> {
/**
* Root of the AST.
*/
ast: Options["RootNode"];
/**
* The traversal path that tools should take when evaluating the AST.
* When present, this overrides the `visitorKeys` on the language for
* just this source code object.
*/
visitorKeys?: Record<string, string[]>;
/**
* Retrieves the equivalent of `loc` for a given node or token.
* @param syntaxElement The node or token to get the location for.
* @returns The location of the node or token.
*/
getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
/**
* Retrieves the equivalent of `range` for a given node or token.
* @param syntaxElement The node or token to get the range for.
* @returns The range of the node or token.
*/
getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
/**
* Traversal of AST.
*/
traverse(): Iterable<TraversalStep>;
/**
* Applies language options passed in from the ESLint core.
*/
applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
/**
* Return all of the inline areas where ESLint should be disabled/enabled
* along with any problems found in evaluating the directives.
*/
getDisableDirectives?(): {
directives: Directive[];
problems: FileProblem[];
};
/**
* Returns an array of all inline configuration nodes found in the
* source code.
*/
getInlineConfigNodes?(): Options["ConfigNode"][];
/**
* Applies configuration found inside of the source code. This method is only
* called when ESLint is running with inline configuration allowed.
*/
applyInlineConfig?(): {
configs: InlineConfigElement[];
problems: FileProblem[];
};
/**
* Called by ESLint core to indicate that it has finished providing
* information. We now add in all the missing variables and ensure that
* state-changing methods cannot be called by rules.
* @returns {void}
*/
finalize?(): void;
}
/**
* Represents the source of a text file being linted.
*/
export interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
LangOptions: LanguageOptions;
RootNode: unknown;
SyntaxElementWithLoc: unknown;
ConfigNode: unknown;
}> extends SourceCodeBase<Options> {
/**
* The body of the file that you'd like rule developers to access.
*/
text: string;
}
/**
* Represents the source of a binary file being linted.
*/
export interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
LangOptions: LanguageOptions;
RootNode: unknown;
SyntaxElementWithLoc: unknown;
ConfigNode: unknown;
}> extends SourceCodeBase<Options> {
/**
* The body of the file that you'd like rule developers to access.
*/
body: Uint8Array;
}
export type SourceCode<Options extends SourceCodeBaseTypeOptions = {
LangOptions: LanguageOptions;
RootNode: unknown;
SyntaxElementWithLoc: unknown;
ConfigNode: unknown;
}> = TextSourceCode<Options> | BinarySourceCode<Options>;
/**
* Represents a traversal step visiting the AST.
*/
export interface VisitTraversalStep {
kind: 1;
target: unknown;
phase: 1 | 2;
args: unknown[];
}
/**
* Represents a traversal step calling a function.
*/
export interface CallTraversalStep {
kind: 2;
target: string;
phase?: string;
args: unknown[];
}
export type TraversalStep = VisitTraversalStep | CallTraversalStep;
/**
* The type of disable directive. This determines how ESLint will disable rules.
*/
export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
/**
* Represents a disable directive.
*/
export interface Directive {
/**
* The type of directive.
*/
type: DirectiveType;
/**
* The node of the directive. May be in the AST or a comment/token.
*/
node: unknown;
/**
* The value of the directive.
*/
value: string;
/**
* The justification for the directive.
*/
justification?: string;
}
export {};node_modules\@eslint\config-helpers\dist\cjs\types.cts (Line 1:1 - Line 31:2), node_modules\@eslint\config-helpers\dist\esm\types.ts (Line 1:1 - Line 31:2)
/**
* @fileoverview Types for this package.
*/
import type { Linter } from "eslint";
/**
* Infinite array type.
*/
export type InfiniteArray<T> = T | InfiniteArray<T>[];
/**
* The type of array element in the `extends` property after flattening.
*/
export type SimpleExtendsElement = string | Linter.Config;
/**
* The type of array element in the `extends` property before flattening.
*/
export type ExtendsElement =
| SimpleExtendsElement
| InfiniteArray<Linter.Config>;
/**
* Config with extends. Valid only inside of `defineConfig()`.
*/
export interface ConfigWithExtends extends Linter.Config {
extends?: ExtendsElement[];
}
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];node_modules\@eslint\config-array\dist\cjs\index.d.cts (Line 4:14 - Line 143:2), node_modules\@eslint\config-array\dist\esm\index.d.ts (Line 4:13 - Line 143:2)
).ConfigObject;
export type IMinimatchStatic = import("minimatch").IMinimatchStatic;
export type IMinimatch = import("minimatch").IMinimatch;
export type PathImpl = typeof import("@jsr/std__path");
export type ObjectSchemaInstance = import("@eslint/object-schema").ObjectSchema;
/**
* Represents an array of config objects and provides method for working with
* those config objects.
*/
export class ConfigArray extends Array<any> {
[x: symbol]: (config: any) => any;
/**
* Creates a new instance of ConfigArray.
* @param {Iterable|Function|Object} configs An iterable yielding config
* objects, or a config function, or a config object.
* @param {Object} options The options for the ConfigArray.
* @param {string} [options.basePath="/"] The absolute path of the config file directory.
* Defaults to `"/"`.
* @param {boolean} [options.normalized=false] Flag indicating if the
* configs have already been normalized.
* @param {Object} [options.schema] The additional schema
* definitions to use for the ConfigArray schema.
* @param {Array<string>} [options.extraConfigTypes] List of config types supported.
* @throws {TypeError} When the `basePath` is not a non-empty string,
*/
constructor(configs: Iterable<any> | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: {
basePath?: string;
normalized?: boolean;
schema?: any;
extraConfigTypes?: Array<string>;
});
/**
* The path of the config file that this array was loaded from.
* This is used to calculate filename matches.
* @property basePath
* @type {string}
*/
basePath: string;
/**
* The supported config types.
* @type {Array<string>}
*/
extraConfigTypes: Array<string>;
/**
* Returns the `files` globs from every config object in the array.
* This can be used to determine which files will be matched by a
* config array or to use as a glob pattern when no patterns are provided
* for a command line interface.
* @returns {Array<string|Function>} An array of matchers.
*/
get files(): Array<string | Function>;
/**
* Returns ignore matchers that should always be ignored regardless of
* the matching `files` fields in any configs. This is necessary to mimic
* the behavior of things like .gitignore and .eslintignore, allowing a
* globbing operation to be faster.
* @returns {Object[]} An array of config objects representing global ignores.
*/
get ignores(): any[];
/**
* Indicates if the config array has been normalized.
* @returns {boolean} True if the config array is normalized, false if not.
*/
isNormalized(): boolean;
/**
* Normalizes a config array by flattening embedded arrays and executing
* config functions.
* @param {Object} [context] The context object for config functions.
* @returns {Promise<ConfigArray>} The current ConfigArray instance.
*/
normalize(context?: any): Promise<ConfigArray>;
/**
* Normalizes a config array by flattening embedded arrays and executing
* config functions.
* @param {Object} [context] The context object for config functions.
* @returns {ConfigArray} The current ConfigArray instance.
*/
normalizeSync(context?: any): ConfigArray;
/**
* Returns the config object for a given file path and a status that can be used to determine why a file has no config.
* @param {string} filePath The path of a file to get a config for.
* @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }}
* An object with an optional property `config` and property `status`.
* `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},
* `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.
*/
getConfigWithStatus(filePath: string): {
config?: any;
status: "ignored" | "external" | "unconfigured" | "matched";
};
/**
* Returns the config object for a given file path.
* @param {string} filePath The path of a file to get a config for.
* @returns {Object|undefined} The config object for this file or `undefined`.
*/
getConfig(filePath: string): any | undefined;
/**
* Determines whether a file has a config or why it doesn't.
* @param {string} filePath The path of the file to check.
* @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values:
* * `"ignored"`: the file is ignored
* * `"external"`: the file is outside the base path
* * `"unconfigured"`: the file is not matched by any config
* * `"matched"`: the file has a matching config
*/
getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched";
/**
* Determines if the given filepath is ignored based on the configs.
* @param {string} filePath The path of a file to check.
* @returns {boolean} True if the path is ignored, false if not.
* @deprecated Use `isFileIgnored` instead.
*/
isIgnored(filePath: string): boolean;
/**
* Determines if the given filepath is ignored based on the configs.
* @param {string} filePath The path of a file to check.
* @returns {boolean} True if the path is ignored, false if not.
*/
isFileIgnored(filePath: string): boolean;
/**
* Determines if the given directory is ignored based on the configs.
* This checks only default `ignores` that don't have `files` in the
* same config. A pattern such as `/foo` be considered to ignore the directory
* while a pattern such as `/foo/**` is not considered to ignore the
* directory because it is matching files.
* @param {string} directoryPath The path of a directory to check.
* @returns {boolean} True if the directory is ignored, false if not. Will
* return true for any directory that is not inside of `basePath`.
* @throws {Error} When the `ConfigArray` is not normalized.
*/
isDirectoryIgnored(directoryPath: string): boolean;
#private;
}
export namespace ConfigArraySymbol {
let isNormalized: symbol;
let configCache: symbol;
let schema: symbol;
let finalizeConfig: symbol;
let preprocessConfig: symbol;
}node_modules\@babel\core\src\config\resolve-targets-browser.ts (Line 22:3 - Line 38:7), node_modules\@babel\core\src\config\resolve-targets.ts (Line 25:3 - Line 41:6)
root: string,
): Targets {
const optTargets = options.targets;
let targets: InputTargets;
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
targets = { browsers: optTargets };
} else if (optTargets) {
if ("esmodules" in optTargets) {
targets = { ...optTargets, esmodules: "intersect" };
} else {
// https://github.com/microsoft/TypeScript/issues/17002
targets = optTargets as InputTargets;
}
}
returnsrc\hooks\board\workspace\useBoardDataManager.ts (Line 45:2 - Line 54:8), src\hooks\settings\profile\useUserProfileManager.ts (Line 25:2 - Line 34:2)
)
.finally(() => {
const elapsed = Date.now() - startTime;
const remainingDelay = Math.max(0, minDelay - elapsed);
setTimeout(() => {
setIsLoading(false);
}, remainingDelay);
});
}, [boardIdsrc\hooks\board\management\useBoardList.ts (Line 67:4 - Line 76:7), src\hooks\settings\profile\useUserProfileManager.ts (Line 25:6 - Line 34:2)
))
.finally(() => {
const elapsed = Date.now() - startTime;
const remainingDelay = Math.max(0, minDelay - elapsed);
setTimeout(() => {
setIsLoading(false);
}, remainingDelay);
});
}, [boardssrc\hooks\board\details\useBoardDetails.ts (Line 43:7 - Line 52:2), src\hooks\board\workspace\useBoardDataManager.ts (Line 45:7 - Line 54:2)
})
.finally(() => {
const elapsed = Date.now() - startTime;
const remainingDelay = Math.max(0, minDelay - elapsed);
setTimeout(() => {
setIsLoading(false);
}, remainingDelay);
});
}, [boardId,node_modules\uri-js\dist\es5\uri.all.min.d.ts (Line 1:1 - Line 59:2), node_modules\uri-js\dist\esnext\uri.d.ts (Line 1:1 - Line 59:2)
export interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
}
export interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
}
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
scheme: string;
parse(components: ParentComponents, options: Options): Components;
serialize(components: Components, options: Options): ParentComponents;
unicodeSupport?: boolean;
domainHost?: boolean;
absolutePath?: boolean;
}
export interface URIRegExps {
NOT_SCHEME: RegExp;
NOT_USERINFO: RegExp;
NOT_HOST: RegExp;
NOT_PATH: RegExp;
NOT_PATH_NOSCHEME: RegExp;
NOT_QUERY: RegExp;
NOT_FRAGMENT: RegExp;
ESCAPE: RegExp;
UNRESERVED: RegExp;
OTHER_CHARS: RegExp;
PCT_ENCODED: RegExp;
IPV4ADDRESS: RegExp;
IPV6ADDRESS: RegExp;
}
export declare const SCHEMES: {
[scheme: string]: URISchemeHandler;
};
export declare function pctEncChar(chr: string): string;
export declare function pctDecChars(str: string): string;
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
export declare function removeDotSegments(input: string): string;
export declare function serialize(components: URIComponents, options?: URIOptions): string;
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
export declare function normalize(uri: string, options?: URIOptions): string;
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
export declare function escapeComponent(str: string, options?: URIOptions): string;
export declare function unescapeComponent(str: string, options?: URIOptions): string;node_modules\uri-js\dist\es5\uri.all.d.ts (Line 1:1 - Line 59:2), node_modules\uri-js\dist\esnext\uri.d.ts (Line 1:1 - Line 59:2)
export interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
}
export interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
}
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
scheme: string;
parse(components: ParentComponents, options: Options): Components;
serialize(components: Components, options: Options): ParentComponents;
unicodeSupport?: boolean;
domainHost?: boolean;
absolutePath?: boolean;
}
export interface URIRegExps {
NOT_SCHEME: RegExp;
NOT_USERINFO: RegExp;
NOT_HOST: RegExp;
NOT_PATH: RegExp;
NOT_PATH_NOSCHEME: RegExp;
NOT_QUERY: RegExp;
NOT_FRAGMENT: RegExp;
ESCAPE: RegExp;
UNRESERVED: RegExp;
OTHER_CHARS: RegExp;
PCT_ENCODED: RegExp;
IPV4ADDRESS: RegExp;
IPV6ADDRESS: RegExp;
}
export declare const SCHEMES: {
[scheme: string]: URISchemeHandler;
};
export declare function pctEncChar(chr: string): string;
export declare function pctDecChars(str: string): string;
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
export declare function removeDotSegments(input: string): string;
export declare function serialize(components: URIComponents, options?: URIOptions): string;
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
export declare function normalize(uri: string, options?: URIOptions): string;
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
export declare function escapeComponent(str: string, options?: URIOptions): string;
export declare function unescapeComponent(str: string, options?: URIOptions): string;node_modules\tsconfig-paths\src\__tests__\tsconfig-loader.test.ts (Line 240:30 - Line 253:7), node_modules\tsconfig-paths\src\__tests__\tsconfig-loader.test.ts (Line 194:22 - Line 205:19)
,
compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } },
};
const firstConfigPath = join("/root", "dir1", "tsconfig.json");
const baseConfig = {
compilerOptions: {
baseUrl: "olle",
paths: { foo: ["bar1"] },
strict: true,
},
};
const baseConfigPath = join(
"/root",
"dir1"node_modules\tsconfig-paths\src\__tests__\tsconfig-loader.test.ts (Line 255:13 - Line 273:45), node_modules\tsconfig-paths\src\__tests__\tsconfig-loader.test.ts (Line 205:8 - Line 221:37)
,
"base-config.json"
);
const res = loadTsconfig(
join("/root", "dir1", "tsconfig.json"),
(path) => path === firstConfigPath || path === baseConfigPath,
(path) => {
if (path === firstConfigPath) {
return JSON.stringify(firstConfig);
}
if (path === baseConfigPath) {
return JSON.stringify(baseConfig);
}
return "";
}
);
// assert.deepEqual(res, {
// extends: "my-package/base-config.json",node_modules\react-router\dist\production\register-DiOIlEq5.d.mts (Line 1:1 - Line 24:2), node_modules\react-router\dist\production\register-DiOIlEq5.d.ts (Line 1:1 - Line 24:2)
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
export type { Pages as P, RouteFiles as R, Register as a };node_modules\react-router\dist\production\dom-export.d.mts (Line 3:25 - Line 54:2), node_modules\react-router\dist\production\dom-export.d.ts (Line 2:15 - Line 53:2)
;
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context object to be passed through to {@link createBrowserRouter} and made
* available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions
*/
unstable_getContext?: RouterInit["unstable_getContext"];
/**
* An error handler function that will be called for any loader/action/render
* errors that are encountered in your application. This is useful for
* logging or reporting errors instead of the `ErrorBoundary` because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter unstable_onError={(error, errorInfo) => {
* console.error(error, errorInfo);
* reportToErrorService(error, errorInfo);
* }} />
* ```
*/
unstable_onError?: unstable_ClientOnErrorFunction;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };node_modules\react-router\dist\development\route-data-DAVP2QQ0.d.mts (Line 1:1 - Line 473:2), node_modules\react-router\dist\production\route-data-DAVP2QQ0.d.mts (Line 1:1 - Line 473:2)
import { ComponentType, ReactElement } from 'react';
import { A as ActionFunctionArgs, c as LoaderFunctionArgs, d as ActionFunction, e as LoaderFunction, P as Params, L as Location, f as DataRouteMatch, g as unstable_MiddlewareFunction, D as DataStrategyResult, S as ShouldRevalidateFunction, h as unstable_RouterContextProvider, i as DataWithResponseInit, M as MiddlewareEnabled } from './context-jKip1TFB.mjs';
/**
* An object of unknown type for route loaders and actions provided by the
* server's `getLoadContext()` function. This is defined as an empty interface
* specifically so apps can leverage declaration merging to augment this type
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
*/
interface AppLoadContext {
[key: string]: unknown;
}
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
interface HtmlLinkProps {
/**
* Address of the hyperlink
*/
href?: string;
/**
* How the element handles crossorigin requests
*/
crossOrigin?: "anonymous" | "use-credentials";
/**
* Relationship between the document containing the hyperlink and the destination resource
*/
rel: LiteralUnion<"alternate" | "dns-prefetch" | "icon" | "manifest" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "search" | "stylesheet", string>;
/**
* Applicable media: "screen", "print", "(max-width: 764px)"
*/
media?: string;
/**
* Integrity metadata used in Subresource Integrity checks
*/
integrity?: string;
/**
* Language of the linked resource
*/
hrefLang?: string;
/**
* Hint for the type of the referenced resource
*/
type?: string;
/**
* Referrer policy for fetches initiated by the element
*/
referrerPolicy?: "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
/**
* Sizes of the icons (for rel="icon")
*/
sizes?: string;
/**
* Potential destination for a preload request (for rel="preload" and rel="modulepreload")
*/
as?: LiteralUnion<"audio" | "audioworklet" | "document" | "embed" | "fetch" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "serviceworker" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt", string>;
/**
* Color to use when customizing a site's icon (for rel="mask-icon")
*/
color?: string;
/**
* Whether the link is disabled
*/
disabled?: boolean;
/**
* The title attribute has special semantics on this element: Title of the link; CSS style sheet set name.
*/
title?: string;
/**
* Images to use in different situations, e.g., high-resolution displays,
* small monitors, etc. (for rel="preload")
*/
imageSrcSet?: string;
/**
* Image sizes for different page layouts (for rel="preload")
*/
imageSizes?: string;
}
interface HtmlLinkPreloadImage extends HtmlLinkProps {
/**
* Relationship between the document containing the hyperlink and the destination resource
*/
rel: "preload";
/**
* Potential destination for a preload request (for rel="preload" and rel="modulepreload")
*/
as: "image";
/**
* Address of the hyperlink
*/
href?: string;
/**
* Images to use in different situations, e.g., high-resolution displays,
* small monitors, etc. (for rel="preload")
*/
imageSrcSet: string;
/**
* Image sizes for different page layouts (for rel="preload")
*/
imageSizes?: string;
}
/**
* Represents a `<link>` element.
*
* WHATWG Specification: https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
*/
type HtmlLinkDescriptor = (HtmlLinkProps & Pick<Required<HtmlLinkProps>, "href">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "imageSizes">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "href"> & {
imageSizes?: never;
});
interface PageLinkDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "type" | "sizes" | "imageSrcSet" | "imageSizes" | "as" | "color" | "title"> {
/**
* A [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce)
* attribute to render on the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
* element
*/
nonce?: string | undefined;
/**
* The absolute path of the page to prefetch, e.g. `/absolute/path`.
*/
page: string;
}
type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
interface RouteModules {
[routeId: string]: RouteModule$1 | undefined;
}
/**
* The shape of a route module shipped to the client
*/
interface RouteModule$1 {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
unstable_clientMiddleware?: unstable_MiddlewareFunction<Record<string, DataStrategyResult>>[];
ErrorBoundary?: ErrorBoundaryComponent;
HydrateFallback?: HydrateFallbackComponent;
Layout?: LayoutComponent;
default: RouteComponent;
handle?: RouteHandle;
links?: LinksFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
}
/**
* The shape of a route module on the server
*/
interface ServerRouteModule extends RouteModule$1 {
action?: ActionFunction;
headers?: HeadersFunction | {
[name: string]: string;
};
loader?: LoaderFunction;
unstable_middleware?: unstable_MiddlewareFunction<Response>[];
}
/**
* A function that handles data mutations for a route on the client
*/
type ClientActionFunction = (args: ClientActionFunctionArgs) => ReturnType<ActionFunction>;
/**
* Arguments passed to a route `clientAction` function
*/
type ClientActionFunctionArgs = ActionFunctionArgs & {
serverAction: <T = unknown>() => Promise<SerializeFrom<T>>;
};
/**
* A function that loads data for a route on the client
*/
type ClientLoaderFunction = ((args: ClientLoaderFunctionArgs) => ReturnType<LoaderFunction>) & {
hydrate?: boolean;
};
/**
* Arguments passed to a route `clientLoader` function
*/
type ClientLoaderFunctionArgs = LoaderFunctionArgs & {
serverLoader: <T = unknown>() => Promise<SerializeFrom<T>>;
};
/**
* ErrorBoundary to display for this route
*/
type ErrorBoundaryComponent = ComponentType;
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
/**
* A function that returns HTTP headers to be used for a route. These headers
* will be merged with (and take precedence over) headers from parent routes.
*/
interface HeadersFunction {
(args: HeadersArgs): Headers | HeadersInit;
}
/**
* `<Route HydrateFallback>` component to render on initial loads
* when client loaders are present
*/
type HydrateFallbackComponent = ComponentType;
/**
* Optional, root-only `<Route Layout>` component to wrap the root content in.
* Useful for defining the <html>/<head>/<body> document shell shared by the
* Component, HydrateFallback, and ErrorBoundary
*/
type LayoutComponent = ComponentType<{
children: ReactElement<unknown, ErrorBoundaryComponent | HydrateFallbackComponent | RouteComponent>;
}>;
/**
* A function that defines `<link>` tags to be inserted into the `<head>` of
* the document on route transitions.
*
* @see https://remix.run/route/meta
*/
interface LinksFunction {
(): LinkDescriptor[];
}
interface MetaMatch<RouteId extends string = string, Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown> {
id: RouteId;
pathname: DataRouteMatch["pathname"];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown;
loaderData: Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown;
handle?: RouteHandle;
params: DataRouteMatch["params"];
meta: MetaDescriptor[];
error?: unknown;
}
type MetaMatches<MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> = Array<{
[K in keyof MatchLoaders]: MetaMatch<Exclude<K, number | symbol>, MatchLoaders[K]>;
}[keyof MatchLoaders]>;
interface MetaArgs<Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown, MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> {
/** @deprecated Use `MetaArgs.loaderData` instead */
data: (Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown) | undefined;
loaderData: (Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown) | undefined;
params: Params;
location: Location;
matches: MetaMatches<MatchLoaders>;
error?: unknown;
}
/**
* A function that returns an array of data objects to use for rendering
* metadata HTML tags in a route. These tags are not rendered on descendant
* routes in the route hierarchy. In other words, they will only be rendered on
* the route in which they are exported.
*
* @param Loader - The type of the current route's loader function
* @param MatchLoaders - Mapping from a parent route's filepath to its loader
* function type
*
* Note that parent route filepaths are relative to the `app/` directory.
*
* For example, if this meta function is for `/sales/customers/$customerId`:
*
* ```ts
* // app/root.tsx
* const loader = () => ({ hello: "world" })
* export type Loader = typeof loader
*
* // app/routes/sales.tsx
* const loader = () => ({ salesCount: 1074 })
* export type Loader = typeof loader
*
* // app/routes/sales/customers.tsx
* const loader = () => ({ customerCount: 74 })
* export type Loader = typeof loader
*
* // app/routes/sales/customers/$customersId.tsx
* import type { Loader as RootLoader } from "../../../root"
* import type { Loader as SalesLoader } from "../../sales"
* import type { Loader as CustomersLoader } from "../../sales/customers"
*
* const loader = () => ({ name: "Customer name" })
*
* const meta: MetaFunction<typeof loader, {
* "root": RootLoader,
* "routes/sales": SalesLoader,
* "routes/sales/customers": CustomersLoader,
* }> = ({ data, matches }) => {
* const { name } = data
* // ^? string
* const { customerCount } = matches.find((match) => match.id === "routes/sales/customers").data
* // ^? number
* const { salesCount } = matches.find((match) => match.id === "routes/sales").data
* // ^? number
* const { hello } = matches.find((match) => match.id === "root").data
* // ^? "world"
* }
* ```
*/
interface MetaFunction<Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown, MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> {
(args: MetaArgs<Loader, MatchLoaders>): MetaDescriptor[] | undefined;
}
type MetaDescriptor = {
charSet: "utf-8";
} | {
title: string;
} | {
name: string;
content: string;
} | {
property: string;
content: string;
} | {
httpEquiv: string;
content: string;
} | {
"script:ld+json": LdJsonObject;
} | {
tagName: "meta" | "link";
[name: string]: string;
} | {
[name: string]: unknown;
};
type LdJsonObject = {
[Key in string]: LdJsonValue;
} & {
[Key in string]?: LdJsonValue | undefined;
};
type LdJsonArray = LdJsonValue[] | readonly LdJsonValue[];
type LdJsonPrimitive = string | number | boolean | null;
type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
/**
* A React component that is rendered for a route.
*/
type RouteComponent = ComponentType<{}>;
/**
* An arbitrary object that is associated with a route.
*
* @see https://remix.run/route/handle
*/
type RouteHandle = unknown;
type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
[key: PropertyKey]: Serializable;
} | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
type IsAny<T> = 0 extends 1 & T ? true : false;
type Func = (...args: any[]) => unknown;
type Pretty<T> = {
[K in keyof T]: T[K];
} & {};
type Normalize<T> = _Normalize<UnionKeys<T>, T>;
type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
[K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
} & {
[K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
} & {
[K in Key as K extends keyof U ? never : K]?: undefined;
}> : never;
type UnionKeys<T> = T extends any ? keyof T : never;
type RouteModule = {
meta?: Func;
links?: Func;
headers?: Func;
loader?: Func;
clientLoader?: Func;
action?: Func;
clientAction?: Func;
HydrateFallback?: Func;
default?: Func;
ErrorBoundary?: Func;
[key: string]: unknown;
};
/**
* A brand that can be applied to a type to indicate that it will serialize
* to a specific type when transported to the client from a loader.
* Only use this if you have additional serialization/deserialization logic
* in your application.
*/
type unstable_SerializesTo<T> = {
unstable__ReactRouter_SerializesTo: [T];
};
type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
[K in keyof T]: Serialize<T[K]>;
} : undefined;
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
type DataFrom<T> = IsAny<T> extends true ? undefined : T extends Func ? VoidToUndefined<Awaited<ReturnType<T>>> : undefined;
type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? U : T;
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
type ClientDataFunctionArgs<Params> = {
/**
* A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
*
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
**/
request: Request;
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function clientLoader({
* params,
* }: Route.ClientLoaderArgs) {
* params.teamId;
* // ^ string
* }
**/
params: Params;
/**
* When `future.unstable_middleware` is not enabled, this is undefined.
*
* When `future.unstable_middleware` is enabled, this is an instance of
* `unstable_RouterContextProvider` and can be used to access context values
* from your route middlewares. You may pass in initial context values in your
* `<HydratedRouter unstable_getContext>` prop
*/
context: Readonly<unstable_RouterContextProvider>;
};
type ServerDataFunctionArgs<Params> = {
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
request: Request;
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function loader({
* params,
* }: Route.LoaderArgs) {
* params.teamId;
* // ^ string
* }
**/
params: Params;
/**
* Without `future.unstable_middleware` enabled, this is the context passed in
* to your server adapter's `getLoadContext` function. It's a way to bridge the
* gap between the adapter's request/response API with your React Router app.
* It is only applicable if you are using a custom server adapter.
*
* With `future.unstable_middleware` enabled, this is an instance of
* `unstable_RouterContextProvider` and can be used for type-safe access to
* context value set in your route middlewares. If you are using a custom
* server adapter, you may provide an initial set of context values from your
* `getLoadContext` function.
*/
context: MiddlewareEnabled extends true ? Readonly<unstable_RouterContextProvider> : AppLoadContext;
};
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
type IsHydrate<ClientLoader> = ClientLoader extends {
hydrate: true;
} ? true : ClientLoader extends {
hydrate: false;
} ? false : false;
type GetLoaderData<T extends RouteModule> = _DataLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
HydrateFallback: Func;
} ? true : false>;
type _DataLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
HasHydrateFallback,
ClientLoaderHydrate
] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
IsDefined<ClientLoaderData>,
IsDefined<ServerLoaderData>
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
type GetActionData<T extends RouteModule> = _DataActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
IsDefined<ServerActionData>,
IsDefined<ClientActionData>
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
export type { AppLoadContext as A, ClientDataFunctionArgs as C, Equal as E, Func as F, GetLoaderData as G, HeadersFunction as H, LinkDescriptor as L, MetaDescriptor as M, Normalize as N, Pretty as P, RouteModule as R, ServerDataFunctionArgs as S, ServerDataFrom as a, GetActionData as b, RouteModules as c, SerializeFrom as d, MetaFunction as e, LinksFunction as f, ClientActionFunction as g, ClientLoaderFunction as h, ClientActionFunctionArgs as i, ClientLoaderFunctionArgs as j, HeadersArgs as k, MetaArgs as l, PageLinkDescriptor as m, HtmlLinkDescriptor as n, ServerRouteModule as o, unstable_SerializesTo as u };node_modules\react-router\dist\development\register-DiOIlEq5.d.ts (Line 1:1 - Line 24:2), node_modules\react-router\dist\production\register-DiOIlEq5.d.ts (Line 1:1 - Line 24:2)
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
export type { Pages as P, RouteFiles as R, Register as a };node_modules\react-router\dist\development\register-DiOIlEq5.d.mts (Line 1:1 - Line 24:2), node_modules\react-router\dist\production\register-DiOIlEq5.d.ts (Line 1:1 - Line 24:2)
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
export type { Pages as P, RouteFiles as R, Register as a };node_modules\react-router\dist\development\dom-export.d.ts (Line 1:1 - Line 53:2), node_modules\react-router\dist\production\dom-export.d.ts (Line 1:1 - Line 53:2)
import * as React from 'react';
import { RouterProviderProps as RouterProviderProps$1, RouterInit, unstable_ClientOnErrorFunction } from 'react-router';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context object to be passed through to {@link createBrowserRouter} and made
* available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions
*/
unstable_getContext?: RouterInit["unstable_getContext"];
/**
* An error handler function that will be called for any loader/action/render
* errors that are encountered in your application. This is useful for
* logging or reporting errors instead of the `ErrorBoundary` because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter unstable_onError={(error, errorInfo) => {
* console.error(error, errorInfo);
* reportToErrorService(error, errorInfo);
* }} />
* ```
*/
unstable_onError?: unstable_ClientOnErrorFunction;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };node_modules\react-router\dist\development\dom-export.d.mts (Line 1:1 - Line 54:2), node_modules\react-router\dist\production\dom-export.d.mts (Line 1:1 - Line 53:2)
import * as React from 'react';
import { R as RouterProviderProps$1, a as RouterInit, u as unstable_ClientOnErrorFunction } from './context-jKip1TFB.mjs';
import './browser-z32v5KVN.mjs';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context object to be passed through to {@link createBrowserRouter} and made
* available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions
*/
unstable_getContext?: RouterInit["unstable_getContext"];
/**
* An error handler function that will be called for any loader/action/render
* errors that are encountered in your application. This is useful for
* logging or reporting errors instead of the `ErrorBoundary` because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter unstable_onError={(error, errorInfo) => {
* console.error(error, errorInfo);
* reportToErrorService(error, errorInfo);
* }} />
* ```
*/
unstable_onError?: unstable_ClientOnErrorFunction;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };node_modules\rc-util\es\utils\set.d.ts (Line 1:1 - Line 6:2), node_modules\rc-util\lib\utils\set.d.ts (Line 1:1 - Line 6:2)
export type Path = (string | number | symbol)[];
export default function set<Entity = any, Output = Entity, Value = any>(entity: Entity, paths: Path, value: Value, removeIfUndefined?: boolean): Output;
/**
* Merge objects which will create
*/
export declare function merge<T extends object>(...sources: T[]): T;node_modules\rc-util\es\test\domHook.d.ts (Line 1:1 - Line 8:2), node_modules\rc-util\lib\test\domHook.d.ts (Line 1:1 - Line 8:2)
export type ElementClass = Function;
export type Property = PropertyDescriptor | Function;
export declare function spyElementPrototypes<T extends ElementClass>(elementClass: T, properties: Record<string, Property>): {
mockRestore(): void;
};
export declare function spyElementPrototype(Element: ElementClass, propName: string, property: Property): {
mockRestore(): void;
};node_modules\rc-util\es\React\render.d.ts (Line 1:1 - Line 13:2), node_modules\rc-util\lib\React\render.d.ts (Line 1:1 - Line 13:2)
import type * as React from 'react';
import type { Root } from 'react-dom/client';
declare const MARK = "__rc_react_root__";
type ContainerType = (Element | DocumentFragment) & {
[MARK]?: Root;
};
/** @private Test usage. Not work in prod */
export declare function _r(node: React.ReactElement, container: ContainerType): void;
export declare function render(node: React.ReactElement, container: ContainerType): void;
/** @private Test usage. Not work in prod */
export declare function _u(container: ContainerType): void;
export declare function unmount(container: ContainerType): Promise<void>;
export {};node_modules\rc-util\es\hooks\useSyncState.d.ts (Line 1:1 - Line 9:2), node_modules\rc-util\lib\hooks\useSyncState.d.ts (Line 1:1 - Line 9:2)
type Updater<T> = T | ((prevValue: T) => T);
export type SetState<T> = (nextValue: Updater<T>) => void;
/**
* Same as React.useState but will always get latest state.
* This is useful when React merge multiple state updates into one.
* e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.
*/
export default function useSyncState<T>(defaultValue?: T): [get: () => T, set: SetState<T>];
export {};node_modules\rc-util\es\hooks\useState.d.ts (Line 1:1 - Line 14:2), node_modules\rc-util\lib\hooks\useState.d.ts (Line 1:1 - Line 14:2)
type Updater<T> = T | ((prevValue: T) => T);
export type SetState<T> = (nextValue: Updater<T>,
/**
* Will not update state when destroyed.
* Developer should make sure this is safe to ignore.
*/
ignoreDestroy?: boolean) => void;
/**
* Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.
* We do not make this auto is to avoid real memory leak.
* Developer should confirm it's safe to ignore themselves.
*/
export default function useSafeState<T>(defaultValue?: T | (() => T)): [T, SetState<T>];
export {};node_modules\rc-util\es\hooks\useMergedState.d.ts (Line 1:1 - Line 12:2), node_modules\rc-util\lib\hooks\useMergedState.d.ts (Line 1:1 - Line 12:2)
type Updater<T> = (updater: T | ((origin: T) => T), ignoreDestroy?: boolean) => void;
/**
* Similar to `useState` but will use props value if provided.
* Note that internal use rc-util `useState` hook.
*/
export default function useMergedState<T, R = T>(defaultStateValue: T | (() => T), option?: {
defaultValue?: T | (() => T);
value?: T;
onChange?: (value: T, prevValue: T) => void;
postState?: (value: T) => T;
}): [R, Updater<T>];
export {};node_modules\rc-util\es\Dom\scrollLocker.d.ts (Line 1:1 - Line 12:2), node_modules\rc-util\lib\Dom\scrollLocker.d.ts (Line 1:1 - Line 12:2)
export interface scrollLockOptions {
container: HTMLElement;
}
export default class ScrollLocker {
private lockTarget;
private options;
constructor(options?: scrollLockOptions);
getContainer: () => HTMLElement | undefined;
reLock: (options?: scrollLockOptions) => void;
lock: () => void;
unLock: () => void;
}node_modules\rc-util\es\Dom\focus.d.ts (Line 1:1 - Line 8:2), node_modules\rc-util\lib\Dom\focus.d.ts (Line 1:1 - Line 8:2)
export declare function getFocusNodeList(node: HTMLElement, includePositive?: boolean): HTMLElement[];
/** @deprecated Do not use since this may failed when used in async */
export declare function saveLastFocusNode(): void;
/** @deprecated Do not use since this may failed when used in async */
export declare function clearLastFocusNode(): void;
/** @deprecated Do not use since this may failed when used in async */
export declare function backLastFocusNode(): void;
export declare function limitTabRange(node: HTMLElement, e: KeyboardEvent): void;node_modules\rc-util\es\Dom\findDOMNode.d.ts (Line 1:1 - Line 12:2), node_modules\rc-util\lib\Dom\findDOMNode.d.ts (Line 1:1 - Line 12:2)
import React from 'react';
export declare function isDOM(node: any): node is HTMLElement | SVGElement;
/**
* Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.
*/
export declare function getDOM(node: any): HTMLElement | SVGElement | null;
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
export default function findDOMNode<T = Element | Text>(node: React.ReactInstance | HTMLElement | SVGElement | {
nativeElement: T;
}): T;node_modules\rc-util\es\Dom\dynamicCSS.d.ts (Line 1:1 - Line 25:2), node_modules\rc-util\lib\Dom\dynamicCSS.d.ts (Line 1:1 - Line 25:2)
export type ContainerType = Element | ShadowRoot;
export type Prepend = boolean | 'queue';
export type AppendType = 'prependQueue' | 'append' | 'prepend';
interface Options {
attachTo?: ContainerType;
csp?: {
nonce?: string;
};
prepend?: Prepend;
/**
* Config the `priority` of `prependQueue`. Default is `0`.
* It's useful if you need to insert style before other style.
*/
priority?: number;
mark?: string;
styles?: HTMLElement[];
}
export declare function injectCSS(css: string, option?: Options): HTMLStyleElement;
export declare function removeCSS(key: string, option?: Options): void;
/**
* manually clear container cache to avoid global cache in unit testes
*/
export declare function clearContainerCache(): void;
export declare function updateCSS(css: string, key: string, originOption?: Options): HTMLElement;
export {};node_modules\rc-slider\es\Tracks\Track.d.ts (Line 1:1 - Line 14:2), node_modules\rc-slider\lib\Tracks\Track.d.ts (Line 1:1 - Line 14:2)
import * as React from 'react';
import type { OnStartMove } from '../interface';
export interface TrackProps {
prefixCls: string;
style?: React.CSSProperties;
/** Replace with origin prefix concat className */
replaceCls?: string;
start: number;
end: number;
index: number;
onStartMove?: OnStartMove;
}
declare const Track: React.FC<TrackProps>;
export default Track;node_modules\rc-slider\es\Tracks\index.d.ts (Line 1:1 - Line 11:2), node_modules\rc-slider\lib\Tracks\index.d.ts (Line 1:1 - Line 11:2)
import * as React from 'react';
import type { OnStartMove } from '../interface';
export interface TrackProps {
prefixCls: string;
style?: React.CSSProperties | React.CSSProperties[];
values: number[];
onStartMove?: OnStartMove;
startPoint?: number;
}
declare const Tracks: React.FC<TrackProps>;
export default Tracks;node_modules\rc-slider\es\Steps\index.d.ts (Line 1:1 - Line 11:2), node_modules\rc-slider\lib\Steps\index.d.ts (Line 1:1 - Line 11:2)
import * as React from 'react';
import type { InternalMarkObj } from '../Marks';
export interface StepsProps {
prefixCls: string;
marks: InternalMarkObj[];
dots?: boolean;
style?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
activeStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
}
declare const Steps: React.FC<StepsProps>;
export default Steps;node_modules\rc-slider\es\Steps\Dot.d.ts (Line 1:1 - Line 9:2), node_modules\rc-slider\lib\Steps\Dot.d.ts (Line 1:1 - Line 9:2)
import * as React from 'react';
export interface DotProps {
prefixCls: string;
value: number;
style?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
activeStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
}
declare const Dot: React.FC<DotProps>;
export default Dot;node_modules\rc-slider\es\Marks\Mark.d.ts (Line 1:1 - Line 10:2), node_modules\rc-slider\lib\Marks\Mark.d.ts (Line 1:1 - Line 10:2)
import * as React from 'react';
export interface MarkProps {
prefixCls: string;
children?: React.ReactNode;
style?: React.CSSProperties;
value: number;
onClick: (value: number) => void;
}
declare const Mark: React.FC<MarkProps>;
export default Mark;node_modules\rc-slider\es\Marks\index.d.ts (Line 1:1 - Line 15:2), node_modules\rc-slider\lib\Marks\index.d.ts (Line 1:1 - Line 15:2)
import * as React from 'react';
export interface MarkObj {
style?: React.CSSProperties;
label?: React.ReactNode;
}
export interface InternalMarkObj extends MarkObj {
value: number;
}
export interface MarksProps {
prefixCls: string;
marks?: InternalMarkObj[];
onClick: (value: number) => void;
}
declare const Marks: React.FC<MarksProps>;
export default Marks;node_modules\rc-slider\es\hooks\useOffset.d.ts (Line 1:1 - Line 10:2), node_modules\rc-slider\lib\hooks\useOffset.d.ts (Line 1:1 - Line 10:2)
import type { InternalMarkObj } from '../Marks';
/** Format value align with step & marks */
type FormatValue = (value: number) => number;
type OffsetMode = 'unit' | 'dist';
export type OffsetValues = (values: number[], offset: number | 'min' | 'max', valueIndex: number, mode?: OffsetMode) => {
value: number;
values: number[];
};
export default function useOffset(min: number, max: number, step: number, markList: InternalMarkObj[], allowCross: boolean, pushable: false | number): [FormatValue, OffsetValues];
export {};node_modules\rc-slider\es\hooks\useDrag.d.ts (Line 1:1 - Line 11:2), node_modules\rc-slider\lib\hooks\useDrag.d.ts (Line 1:1 - Line 11:2)
import * as React from 'react';
import type { Direction, OnStartMove } from '../interface';
import type { OffsetValues } from './useOffset';
declare function useDrag(containerRef: React.RefObject<HTMLDivElement>, direction: Direction, rawValues: number[], min: number, max: number, formatValue: (value: number) => number, triggerChange: (values: number[]) => void, finishChange: (draggingDelete: boolean) => void, offsetValues: OffsetValues, editable: boolean, minCount: number): [
draggingIndex: number,
draggingValue: number,
draggingDelete: boolean,
returnValues: number[],
onStartMove: OnStartMove
];
export default useDrag;node_modules\rc-slider\es\Handles\index.d.ts (Line 1:1 - Line 29:2), node_modules\rc-slider\lib\Handles\index.d.ts (Line 1:1 - Line 29:2)
import * as React from 'react';
import type { OnStartMove } from '../interface';
import type { HandleProps } from './Handle';
export interface HandlesProps {
prefixCls: string;
style?: React.CSSProperties | React.CSSProperties[];
values: number[];
onStartMove: OnStartMove;
onOffsetChange: (value: number | 'min' | 'max', valueIndex: number) => void;
onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
onDelete: (index: number) => void;
handleRender?: HandleProps['render'];
/**
* When config `activeHandleRender`,
* it will render another hidden handle for active usage.
* This is useful for accessibility or tooltip usage.
*/
activeHandleRender?: HandleProps['render'];
draggingIndex: number;
draggingDelete: boolean;
onChangeComplete?: () => void;
}
export interface HandlesRef {
focus: (index: number) => void;
hideHelp: VoidFunction;
}
declare const Handles: React.ForwardRefExoticComponent<HandlesProps & React.RefAttributes<HandlesRef>>;
export default Handles;node_modules\rc-slider\es\Handles\Handle.d.ts (Line 1:1 - Line 27:2), node_modules\rc-slider\lib\Handles\Handle.d.ts (Line 1:1 - Line 27:2)
import * as React from 'react';
import type { OnStartMove } from '../interface';
interface RenderProps {
index: number;
prefixCls: string;
value: number;
dragging: boolean;
draggingDelete: boolean;
}
export interface HandleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onFocus' | 'onMouseEnter'> {
prefixCls: string;
style?: React.CSSProperties;
value: number;
valueIndex: number;
dragging: boolean;
draggingDelete: boolean;
onStartMove: OnStartMove;
onDelete: (index: number) => void;
onOffsetChange: (value: number | 'min' | 'max', valueIndex: number) => void;
onFocus: (e: React.FocusEvent<HTMLDivElement>, index: number) => void;
onMouseEnter: (e: React.MouseEvent<HTMLDivElement>, index: number) => void;
render?: (origin: React.ReactElement<React.HTMLAttributes<HTMLDivElement>>, props: RenderProps) => React.ReactElement;
onChangeComplete?: () => void;
mock?: boolean;
}
declare const Handle: React.ForwardRefExoticComponent<HandleProps & React.RefAttributes<HTMLDivElement>>;
export default Handle;node_modules\jwt-decode\build\cjs\index.d.ts (Line 1:1 - Line 23:2), node_modules\jwt-decode\build\esm\index.d.ts (Line 1:1 - Line 23:2)
export interface JwtDecodeOptions {
header?: boolean;
}
export interface JwtHeader {
typ?: string;
alg?: string;
kid?: string;
}
export interface JwtPayload {
iss?: string;
sub?: string;
aud?: string[] | string;
exp?: number;
nbf?: number;
iat?: number;
jti?: string;
}
export declare class InvalidTokenError extends Error {
}
export declare function jwtDecode<T = JwtHeader>(token: string, options: JwtDecodeOptions & {
header: true;
}): T;
export declare function jwtDecode<T = JwtPayload>(token: string, options?: JwtDecodeOptions): T;node_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.d.ts (Line 82:6 - Line 97:2), node_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.d.ts (Line 57:7 - Line 72:9)
];
readonly type: "string";
};
readonly name: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly items: {
readonly type: "string";
};
readonly minItems: 1;
readonly type: "array";
readonly uniqueItems: true;
}];
};
}node_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.d.ts (Line 104:10 - Line 119:8), node_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.d.ts (Line 57:7 - Line 72:5)
];
readonly type: "string";
};
readonly name: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly items: {
readonly type: "string";
};
readonly minItems: 1;
readonly type: "array";
readonly uniqueItems: true;
}];
};
readonly packagenode_modules\@typescript-eslint\type-utils\dist\isTypeReadonly.d.ts (Line 10:6 - Line 90:23), node_modules\@typescript-eslint\type-utils\dist\TypeOrValueSpecifier.d.ts (Line 49:28 - Line 129:7)
: {
readonly items: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly additionalProperties: false;
readonly properties: {
readonly from: {
readonly enum: ["file"];
readonly type: "string";
};
readonly name: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly items: {
readonly type: "string";
};
readonly minItems: 1;
readonly type: "array";
readonly uniqueItems: true;
}];
};
readonly path: {
readonly type: "string";
};
};
readonly required: ["from", "name"];
readonly type: "object";
}, {
readonly additionalProperties: false;
readonly properties: {
readonly from: {
readonly enum: ["lib"];
readonly type: "string";
};
readonly name: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly items: {
readonly type: "string";
};
readonly minItems: 1;
readonly type: "array";
readonly uniqueItems: true;
}];
};
};
readonly required: ["from", "name"];
readonly type: "object";
}, {
readonly additionalProperties: false;
readonly properties: {
readonly from: {
readonly enum: ["package"];
readonly type: "string";
};
readonly name: {
readonly oneOf: [{
readonly type: "string";
}, {
readonly items: {
readonly type: "string";
};
readonly minItems: 1;
readonly type: "array";
readonly uniqueItems: true;
}];
};
readonly package: {
readonly type: "string";
};
};
readonly required: ["from", "name", "package"];
readonly type: "object";
}];
};
readonly type: "array";
};
treatMethodsAsReadonlynode_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 25:4 - Line 179:5), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\all.d.ts (Line 1:9 - Line 155:7)
: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'class-methods-use-this': "off";
'@typescript-eslint/class-methods-use-this': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'consistent-return': "off";
'@typescript-eslint/consistent-return': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/consistent-type-exports': "error";
'@typescript-eslint/consistent-type-imports': "error";
'default-param-last': "off";
'@typescript-eslint/default-param-last': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/explicit-function-return-type': "error";
'@typescript-eslint/explicit-member-accessibility': "error";
'@typescript-eslint/explicit-module-boundary-types': "error";
'init-declarations': "off";
'@typescript-eslint/init-declarations': "error";
'max-params': "off";
'@typescript-eslint/max-params': "error";
'@typescript-eslint/member-ordering': "error";
'@typescript-eslint/method-signature-style': "error";
'@typescript-eslint/naming-convention': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'no-dupe-class-members': "off";
'@typescript-eslint/no-dupe-class-members': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-import-type-side-effects': "error";
'@typescript-eslint/no-inferrable-types': "error";
'no-invalid-this': "off";
'@typescript-eslint/no-invalid-this': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'no-loop-func': "off";
'@typescript-eslint/no-loop-func': "error";
'no-magic-numbers': "off";
'@typescript-eslint/no-magic-numbers': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'no-redeclare': "off";
'@typescript-eslint/no-redeclare': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'no-restricted-imports': "off";
'@typescript-eslint/no-restricted-imports': "error";
'@typescript-eslint/no-restricted-types': "error";
'no-shadow': "off";
'@typescript-eslint/no-shadow': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-parameter-property-assignment': "error";
'@typescript-eslint/no-unnecessary-qualifier': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-type-assertion': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-use-before-define': "off";
'@typescript-eslint/no-use-before-define': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-useless-empty-export': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/parameter-properties': "error";
'@typescript-eslint/prefer-as-const': "error";
'prefer-destructuring': "off";
'@typescript-eslint/prefer-destructuring': "error";
'@typescript-eslint/prefer-enum-initializers': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-readonly': "error";
'@typescript-eslint/prefer-readonly-parameter-types': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
'@typescript-eslint/promise-function-async': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'@typescript-eslint/require-array-sort-compare': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'no-return-await': "off";
'@typescript-eslint/return-await': "error";
'@typescript-eslint/strict-boolean-expressions': "error";
'@typescript-eslint/switch-exhaustiveness-check': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
basenode_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 186:23 - Line 254:21), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\disable-type-checked.d.ts (Line 1:9 - Line 69:7)
: {
parserOptions: {
program: null;
project: false;
projectService: false;
};
rules: {
'@typescript-eslint/await-thenable': "off";
'@typescript-eslint/consistent-return': "off";
'@typescript-eslint/consistent-type-exports': "off";
'@typescript-eslint/dot-notation': "off";
'@typescript-eslint/naming-convention': "off";
'@typescript-eslint/no-array-delete': "off";
'@typescript-eslint/no-base-to-string': "off";
'@typescript-eslint/no-confusing-void-expression': "off";
'@typescript-eslint/no-deprecated': "off";
'@typescript-eslint/no-duplicate-type-constituents': "off";
'@typescript-eslint/no-floating-promises': "off";
'@typescript-eslint/no-for-in-array': "off";
'@typescript-eslint/no-implied-eval': "off";
'@typescript-eslint/no-meaningless-void-operator': "off";
'@typescript-eslint/no-misused-promises': "off";
'@typescript-eslint/no-misused-spread': "off";
'@typescript-eslint/no-mixed-enums': "off";
'@typescript-eslint/no-redundant-type-constituents': "off";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "off";
'@typescript-eslint/no-unnecessary-condition': "off";
'@typescript-eslint/no-unnecessary-qualifier': "off";
'@typescript-eslint/no-unnecessary-template-expression': "off";
'@typescript-eslint/no-unnecessary-type-arguments': "off";
'@typescript-eslint/no-unnecessary-type-assertion': "off";
'@typescript-eslint/no-unnecessary-type-conversion': "off";
'@typescript-eslint/no-unnecessary-type-parameters': "off";
'@typescript-eslint/no-unsafe-argument': "off";
'@typescript-eslint/no-unsafe-assignment': "off";
'@typescript-eslint/no-unsafe-call': "off";
'@typescript-eslint/no-unsafe-enum-comparison': "off";
'@typescript-eslint/no-unsafe-member-access': "off";
'@typescript-eslint/no-unsafe-return': "off";
'@typescript-eslint/no-unsafe-type-assertion': "off";
'@typescript-eslint/no-unsafe-unary-minus': "off";
'@typescript-eslint/non-nullable-type-assertion-style': "off";
'@typescript-eslint/only-throw-error': "off";
'@typescript-eslint/prefer-destructuring': "off";
'@typescript-eslint/prefer-find': "off";
'@typescript-eslint/prefer-includes': "off";
'@typescript-eslint/prefer-nullish-coalescing': "off";
'@typescript-eslint/prefer-optional-chain': "off";
'@typescript-eslint/prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-readonly': "off";
'@typescript-eslint/prefer-readonly-parameter-types': "off";
'@typescript-eslint/prefer-reduce-type-parameter': "off";
'@typescript-eslint/prefer-regexp-exec': "off";
'@typescript-eslint/prefer-return-this-type': "off";
'@typescript-eslint/prefer-string-starts-ends-with': "off";
'@typescript-eslint/promise-function-async': "off";
'@typescript-eslint/related-getter-setter-pairs': "off";
'@typescript-eslint/require-array-sort-compare': "off";
'@typescript-eslint/require-await': "off";
'@typescript-eslint/restrict-plus-operands': "off";
'@typescript-eslint/restrict-template-expressions': "off";
'@typescript-eslint/return-await': "off";
'@typescript-eslint/strict-boolean-expressions': "off";
'@typescript-eslint/switch-exhaustiveness-check': "off";
'@typescript-eslint/unbound-method': "off";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "off";
};
};
'eslint-recommended'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 260:12 - Line 288:68), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended.d.ts (Line 1:9 - Line 29:7)
: {
extends: string[];
rules: {
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/triple-slash-reference': "error";
};
};
/** @deprecated - please use "recommended-type-checked" instead. */node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 289:38 - Line 344:27), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked.d.ts (Line 1:9 - Line 56:7)
: {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
};
};
'recommended-type-checked'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 344:27 - Line 399:32), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked.d.ts (Line 1:9 - Line 56:7)
: {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
};
};
'recommended-type-checked-only'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 399:32 - Line 431:7), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\recommended-type-checked-only.d.ts (Line 1:9 - Line 33:7)
: {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/unbound-method': "error";
};
};
strictnode_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 431:7 - Line 470:22), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict.d.ts (Line 1:9 - Line 40:7)
: {
extends: string[];
rules: {
'@typescript-eslint/ban-ts-comment': ["error", {
minimumDescriptionLength: number;
}];
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unified-signatures': "error";
};
};
'strict-type-checked'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 470:22 - Line 566:27), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked.d.ts (Line 1:9 - Line 97:7)
: {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': ["error", {
minimumDescriptionLength: number;
}];
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNullish: boolean;
allowNumberAndString: boolean;
allowRegExp: boolean;
}];
'@typescript-eslint/restrict-template-expressions': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNever: boolean;
allowNullish: boolean;
allowNumber: boolean;
allowRegExp: boolean;
}];
'no-return-await': "off";
'@typescript-eslint/return-await': ["error", string];
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
'strict-type-checked-only'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 566:27 - Line 628:10), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\strict-type-checked-only.d.ts (Line 1:9 - Line 63:7)
: {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNullish: boolean;
allowNumberAndString: boolean;
allowRegExp: boolean;
}];
'@typescript-eslint/restrict-template-expressions': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNever: boolean;
allowNullish: boolean;
allowNumber: boolean;
allowRegExp: boolean;
}];
'no-return-await': "off";
'@typescript-eslint/return-await': ["error", string];
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
stylisticnode_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 628:10 - Line 647:25), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic.d.ts (Line 1:9 - Line 20:7)
: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-inferrable-types': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
};
};
'stylistic-type-checked'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 647:25 - Line 675:30), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic-type-checked.d.ts (Line 1:9 - Line 29:7)
: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-inferrable-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
};
};
'stylistic-type-checked-only'node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 675:30 - Line 689:2), node_modules\@typescript-eslint\eslint-plugin\dist\configs\eslintrc\stylistic-type-checked-only.d.ts (Line 1:9 - Line 15:7)
: {
extends: string[];
rules: {
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
};
};
}node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 766:9 - Line 775:11), node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-magic-numbers.d.ts (Line 3:2 - Line 26:14)
.RuleModule<"noMagic", [{
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreEnums?: boolean;
ignoreNumericLiteralTypes?: boolean;
ignoreReadonlyClassProperties?: boolean;
ignoreTypeIndexes?: boolean;
}], import("../rules"node_modules\@typescript-eslint\eslint-plugin\dist\index.d.ts (Line 1:9 - Line 266:38), node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 23:7 - Line 29:7)
: {
configs: {
all: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'class-methods-use-this': "off";
'@typescript-eslint/class-methods-use-this': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'consistent-return': "off";
'@typescript-eslint/consistent-return': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/consistent-type-exports': "error";
'@typescript-eslint/consistent-type-imports': "error";
'default-param-last': "off";
'@typescript-eslint/default-param-last': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/explicit-function-return-type': "error";
'@typescript-eslint/explicit-member-accessibility': "error";
'@typescript-eslint/explicit-module-boundary-types': "error";
'init-declarations': "off";
'@typescript-eslint/init-declarations': "error";
'max-params': "off";
'@typescript-eslint/max-params': "error";
'@typescript-eslint/member-ordering': "error";
'@typescript-eslint/method-signature-style': "error";
'@typescript-eslint/naming-convention': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'no-dupe-class-members': "off";
'@typescript-eslint/no-dupe-class-members': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-import-type-side-effects': "error";
'@typescript-eslint/no-inferrable-types': "error";
'no-invalid-this': "off";
'@typescript-eslint/no-invalid-this': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'no-loop-func': "off";
'@typescript-eslint/no-loop-func': "error";
'no-magic-numbers': "off";
'@typescript-eslint/no-magic-numbers': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'no-redeclare': "off";
'@typescript-eslint/no-redeclare': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'no-restricted-imports': "off";
'@typescript-eslint/no-restricted-imports': "error";
'@typescript-eslint/no-restricted-types': "error";
'no-shadow': "off";
'@typescript-eslint/no-shadow': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-parameter-property-assignment': "error";
'@typescript-eslint/no-unnecessary-qualifier': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-type-assertion': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-use-before-define': "off";
'@typescript-eslint/no-use-before-define': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-useless-empty-export': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/parameter-properties': "error";
'@typescript-eslint/prefer-as-const': "error";
'prefer-destructuring': "off";
'@typescript-eslint/prefer-destructuring': "error";
'@typescript-eslint/prefer-enum-initializers': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-readonly': "error";
'@typescript-eslint/prefer-readonly-parameter-types': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
'@typescript-eslint/promise-function-async': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'@typescript-eslint/require-array-sort-compare': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'no-return-await': "off";
'@typescript-eslint/return-await': "error";
'@typescript-eslint/strict-boolean-expressions': "error";
'@typescript-eslint/switch-exhaustiveness-check': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
base: {
parser: string;
parserOptions: {
sourceType: "module";
};
plugins: string[];
};
'disable-type-checked': {
parserOptions: {
program: null;
project: false;
projectService: false;
};
rules: {
'@typescript-eslint/await-thenable': "off";
'@typescript-eslint/consistent-return': "off";
'@typescript-eslint/consistent-type-exports': "off";
'@typescript-eslint/dot-notation': "off";
'@typescript-eslint/naming-convention': "off";
'@typescript-eslint/no-array-delete': "off";
'@typescript-eslint/no-base-to-string': "off";
'@typescript-eslint/no-confusing-void-expression': "off";
'@typescript-eslint/no-deprecated': "off";
'@typescript-eslint/no-duplicate-type-constituents': "off";
'@typescript-eslint/no-floating-promises': "off";
'@typescript-eslint/no-for-in-array': "off";
'@typescript-eslint/no-implied-eval': "off";
'@typescript-eslint/no-meaningless-void-operator': "off";
'@typescript-eslint/no-misused-promises': "off";
'@typescript-eslint/no-misused-spread': "off";
'@typescript-eslint/no-mixed-enums': "off";
'@typescript-eslint/no-redundant-type-constituents': "off";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "off";
'@typescript-eslint/no-unnecessary-condition': "off";
'@typescript-eslint/no-unnecessary-qualifier': "off";
'@typescript-eslint/no-unnecessary-template-expression': "off";
'@typescript-eslint/no-unnecessary-type-arguments': "off";
'@typescript-eslint/no-unnecessary-type-assertion': "off";
'@typescript-eslint/no-unnecessary-type-conversion': "off";
'@typescript-eslint/no-unnecessary-type-parameters': "off";
'@typescript-eslint/no-unsafe-argument': "off";
'@typescript-eslint/no-unsafe-assignment': "off";
'@typescript-eslint/no-unsafe-call': "off";
'@typescript-eslint/no-unsafe-enum-comparison': "off";
'@typescript-eslint/no-unsafe-member-access': "off";
'@typescript-eslint/no-unsafe-return': "off";
'@typescript-eslint/no-unsafe-type-assertion': "off";
'@typescript-eslint/no-unsafe-unary-minus': "off";
'@typescript-eslint/non-nullable-type-assertion-style': "off";
'@typescript-eslint/only-throw-error': "off";
'@typescript-eslint/prefer-destructuring': "off";
'@typescript-eslint/prefer-find': "off";
'@typescript-eslint/prefer-includes': "off";
'@typescript-eslint/prefer-nullish-coalescing': "off";
'@typescript-eslint/prefer-optional-chain': "off";
'@typescript-eslint/prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-readonly': "off";
'@typescript-eslint/prefer-readonly-parameter-types': "off";
'@typescript-eslint/prefer-reduce-type-parameter': "off";
'@typescript-eslint/prefer-regexp-exec': "off";
'@typescript-eslint/prefer-return-this-type': "off";
'@typescript-eslint/prefer-string-starts-ends-with': "off";
'@typescript-eslint/promise-function-async': "off";
'@typescript-eslint/related-getter-setter-pairs': "off";
'@typescript-eslint/require-array-sort-compare': "off";
'@typescript-eslint/require-await': "off";
'@typescript-eslint/restrict-plus-operands': "off";
'@typescript-eslint/restrict-template-expressions': "off";
'@typescript-eslint/return-await': "off";
'@typescript-eslint/strict-boolean-expressions': "off";
'@typescript-eslint/switch-exhaustiveness-check': "off";
'@typescript-eslint/unbound-method': "off";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "off";
};
};
'eslint-recommended': {
overrides: {
files: string[];
rules: Record<string, "error" | "off" | "warn">;
}[];
};
recommended: {
extends: string[];
rules: {
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/triple-slash-reference': "error";
};
};
'recommended-requiring-type-checking'node_modules\@typescript-eslint\eslint-plugin\dist\index.d.ts (Line 266:9 - Line 672:7), node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 289:13 - Line 695:9)
'recommended-requiring-type-checking': {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
};
};
'recommended-type-checked': {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
};
};
'recommended-type-checked-only': {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'@typescript-eslint/unbound-method': "error";
};
};
strict: {
extends: string[];
rules: {
'@typescript-eslint/ban-ts-comment': ["error", {
minimumDescriptionLength: number;
}];
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unified-signatures': "error";
};
};
'strict-type-checked': {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': ["error", {
minimumDescriptionLength: number;
}];
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/prefer-as-const': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNullish: boolean;
allowNumberAndString: boolean;
allowRegExp: boolean;
}];
'@typescript-eslint/restrict-template-expressions': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNever: boolean;
allowNullish: boolean;
allowNumber: boolean;
allowRegExp: boolean;
}];
'no-return-await': "off";
'@typescript-eslint/return-await': ["error", string];
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
'strict-type-checked-only': {
extends: string[];
rules: {
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNullish: boolean;
allowNumberAndString: boolean;
allowRegExp: boolean;
}];
'@typescript-eslint/restrict-template-expressions': ["error", {
allowAny: boolean;
allowBoolean: boolean;
allowNever: boolean;
allowNullish: boolean;
allowNumber: boolean;
allowRegExp: boolean;
}];
'no-return-await': "off";
'@typescript-eslint/return-await': ["error", string];
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
stylistic: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-inferrable-types': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
};
};
'stylistic-type-checked': {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-inferrable-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
};
};
'stylistic-type-checked-only': {
extends: string[];
rules: {
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
};
};
};
meta: {
name: string;
version: string;
};
rules: {
'adjacent-overload-signatures': importnode_modules\@typescript-eslint\eslint-plugin\dist\index.d.ts (Line 688:11 - Line 695:11), node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 18:14 - Line 25:14)
).ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
'dot-notation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{
allowIndexSignaturePropertyAccess?: boolean;
allowKeywords?: boolean;
allowPattern?: string;
allowPrivateClassPropertyAccess?: boolean;
allowProtectedClassPropertyAccess?: boolean;
}], import("../rules"node_modules\@typescript-eslint\eslint-plugin\dist\index.d.ts (Line 701:11 - Line 708:11), node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 31:14 - Line 38:14)
).ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
'max-params': import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({
countVoidThis?: boolean;
max: number;
} | {
countVoidThis?: boolean;
maximum: number;
})[], import("../rules"node_modules\@typescript-eslint\eslint-plugin\dist\index.d.ts (Line 742:11 - Line 752:7), node_modules\@typescript-eslint\eslint-plugin\dist\rules\index.d.ts (Line 72:14 - Line 775:9)
).ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
'no-magic-numbers': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMagic", [{
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreEnums?: boolean;
ignoreNumericLiteralTypes?: boolean;
ignoreReadonlyClassProperties?: boolean;
ignoreTypeIndexes?: boolean;
}], import("../rules").ESLintPluginDocs, importnode_modules\@types\react\ts5.0\jsx-runtime.d.ts (Line 1:1 - Line 35:2), node_modules\@types\react\ts5.0\v18\ts5.0\jsx-runtime.d.ts (Line 1:1 - Line 35:2)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsx(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxs(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;node_modules\@types\react\ts5.0\jsx-dev-runtime.d.ts (Line 1:1 - Line 44:2), node_modules\@types\react\ts5.0\v18\ts5.0\jsx-runtime.d.ts (Line 1:1 - Line 44:2)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
export interface JSXSource {
/**
* The source file where the element originates from.
*/
fileName?: string | undefined;
/**
* The line number where the element was created.
*/
lineNumber?: number | undefined;
/**
* The column number where the element was created.
*/
columnNumber?: number | undefined;
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxDEV(
type: React.ElementType,
props: unknown,
key: React.Key | undefined,
isStatic: boolean,
source?: JSXSource,
self?: unknown,
): React.ReactElement;node_modules\@types\react\ts5.0\global.d.ts (Line 1:1 - Line 161:2), node_modules\@types\react\ts5.0\v18\ts5.0\global.d.ts (Line 1:1 - Line 161:2)
/*
React projects that don't include the DOM library need these interfaces to compile.
React Native applications use React, but there is no DOM available. The JavaScript runtime
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
Warning: all of these interfaces are empty. If you want type definitions for various properties
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
*/
interface Event {}
interface AnimationEvent extends Event {}
interface ClipboardEvent extends Event {}
interface CompositionEvent extends Event {}
interface DragEvent extends Event {}
interface FocusEvent extends Event {}
interface InputEvent extends Event {}
interface KeyboardEvent extends Event {}
interface MouseEvent extends Event {}
interface TouchEvent extends Event {}
interface PointerEvent extends Event {}
interface ToggleEvent extends Event {}
interface TransitionEvent extends Event {}
interface UIEvent extends Event {}
interface WheelEvent extends Event {}
interface EventTarget {}
interface Document {}
interface DataTransfer {}
interface StyleMedia {}
interface Element {}
interface DocumentFragment {}
interface HTMLElement extends Element {}
interface HTMLAnchorElement extends HTMLElement {}
interface HTMLAreaElement extends HTMLElement {}
interface HTMLAudioElement extends HTMLElement {}
interface HTMLBaseElement extends HTMLElement {}
interface HTMLBodyElement extends HTMLElement {}
interface HTMLBRElement extends HTMLElement {}
interface HTMLButtonElement extends HTMLElement {}
interface HTMLCanvasElement extends HTMLElement {}
interface HTMLDataElement extends HTMLElement {}
interface HTMLDataListElement extends HTMLElement {}
interface HTMLDetailsElement extends HTMLElement {}
interface HTMLDialogElement extends HTMLElement {}
interface HTMLDivElement extends HTMLElement {}
interface HTMLDListElement extends HTMLElement {}
interface HTMLEmbedElement extends HTMLElement {}
interface HTMLFieldSetElement extends HTMLElement {}
interface HTMLFormElement extends HTMLElement {}
interface HTMLHeadingElement extends HTMLElement {}
interface HTMLHeadElement extends HTMLElement {}
interface HTMLHRElement extends HTMLElement {}
interface HTMLHtmlElement extends HTMLElement {}
interface HTMLIFrameElement extends HTMLElement {}
interface HTMLImageElement extends HTMLElement {}
interface HTMLInputElement extends HTMLElement {}
interface HTMLModElement extends HTMLElement {}
interface HTMLLabelElement extends HTMLElement {}
interface HTMLLegendElement extends HTMLElement {}
interface HTMLLIElement extends HTMLElement {}
interface HTMLLinkElement extends HTMLElement {}
interface HTMLMapElement extends HTMLElement {}
interface HTMLMetaElement extends HTMLElement {}
interface HTMLMeterElement extends HTMLElement {}
interface HTMLObjectElement extends HTMLElement {}
interface HTMLOListElement extends HTMLElement {}
interface HTMLOptGroupElement extends HTMLElement {}
interface HTMLOptionElement extends HTMLElement {}
interface HTMLOutputElement extends HTMLElement {}
interface HTMLParagraphElement extends HTMLElement {}
interface HTMLParamElement extends HTMLElement {}
interface HTMLPreElement extends HTMLElement {}
interface HTMLProgressElement extends HTMLElement {}
interface HTMLQuoteElement extends HTMLElement {}
interface HTMLSlotElement extends HTMLElement {}
interface HTMLScriptElement extends HTMLElement {}
interface HTMLSelectElement extends HTMLElement {}
interface HTMLSourceElement extends HTMLElement {}
interface HTMLSpanElement extends HTMLElement {}
interface HTMLStyleElement extends HTMLElement {}
interface HTMLTableElement extends HTMLElement {}
interface HTMLTableColElement extends HTMLElement {}
interface HTMLTableDataCellElement extends HTMLElement {}
interface HTMLTableHeaderCellElement extends HTMLElement {}
interface HTMLTableRowElement extends HTMLElement {}
interface HTMLTableSectionElement extends HTMLElement {}
interface HTMLTemplateElement extends HTMLElement {}
interface HTMLTextAreaElement extends HTMLElement {}
interface HTMLTimeElement extends HTMLElement {}
interface HTMLTitleElement extends HTMLElement {}
interface HTMLTrackElement extends HTMLElement {}
interface HTMLUListElement extends HTMLElement {}
interface HTMLVideoElement extends HTMLElement {}
interface HTMLWebViewElement extends HTMLElement {}
interface SVGElement extends Element {}
interface SVGSVGElement extends SVGElement {}
interface SVGCircleElement extends SVGElement {}
interface SVGClipPathElement extends SVGElement {}
interface SVGDefsElement extends SVGElement {}
interface SVGDescElement extends SVGElement {}
interface SVGEllipseElement extends SVGElement {}
interface SVGFEBlendElement extends SVGElement {}
interface SVGFEColorMatrixElement extends SVGElement {}
interface SVGFEComponentTransferElement extends SVGElement {}
interface SVGFECompositeElement extends SVGElement {}
interface SVGFEConvolveMatrixElement extends SVGElement {}
interface SVGFEDiffuseLightingElement extends SVGElement {}
interface SVGFEDisplacementMapElement extends SVGElement {}
interface SVGFEDistantLightElement extends SVGElement {}
interface SVGFEDropShadowElement extends SVGElement {}
interface SVGFEFloodElement extends SVGElement {}
interface SVGFEFuncAElement extends SVGElement {}
interface SVGFEFuncBElement extends SVGElement {}
interface SVGFEFuncGElement extends SVGElement {}
interface SVGFEFuncRElement extends SVGElement {}
interface SVGFEGaussianBlurElement extends SVGElement {}
interface SVGFEImageElement extends SVGElement {}
interface SVGFEMergeElement extends SVGElement {}
interface SVGFEMergeNodeElement extends SVGElement {}
interface SVGFEMorphologyElement extends SVGElement {}
interface SVGFEOffsetElement extends SVGElement {}
interface SVGFEPointLightElement extends SVGElement {}
interface SVGFESpecularLightingElement extends SVGElement {}
interface SVGFESpotLightElement extends SVGElement {}
interface SVGFETileElement extends SVGElement {}
interface SVGFETurbulenceElement extends SVGElement {}
interface SVGFilterElement extends SVGElement {}
interface SVGForeignObjectElement extends SVGElement {}
interface SVGGElement extends SVGElement {}
interface SVGImageElement extends SVGElement {}
interface SVGLineElement extends SVGElement {}
interface SVGLinearGradientElement extends SVGElement {}
interface SVGMarkerElement extends SVGElement {}
interface SVGMaskElement extends SVGElement {}
interface SVGMetadataElement extends SVGElement {}
interface SVGPathElement extends SVGElement {}
interface SVGPatternElement extends SVGElement {}
interface SVGPolygonElement extends SVGElement {}
interface SVGPolylineElement extends SVGElement {}
interface SVGRadialGradientElement extends SVGElement {}
interface SVGRectElement extends SVGElement {}
interface SVGSetElement extends SVGElement {}
interface SVGStopElement extends SVGElement {}
interface SVGSwitchElement extends SVGElement {}
interface SVGSymbolElement extends SVGElement {}
interface SVGTextElement extends SVGElement {}
interface SVGTextPathElement extends SVGElement {}
interface SVGTSpanElement extends SVGElement {}
interface SVGUseElement extends SVGElement {}
interface SVGViewElement extends SVGElement {}
interface FormData {}
interface Text {}
interface TouchList {}
interface WebGLRenderingContext {}
interface WebGL2RenderingContext {}
interface TrustedHTML {}node_modules\@stomp\stompjs\src\stomp-handler.ts (Line 543:5 - Line 556:7), node_modules\@stomp\stompjs\src\stomp-handler.ts (Line 527:4 - Line 540:5)
(
messageId: string,
subscriptionId: string,
headers: StompHeaders = {}
): void {
headers = (Object as any).assign({}, headers);
if (this._connectedVersion === Versions.V1_2) {
headers.id = messageId;
} else {
headers['message-id'] = messageId;
}
headers.subscription = subscriptionId;
returnnode_modules\@stomp\stompjs\esm6\types.d.ts (Line 1:1 - Line 46:8), node_modules\@stomp\stompjs\src\types.ts (Line 1:1 - Line 52:6)
import type { IFrame } from './i-frame.js';
import type { IMessage } from './i-message.js';
import { StompHeaders } from './stomp-headers.js';
import { Versions } from './versions.js';
/**
* This callback will receive a `string` as a parameter.
*
* Part of `@stomp/stompjs`.
*/
export type debugFnType = (msg: string) => void;
/**
* This callback will receive a {@link IMessage} as parameter.
*
* Part of `@stomp/stompjs`.
*/
export type messageCallbackType = (message: IMessage) => void;
/**
* This callback will receive a {@link IFrame} as parameter.
*
* Part of `@stomp/stompjs`.
*/
export type frameCallbackType = ((frame: IFrame) => void) | (() => void);
/**
* This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
* as parameter.
*
* Part of `@stomp/stompjs`.
*/
export type closeEventCallbackType<T = any> = (evt: T) => void;
/**
* This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
* as parameter.
*
* Part of `@stomp/stompjs`.
*/
export type wsErrorCallbackType<T = any> = (evt: T) => void;
/**
* Parameters for [Client#publish]{@link Client#publish}.
* Aliased as publishParams as well.
*
* Part of `@stomp/stompjs`.
*/
export interface IPublishParams {
/**
* destination end point
*/node_modules\@stomp\stompjs\esm6\types.d.ts (Line 64:5 - Line 111:8), node_modules\@stomp\stompjs\src\types.ts (Line 70:3 - Line 123:6)
skipContentLengthHeader?: boolean;
}
/**
* Backward compatibility, switch to {@link IPublishParams}.
*/
export type publishParams = IPublishParams;
/**
* Used in {@link IRawFrameType}
*
* Part of `@stomp/stompjs`.
*
* @internal
*/
export type RawHeaderType = [string, string];
/**
* The parser yield frames in this structure
*
* Part of `@stomp/stompjs`.
*
* @internal
*/
export interface IRawFrameType {
command: string | undefined;
headers: RawHeaderType[];
binaryBody: Uint8Array | undefined;
}
/**
* @internal
*/
export interface IStompSocketMessageEvent {
data?: string | ArrayBuffer;
}
/**
* Copied from Websocket interface to avoid dom typelib dependency.
*
* @internal
*/
export interface IStompSocket {
url: string;
onclose: ((ev?: any) => any) | undefined | null;
onerror: ((ev: any) => any) | undefined | null;
onmessage: ((ev: IStompSocketMessageEvent) => any) | undefined | null;
onopen: ((ev?: any) => any) | undefined | null;
terminate?: (() => any) | undefined | null;
/**
* Returns a string that indicates how binary data from the socket is exposed to scripts:
* We support only 'arraybuffer'.
*/node_modules\@stomp\stompjs\esm6\types.d.ts (Line 156:1 - Line 182:2), node_modules\@stomp\stompjs\src\types.ts (Line 174:1 - Line 201:2)
}
/**
* @internal
*/
export interface IStomptHandlerConfig {
debug: debugFnType;
stompVersions: Versions;
connectHeaders: StompHeaders;
disconnectHeaders: StompHeaders;
heartbeatIncoming: number;
heartbeatOutgoing: number;
heartbeatStrategy: TickerStrategy;
splitLargeFrames: boolean;
maxWebSocketChunkSize: number;
forceBinaryWSFrames: boolean;
logRawCommunication: boolean;
appendMissingNULLonIncoming: boolean;
discardWebsocketOnCommFailure: boolean;
onConnect: frameCallbackType;
onDisconnect: frameCallbackType;
onStompError: frameCallbackType;
onWebSocketClose: closeEventCallbackType;
onWebSocketError: wsErrorCallbackType;
onUnhandledMessage: messageCallbackType;
onUnhandledReceipt: frameCallbackType;
onUnhandledFrame: frameCallbackType;
}node_modules\@stomp\stompjs\esm6\index.d.ts (Line 1:1 - Line 12:7), node_modules\@stomp\stompjs\src\index.ts (Line 1:1 - Line 13:22)
export * from './client.js';
export * from './frame-impl.js';
export * from './i-frame.js';
export * from './i-message.js';
export * from './parser.js';
export * from './stomp-config.js';
export * from './stomp-headers.js';
export * from './stomp-subscription.js';
export * from './i-transaction.js';
export * from './types.js';
export * from './versions.js';
exportnode_modules\@rolldown\pluginutils\dist\index.d.cts (Line 1:1 - Line 157:2), node_modules\@rolldown\pluginutils\dist\index.d.ts (Line 1:1 - Line 157:2)
//#region src/composable-filters.d.ts
type StringOrRegExp = string | RegExp;
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
type FilterExpressionKind = FilterExpression["kind"];
type FilterExpression = And | Or | Not | Id | ModuleType | Code | Query;
type TopLevelFilterExpression = Include | Exclude;
declare class And {
kind: "and";
args: FilterExpression[];
constructor(...args: FilterExpression[]);
}
declare class Or {
kind: "or";
args: FilterExpression[];
constructor(...args: FilterExpression[]);
}
declare class Not {
kind: "not";
expr: FilterExpression;
constructor(expr: FilterExpression);
}
interface QueryFilterObject {
[key: string]: StringOrRegExp | boolean;
}
interface IdParams {
cleanUrl?: boolean;
}
declare class Id {
kind: "id";
pattern: StringOrRegExp;
params: IdParams;
constructor(pattern: StringOrRegExp, params?: IdParams);
}
declare class ModuleType {
kind: "moduleType";
pattern: PluginModuleType;
constructor(pattern: PluginModuleType);
}
declare class Code {
kind: "code";
pattern: StringOrRegExp;
constructor(expr: StringOrRegExp);
}
declare class Query {
kind: "query";
key: string;
pattern: StringOrRegExp | boolean;
constructor(key: string, pattern: StringOrRegExp | boolean);
}
declare class Include {
kind: "include";
expr: FilterExpression;
constructor(expr: FilterExpression);
}
declare class Exclude {
kind: "exclude";
expr: FilterExpression;
constructor(expr: FilterExpression);
}
declare function and(...args: FilterExpression[]): And;
declare function or(...args: FilterExpression[]): Or;
declare function not(expr: FilterExpression): Not;
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
declare function moduleType(pattern: PluginModuleType): ModuleType;
declare function code(pattern: StringOrRegExp): Code;
declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
declare function include(expr: FilterExpression): Include;
declare function exclude(expr: FilterExpression): Exclude;
/**
* convert a queryObject to FilterExpression like
* ```js
* and(query(k1, v1), query(k2, v2))
* ```
* @param queryFilterObject The query filter object needs to be matched.
* @returns a `And` FilterExpression
*/
declare function queries(queryFilter: QueryFilterObject): And;
declare function interpreter(exprs: TopLevelFilterExpression | TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType): boolean;
interface InterpreterCtx {
urlSearchParamsCache?: URLSearchParams;
}
declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
//#endregion
//#region src/simple-filters.d.ts
/**
* Constructs a RegExp that matches the exact string specified.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { exactRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: exactRegex('foo') },
* handler(id) {} // will only be called for `foo`
* }
* }
* ```
*/
declare function exactRegex(str: string, flags?: string): RegExp;
/**
* Constructs a RegExp that matches a value that has the specified prefix.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { prefixRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: prefixRegex('foo') },
* handler(id) {} // will only be called for IDs starting with `foo`
* }
* }
* ```
*/
declare function prefixRegex(str: string, flags?: string): RegExp;
type WidenString<T> = T extends string ? string : T;
/**
* Converts a id filter to match with an id with a query.
*
* @param input the id filters to convert.
*
* @example
* ```ts
* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* transform: {
* filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
* // The handler will be called for IDs like:
* // - foo.js
* // - foo.js?foo
* // - foo.txt?foo.js
* // - foo.ts
* // - foo.ts?foo
* // - foo.txt?foo.ts
* handler(code, id) {}
* }
* }
* ```
*/
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
//#endregion
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, id, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };node_modules\@jridgewell\trace-mapping\types\types.d.cts (Line 2:22 - Line 107:36), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 2:22 - Line 107:36)
;
export interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
export interface Section {
offset: {
line: number;
column: number;
};
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
export interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
export type OriginalMapping = {
source: string | null;
line: number;
column: number;
name: string | null;
};
export type InvalidOriginalMapping = {
source: null;
line: null;
column: null;
name: null;
};
export type GeneratedMapping = {
line: number;
column: number;
};
export type InvalidGeneratedMapping = {
line: null;
column: null;
};
export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
export type XInput = {
x_google_ignoreList?: SourceMapV3['ignoreList'];
};
export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
export type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
export type Needle = {
line: number;
column: number;
bias?: Bias;
};
export type SourceNeedle = {
source: string;
line: number;
column: number;
bias?: Bias;
};
export type EachMapping = {
generatedLine: number;
generatedColumn: number;
source: null;
originalLine: null;
originalColumn: null;
name: null;
} | {
generatedLine: number;
generatedColumn: number;
source: string | null;
originalLine: number;
originalColumn: number;
name: string | null;
};
export declare abstract class SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
resolvedSources: SourceMapV3['sources'];
ignoreList: SourceMapV3['ignoreList'];
}
export type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = {
[K in keyof T]: T[K] | Ro<T[K]>;
};
export declare function parse<T>(map: T): Exclude<T, string>;
export {};
//# sourceMappingURL=types.d.ts.mapnode_modules\@jridgewell\trace-mapping\types\trace-mapping.d.cts (Line 7:20 - Line 80:44), node_modules\@jridgewell\trace-mapping\types\trace-mapping.d.mts (Line 7:20 - Line 80:44)
;
export declare class TraceMap implements SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
ignoreList: SourceMapV3['ignoreList'];
resolvedSources: string[];
private _encoded;
private _decoded;
private _decodedMemo;
private _bySources;
private _bySourceMemos;
constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
}
/**
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
*/
export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'];
/**
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
*/
export declare function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']>;
/**
* A low-level API to find the segment associated with a generated line/column (think, from a
* stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
*/
export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly<SourceMapSegment> | null;
/**
* A higher-level API to find the source/line/column associated with a generated line/column
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
* `source-map` library.
*/
export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping;
/**
* Finds the generated line/column position of the provided source/line/column source position.
*/
export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping;
/**
* Finds all generated line/column positions of the provided source/line/column source position.
*/
export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[];
/**
* Iterates each mapping in generated position order.
*/
export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
/**
* Retrieves the source content for a particular source, if its found. Returns null if not.
*/
export declare function sourceContentFor(map: TraceMap, source: string): string | null;
/**
* Determines if the source is marked to ignore by the source map.
*/
export declare function isIgnored(map: TraceMap, source: string): boolean;
/**
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
* maps.
*/
export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function decodedMap(map: TraceMap): Omit<DecodedSourceMap, 'mappings'> & {
mappings: readonly SourceMapSegment[][];
};
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function encodedMap(map: TraceMap): EncodedSourceMap;
//# sourceMappingURL=trace-mapping.d.ts.mapnode_modules\@jridgewell\trace-mapping\types\sourcemap-segment.d.cts (Line 1:1 - Line 17:48), node_modules\@jridgewell\trace-mapping\types\sourcemap-segment.d.mts (Line 1:1 - Line 17:48)
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
type GeneratedLine = number;
export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
export declare const COLUMN = 0;
export declare const SOURCES_INDEX = 1;
export declare const SOURCE_LINE = 2;
export declare const SOURCE_COLUMN = 3;
export declare const NAMES_INDEX = 4;
export declare const REV_GENERATED_LINE = 1;
export declare const REV_GENERATED_COLUMN = 2;
export {};
//# sourceMappingURL=sourcemap-segment.d.ts.mapnode_modules\@jridgewell\trace-mapping\types\flatten-map.d.cts (Line 2:14 - Line 9:42), node_modules\@jridgewell\trace-mapping\types\flatten-map.d.mts (Line 2:14 - Line 9:42)
;
type FlattenMap = {
new (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
(map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
};
export declare const FlattenMap: FlattenMap;
export {};
//# sourceMappingURL=flatten-map.d.ts.mapnode_modules\@jridgewell\trace-mapping\types\binary-search.d.cts (Line 1:26 - Line 33:44), node_modules\@jridgewell\trace-mapping\types\binary-search.d.mts (Line 1:26 - Line 33:44)
;
export type MemoState = {
lastKey: number;
lastNeedle: number;
lastIndex: number;
};
export declare let found: boolean;
/**
* A binary search implementation that returns the index if a match is found.
* If no match is found, then the left-index (the index associated with the item that comes just
* before the desired index) is returned. To maintain proper sort order, a splice would happen at
* the next index:
*
* ```js
* const array = [1, 3];
* const needle = 2;
* const index = binarySearch(array, needle, (item, needle) => item - needle);
*
* assert.equal(index, 0);
* array.splice(index + 1, 0, needle);
* assert.deepEqual(array, [1, 2, 3]);
* ```
*/
export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number;
export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
export declare function memoizedState(): MemoState;
/**
* This overly complicated beast is just to record the last tested line/column and the resulting
* index, allowing us to skip a few tests if mappings are monotonically increasing.
*/
export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number;
//# sourceMappingURL=binary-search.d.ts.mapnode_modules\@jridgewell\trace-mapping\src\types.ts (Line 2:18 - Line 23:2), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 2:22 - Line 21:2)
;
export interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
export interface Section {
offset: { line: number; column: number }node_modules\@jridgewell\trace-mapping\src\types.ts (Line 23:2 - Line 58:2), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 22:5 - Line 52:2)
};
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
export interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
export type OriginalMapping = {
source: string | null;
line: number;
column: number;
name: string | null;
};
export type InvalidOriginalMapping = {
source: null;
line: null;
column: null;
name: null;
};
export type GeneratedMapping = {
line: number;
column: number;
};
export type InvalidGeneratedMapping = {
line: null;
column: null;
};
export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] }node_modules\@jridgewell\trace-mapping\src\types.ts (Line 58:2 - Line 71:2), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 53:1 - Line 67:2)
};
export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
export type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
export type Needle = { line: number; column: number; bias?: Bias }node_modules\@jridgewell\trace-mapping\src\types.ts (Line 75:2 - Line 92:9), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 75:2 - Line 90:8)
{
generatedLine: number;
generatedColumn: number;
source: null;
originalLine: null;
originalColumn: null;
name: null;
}
| {
generatedLine: number;
generatedColumn: number;
source: string | null;
originalLine: number;
originalColumn: number;
name: string | null;
};
export abstractnode_modules\@jridgewell\trace-mapping\src\types.ts (Line 100:2 - Line 110:2), node_modules\@jridgewell\trace-mapping\types\types.d.mts (Line 98:5 - Line 103:2)
ignoreList: SourceMapV3['ignoreList'];
}
export type Ro<T> =
T extends Array<infer V>
? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>>
: T extends object
? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>>
: T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = { [K in keyof T]: T[K] | Ro<T[K]> }node_modules\@jridgewell\trace-mapping\src\trace-mapping.ts (Line 46:22 - Line 70:10), node_modules\@jridgewell\trace-mapping\types\trace-mapping.d.mts (Line 3:26 - Line 4:14)
;
export type {
SourceMap,
DecodedSourceMap,
EncodedSourceMap,
Section,
SectionedSourceMap,
SourceMapV3,
Bias,
EachMapping,
GeneratedMapping,
InvalidGeneratedMapping,
InvalidOriginalMapping,
Needle,
OriginalMapping,
OriginalMapping as Mapping,
SectionedSourceMapInput,
SourceMapInput,
SourceNeedle,
XInput,
EncodedSourceMapXInput,
DecodedSourceMapXInput,
SectionedSourceMapXInput,
SectionXInput,
} from './types'node_modules\@jridgewell\trace-mapping\src\trace-mapping.ts (Line 88:2 - Line 95:11), node_modules\@jridgewell\trace-mapping\src\types.ts (Line 92:2 - Line 99:16)
SourceMap {
declare version: SourceMapV3['version'];
declare file: SourceMapV3['file'];
declare names: SourceMapV3['names'];
declare sourceRoot: SourceMapV3['sourceRoot'];
declare sources: SourceMapV3['sources'];
declare sourcesContent: SourceMapV3['sourcesContent'];
declare ignoreListnode_modules\@jridgewell\trace-mapping\src\flatten-map.ts (Line 114:2 - Line 126:7), node_modules\@jridgewell\trace-mapping\src\flatten-map.ts (Line 68:25 - Line 80:2)
,
mapUrl: string | null | undefined,
mappings: SourceMapSegment[][],
sources: string[],
sourcesContent: (string | null)[],
names: string[],
ignoreList: number[],
lineOffset: number,
columnOffset: number,
stopLine: number,
stopColumn: number,
) {
const parsednode_modules\@jridgewell\trace-mapping\src\by-source.ts (Line 18:2 - Line 24:3), node_modules\@jridgewell\trace-mapping\src\trace-mapping.ts (Line 260:4 - Line 267:6)
;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
ifnode_modules\@jridgewell\sourcemap-codec\types\vlq.d.cts (Line 1:16 - Line 7:34), node_modules\@jridgewell\sourcemap-codec\types\vlq.d.mts (Line 1:16 - Line 7:34)
;
export declare const comma: number;
export declare const semicolon: number;
export declare function decodeInteger(reader: StringReader, relative: number): number;
export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number;
export declare function hasMoreVlq(reader: StringReader, max: number): boolean;
//# sourceMappingURL=vlq.d.ts.mapnode_modules\@jridgewell\sourcemap-codec\types\strings.d.cts (Line 1:1 - Line 16:38), node_modules\@jridgewell\sourcemap-codec\types\strings.d.mts (Line 1:1 - Line 16:38)
export declare class StringWriter {
pos: number;
private out;
private buffer;
write(v: number): void;
flush(): string;
}
export declare class StringReader {
pos: number;
private buffer;
constructor(buffer: string);
next(): number;
peek(): number;
indexOf(char: string): number;
}
//# sourceMappingURL=strings.d.ts.mapnode_modules\@jridgewell\sourcemap-codec\types\sourcemap-codec.d.cts (Line 2:15 - Line 9:46), node_modules\@jridgewell\sourcemap-codec\types\sourcemap-codec.d.mts (Line 2:15 - Line 9:46)
;
export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
export type SourceMapLine = SourceMapSegment[];
export type SourceMapMappings = SourceMapLine[];
export declare function decode(mappings: string): SourceMapMappings;
export declare function encode(decoded: SourceMapMappings): string;
export declare function encode(decoded: Readonly<SourceMapMappings>): string;
//# sourceMappingURL=sourcemap-codec.d.ts.mapnode_modules\@jridgewell\sourcemap-codec\types\scopes.d.cts (Line 1:1 - Line 50:37), node_modules\@jridgewell\sourcemap-codec\types\scopes.d.mts (Line 1:1 - Line 50:37)
type Line = number;
type Column = number;
type Kind = number;
type Name = number;
type Var = number;
type SourcesIndex = number;
type ScopesIndex = number;
type Mix<A, B, O> = (A & O) | (B & O);
export type OriginalScope = Mix<[
Line,
Column,
Line,
Column,
Kind
], [
Line,
Column,
Line,
Column,
Kind,
Name
], {
vars: Var[];
}>;
export type GeneratedRange = Mix<[
Line,
Column,
Line,
Column
], [
Line,
Column,
Line,
Column,
SourcesIndex,
ScopesIndex
], {
callsite: CallSite | null;
bindings: Binding[];
isScope: boolean;
}>;
export type CallSite = [SourcesIndex, Line, Column];
type Binding = BindingExpressionRange[];
export type BindingExpressionRange = [Name] | [Name, Line, Column];
export declare function decodeOriginalScopes(input: string): OriginalScope[];
export declare function encodeOriginalScopes(scopes: OriginalScope[]): string;
export declare function decodeGeneratedRanges(input: string): GeneratedRange[];
export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string;
export {};
//# sourceMappingURL=scopes.d.ts.mapnode_modules\@jridgewell\sourcemap-codec\src\scopes.ts (Line 6:1 - Line 19:2), node_modules\@jridgewell\sourcemap-codec\types\scopes.d.mts (Line 1:1 - Line 23:2)
type Line = number;
type Column = number;
type Kind = number;
type Name = number;
type Var = number;
type SourcesIndex = number;
type ScopesIndex = number;
type Mix<A, B, O> = (A & O) | (B & O);
export type OriginalScope = Mix<
[Line, Column, Line, Column, Kind],
[Line, Column, Line, Column, Kind, Name],
{ vars: Var[] }node_modules\@jridgewell\sourcemap-codec\src\scopes.ts (Line 19:2 - Line 35:9), node_modules\@jridgewell\sourcemap-codec\types\scopes.d.mts (Line 24:1 - Line 45:8)
}
>;
export type GeneratedRange = Mix<
[Line, Column, Line, Column],
[Line, Column, Line, Column, SourcesIndex, ScopesIndex],
{
callsite: CallSite | null;
bindings: Binding[];
isScope: boolean;
}
>;
export type CallSite = [SourcesIndex, Line, Column];
type Binding = BindingExpressionRange[];
export type BindingExpressionRange = [Name] | [Name, Line, Column];
export functionnode_modules\@jridgewell\gen-mapping\types\types.d.mts (Line 1:26 - Line 43:2), node_modules\@jridgewell\gen-mapping\dist\types\types.d.ts (Line 1:22 - Line 43:2)
;
export interface SourceMapV3 {
file?: string | null;
names: readonly string[];
sourceRoot?: string;
sources: readonly (string | null)[];
sourcesContent?: readonly (string | null)[];
version: 3;
ignoreList?: readonly number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: readonly SourceMapSegment[][];
}
export interface Pos {
line: number;
column: number;
}
export interface OriginalPos extends Pos {
source: string;
}
export interface BindingExpressionRange {
start: Pos;
expression: string;
}
export type Mapping = {
generated: Pos;
source: undefined;
original: undefined;
name: undefined;
} | {
generated: Pos;
source: string;
original: Pos;
name: string;
} | {
generated: Pos;
source: string;
original: Pos;
name: undefined;
};node_modules\@jridgewell\gen-mapping\types\types.d.cts (Line 1:26 - Line 44:36), node_modules\@jridgewell\gen-mapping\dist\types\types.d.ts (Line 1:22 - Line 44:36)
;
export interface SourceMapV3 {
file?: string | null;
names: readonly string[];
sourceRoot?: string;
sources: readonly (string | null)[];
sourcesContent?: readonly (string | null)[];
version: 3;
ignoreList?: readonly number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: readonly SourceMapSegment[][];
}
export interface Pos {
line: number;
column: number;
}
export interface OriginalPos extends Pos {
source: string;
}
export interface BindingExpressionRange {
start: Pos;
expression: string;
}
export type Mapping = {
generated: Pos;
source: undefined;
original: undefined;
name: undefined;
} | {
generated: Pos;
source: string;
original: Pos;
name: string;
} | {
generated: Pos;
source: string;
original: Pos;
name: undefined;
};
//# sourceMappingURL=types.d.ts.mapnode_modules\@jridgewell\gen-mapping\types\sourcemap-segment.d.mts (Line 1:1 - Line 12:2), node_modules\@jridgewell\gen-mapping\dist\types\sourcemap-segment.d.ts (Line 1:1 - Line 12:2)
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
export declare const COLUMN = 0;
export declare const SOURCES_INDEX = 1;
export declare const SOURCE_LINE = 2;
export declare const SOURCE_COLUMN = 3;
export declare const NAMES_INDEX = 4;
export {};node_modules\@jridgewell\gen-mapping\types\sourcemap-segment.d.cts (Line 1:1 - Line 13:48), node_modules\@jridgewell\gen-mapping\dist\types\sourcemap-segment.d.ts (Line 1:1 - Line 13:48)
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
export declare const COLUMN = 0;
export declare const SOURCES_INDEX = 1;
export declare const SOURCE_LINE = 2;
export declare const SOURCE_COLUMN = 3;
export declare const NAMES_INDEX = 4;
export {};
//# sourceMappingURL=sourcemap-segment.d.ts.mapnode_modules\@jridgewell\gen-mapping\types\set-array.d.mts (Line 1:1 - Line 32:2), node_modules\@jridgewell\gen-mapping\dist\types\set-array.d.ts (Line 1:1 - Line 32:2)
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export declare class SetArray<T extends Key = Key> {
private _indexes;
array: readonly T[];
constructor();
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
/**
* Pops the last added item out of the SetArray.
*/
export declare function pop<T extends Key>(setarr: SetArray<T>): void;
/**
* Removes the key, if it exists in the set.
*/
export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
export {};node_modules\@jridgewell\gen-mapping\types\set-array.d.cts (Line 1:1 - Line 33:40), node_modules\@jridgewell\gen-mapping\dist\types\set-array.d.ts (Line 1:1 - Line 33:40)
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export declare class SetArray<T extends Key = Key> {
private _indexes;
array: readonly T[];
constructor();
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
/**
* Pops the last added item out of the SetArray.
*/
export declare function pop<T extends Key>(setarr: SetArray<T>): void;
/**
* Removes the key, if it exists in the set.
*/
export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
export {};
//# sourceMappingURL=set-array.d.ts.mapnode_modules\@jridgewell\gen-mapping\types\gen-mapping.d.mts (Line 2:14 - Line 88:2), node_modules\@jridgewell\gen-mapping\dist\types\gen-mapping.d.ts (Line 2:10 - Line 88:2)
;
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
export type Options = {
file?: string | null;
sourceRoot?: string | null;
};
/**
* Provides the state to generate a sourcemap.
*/
export declare class GenMapping {
private _names;
private _sources;
private _sourcesContent;
private _mappings;
private _ignoreList;
file: string | null | undefined;
sourceRoot: string | null | undefined;
constructor({ file, sourceRoot }?: Options);
}
/**
* A low-level API to associate a generated position with an original source position. Line and
* column here are 0-based, unlike `addMapping`.
*/
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
/**
* A high-level API to associate a generated position with an original source position. Line is
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
*/
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source?: null;
original?: null;
name?: null;
content?: null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name?: null;
content?: string | null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name: string;
content?: string | null;
}): void;
/**
* Same as `addSegment`, but will only add the segment if it generates useful information in the
* resulting map. This only works correctly if segments are added **in order**, meaning you should
* not add a segment with a lower generated line/column than one that came before.
*/
export declare const maybeAddSegment: typeof addSegment;
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
* not add a mapping with a lower generated line/column than one that came before.
*/
export declare const maybeAddMapping: typeof addMapping;
/**
* Adds/removes the content of the source file to the source map.
*/
export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
/**
* Constructs a new GenMapping, using the already present mappings of the input.
*/
export declare function fromMap(input: SourceMapInput): GenMapping;
/**
* Returns an array of high-level mapping objects for every recorded segment, which could then be
* passed to the `source-map` library.
*/
export declare function allMappings(map: GenMapping): Mapping[];node_modules\@jridgewell\gen-mapping\types\gen-mapping.d.cts (Line 2:14 - Line 89:42), node_modules\@jridgewell\gen-mapping\dist\types\gen-mapping.d.ts (Line 2:10 - Line 89:42)
;
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
export type Options = {
file?: string | null;
sourceRoot?: string | null;
};
/**
* Provides the state to generate a sourcemap.
*/
export declare class GenMapping {
private _names;
private _sources;
private _sourcesContent;
private _mappings;
private _ignoreList;
file: string | null | undefined;
sourceRoot: string | null | undefined;
constructor({ file, sourceRoot }?: Options);
}
/**
* A low-level API to associate a generated position with an original source position. Line and
* column here are 0-based, unlike `addMapping`.
*/
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
/**
* A high-level API to associate a generated position with an original source position. Line is
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
*/
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source?: null;
original?: null;
name?: null;
content?: null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name?: null;
content?: string | null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name: string;
content?: string | null;
}): void;
/**
* Same as `addSegment`, but will only add the segment if it generates useful information in the
* resulting map. This only works correctly if segments are added **in order**, meaning you should
* not add a segment with a lower generated line/column than one that came before.
*/
export declare const maybeAddSegment: typeof addSegment;
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
* not add a mapping with a lower generated line/column than one that came before.
*/
export declare const maybeAddMapping: typeof addMapping;
/**
* Adds/removes the content of the source file to the source map.
*/
export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
/**
* Constructs a new GenMapping, using the already present mappings of the input.
*/
export declare function fromMap(input: SourceMapInput): GenMapping;
/**
* Returns an array of high-level mapping objects for every recorded segment, which could then be
* passed to the `source-map` library.
*/
export declare function allMappings(map: GenMapping): Mapping[];
//# sourceMappingURL=gen-mapping.d.ts.mapnode_modules\@jridgewell\gen-mapping\src\types.ts (Line 2:1 - Line 16:29), node_modules\@jridgewell\gen-mapping\dist\types\types.d.ts (Line 1:1 - Line 13:2)
import type { SourceMapSegment } from './sourcemap-segment';
export interface SourceMapV3 {
file?: string | null;
names: readonly string[];
sourceRoot?: string;
sources: readonly (string | null)[];
sourcesContent?: readonly (string | null)[];
version: 3;
ignoreList?: readonly number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
// originalScopes: string[];node_modules\@jridgewell\gen-mapping\src\types.ts (Line 44:2 - Line 61:2), node_modules\@jridgewell\gen-mapping\dist\types\types.d.ts (Line 28:2 - Line 43:2)
{
generated: Pos;
source: undefined;
original: undefined;
name: undefined;
}
| {
generated: Pos;
source: string;
original: Pos;
name: string;
}
| {
generated: Pos;
source: string;
original: Pos;
name: undefined;
};node_modules\@jridgewell\gen-mapping\src\gen-mapping.ts (Line 413:6 - Line 423:9), node_modules\@jridgewell\trace-mapping\src\by-source.ts (Line 48:8 - Line 58:101)
;
}
function insert<T>(array: T[], index: number, value: T) {
for (let i = array.length; i > index; i--) {
array[i] = array[i - 1];
}
array[index] = value;
}
functionnode_modules\@humanwhocodes\retry\dist\retrier.d.cts (Line 1:1 - Line 46:2), node_modules\@humanwhocodes\retry\dist\retrier.d.ts (Line 1:1 - Line 46:2)
/**
* A class that manages a queue of retry jobs.
*/
export class Retrier {
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
* @param {number} [options.concurrency] The maximum number of concurrent tasks.
*/
constructor(check: Function, { timeout, maxDelay, concurrency }?: {
timeout?: number | undefined;
maxDelay?: number | undefined;
concurrency?: number | undefined;
} | undefined);
/**
* Gets the number of tasks waiting to be retried.
* @returns {number} The number of tasks in the retry queue.
*/
get retrying(): number;
/**
* Gets the number of tasks waiting to be processed in the pending queue.
* @returns {number} The number of tasks in the pending queue.
*/
get pending(): number;
/**
* Gets the number of tasks currently being processed.
* @returns {number} The number of tasks currently being processed.
*/
get working(): number;
/**
* Adds a new retry job to the queue.
* @template {(...args: unknown[]) => Promise<unknown>} Func
* @template {Awaited<ReturnType<Func>>} RetVal
* @param {Func} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<RetVal>} A promise that resolves when the queue is processed.
*/
retry<Func extends (...args: unknown[]) => Promise<unknown>, RetVal extends Awaited<ReturnType<Func>>>(fn: Func, { signal }?: {
signal?: AbortSignal | undefined;
} | undefined): Promise<RetVal>;
#private;
}node_modules\@humanfs\node\dist\node-fsx.d.ts (Line 127:10 - Line 150:2), node_modules\@humanfs\node\dist\node-hfs.d.ts (Line 153:5 - Line 176:2)
>;
#private;
}
/**
* A class representing a file system utility library.
* @implements {HfsImpl}
*/
export class NodeHfs extends Hfs implements HfsImpl {
/**
* Creates a new instance.
* @param {object} [options] The options for the instance.
* @param {Fsp} [options.fsp] The file system module to use.
*/
constructor({ fsp }?: {
fsp?: Fsp;
});
}
export const hfs: NodeHfs;
export type HfsImpl = import("@humanfs/types").HfsImpl;
export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry;
export type Fsp = typeof nativeFsp;
export type Dirent = import("fs").Dirent;
import { Hfs } from "@humanfs/core";
import nativeFsp from "node:fs/promises";node_modules\@humanfs\core\dist\fsx.d.ts (Line 43:8 - Line 95:8), node_modules\@humanfs\core\dist\hfs.d.ts (Line 56:7 - Line 108:8)
;
}
/**
* A class representing a file system utility library.
* @implements {HfsImpl}
*/
export class Hfs implements HfsImpl {
/**
* Creates a new instance.
* @param {object} options The options for the instance.
* @param {HfsImpl} options.impl The implementation to use.
*/
constructor({ impl }: {
impl: HfsImpl;
});
/**
* Starts a new log with the given name.
* @param {string} name The name of the log to start;
* @returns {void}
* @throws {Error} When the log already exists.
* @throws {TypeError} When the name is not a non-empty string.
*/
logStart(name: string): void;
/**
* Ends a log with the given name and returns the entries.
* @param {string} name The name of the log to end.
* @returns {Array<LogEntry>} The entries in the log.
* @throws {Error} When the log does not exist.
*/
logEnd(name: string): Array<LogEntry>;
/**
* Determines if the current implementation is the base implementation.
* @returns {boolean} True if the current implementation is the base implementation.
*/
isBaseImpl(): boolean;
/**
* Sets the implementation for this instance.
* @param {object} impl The implementation to use.
* @returns {void}
*/
setImpl(impl: object): void;
/**
* Resets the implementation for this instance back to its original.
* @returns {void}
*/
resetImpl(): void;
/**
* Reads the given file and returns the contents as text. Assumes UTF-8 encoding.
* @param {string} filePath The file to read.
* @returns {Promise<string|undefined>} The contents of the file.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/node_modules\@eslint\eslintrc\dist\eslintrc.d.cts (Line 1:1 - Line 76:2), node_modules\@eslint\eslintrc\lib\types\index.d.ts (Line 1:1 - Line 76:2)
/**
* @fileoverview This file contains the core types for ESLint. It was initially extracted
* from the `@types/eslint__eslintrc` package.
*/
/*
* MIT License
* Copyright (c) Microsoft Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE
*/
import type { Linter } from "eslint";
/**
* A compatibility class for working with configs.
*/
export class FlatCompat {
constructor({
baseDirectory,
resolvePluginsRelativeTo,
recommendedConfig,
allConfig,
}?: {
/**
* default: process.cwd()
*/
baseDirectory?: string;
resolvePluginsRelativeTo?: string;
recommendedConfig?: Linter.LegacyConfig;
allConfig?: Linter.LegacyConfig;
});
/**
* Translates an ESLintRC-style config into a flag-config-style config.
* @param eslintrcConfig The ESLintRC-style config object.
* @returns A flag-config-style config object.
*/
config(eslintrcConfig: Linter.LegacyConfig): Linter.Config[];
/**
* Translates the `env` section of an ESLintRC-style config.
* @param envConfig The `env` section of an ESLintRC config.
* @returns An array of flag-config objects representing the environments.
*/
env(envConfig: { [name: string]: boolean }): Linter.Config[];
/**
* Translates the `extends` section of an ESLintRC-style config.
* @param configsToExtend The names of the configs to load.
* @returns An array of flag-config objects representing the config.
*/
extends(...configsToExtend: string[]): Linter.Config[];
/**
* Translates the `plugins` section of an ESLintRC-style config.
* @param plugins The names of the plugins to load.
* @returns An array of flag-config objects representing the plugins.
*/
plugins(...plugins: string[]): Linter.Config[];
}src\utils\canvas\recolorLogic.ts (Line 124:2 - Line 140:13), src\utils\canvas\recolorLogic.ts (Line 101:2 - Line 117:26)
= (
object: ActionPayload,
newColor: string,
instanceId: string,
): RecolorAction => {
const updatedPayload = { ...object };
(updatedPayload as ActionPayload & { color: string }).color = newColor;
return {
shouldPerformAction: true,
action: {
type: 'OBJECT_UPDATE',
payload: updatedPayload as Omit<ActionPayload, 'instanceId'>,
sender: instanceId,
instanceId: object.instanceId,
},
reason: `Recoloring src\utils\canvas\hitDetection.ts (Line 210:2 - Line 229:4), src\utils\canvas\hitDetection.ts (Line 171:2 - Line 190:4)
* Math.sin(angle),
});
}
// Ray casting algorithm
let inside = false;
for (let i = 0, j = vertices.length - 1; i < vertices.length; j = i++) {
if (((vertices[i].y > point.y) !== (vertices[j].y > point.y)) &&
(point.x < (vertices[j].x - vertices[i].x) * (point.y - vertices[i].y) /
(vertices[j].y - vertices[i].y) + vertices[i].x)) {
inside = !inside;
}
}
return inside;
};
/**
* Calculate distance from a point to a line segment
*/src\utils\canvas\hitDetection.ts (Line 319:7 - Line 325:11), src\utils\canvas\hitDetection.ts (Line 307:5 - Line 313:9)
.strokeWidth, canvasWidth, canvasHeight,
)) {
return { hit: true, object: obj, hitType: 'stroke' };
}
return { hit: true, object: obj, hitType: 'fill' };
}
} else if (obj.tool === 'triangle'src\utils\canvas\hitDetection.ts (Line 348:9 - Line 356:11), src\utils\canvas\hitDetection.ts (Line 307:5 - Line 313:9)
.strokeWidth,
canvasWidth,
canvasHeight,
)) {
return { hit: true, object: obj, hitType: 'stroke' };
}
return { hit: true, object: obj, hitType: 'fill' };
}
} else if (obj.tool === 'pentagon'src\hooks\auth\useOAuthCallback.ts (Line 99:2 - Line 108:7), src\hooks\auth\useOAuthCallback.ts (Line 81:6 - Line 90:6)
);
window.history.replaceState({}, document.title, '/auth');
navigate(APP_ROUTES.AUTH, { replace: true });
setIsProcessing(false);
sessionStorage.removeItem('oauth_loading');
sessionStorage.removeItem('oauth_callback_processed');
return;
}
loggersrc\hooks\auth\useOAuthCallback.ts (Line 134:25 - Line 140:2), src\hooks\auth\useOAuthCallback.ts (Line 99:22 - Line 87:7)
, 'Authentication failed. Please try again.'));
window.history.replaceState({}, document.title, '/auth');
navigate(APP_ROUTES.AUTH, { replace: true });
setIsProcessing(false);
sessionStorage.removeItem('oauth_loading');
sessionStorage.removeItem('oauth_callback_processed');
}node_modules\typescript\lib\lib.esnext.collection.d.ts (Line 67:12 - Line 96:2), node_modules\typescript\lib\lib.esnext.collection.d.ts (Line 36:4 - Line 65:2)
<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}node_modules\typescript\lib\lib.es2023.array.d.ts (Line 167:5 - Line 185:2), node_modules\typescript\lib\lib.esnext.float16.d.ts (Line 115:5 - Line 136:2)
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this)node_modules\typescript\lib\lib.es2023.array.d.ts (Line 230:11 - Line 270:11), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint8Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 294:18 - Line 341:8), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 165:8)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/node_modules\typescript\lib\lib.es2023.array.d.ts (Line 366:11 - Line 406:11), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int16Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 430:12 - Line 478:12), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint16Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 502:11 - Line 542:11), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 206:10)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (value: number, index: number, array: this) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int32Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 566:12 - Line 614:12), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint32Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 638:13 - Line 686:13), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float32Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 710:13 - Line 758:13), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 166:10 - Line 342:18)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: number,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float64Arraynode_modules\typescript\lib\lib.es2023.array.d.ts (Line 854:15 - Line 902:15), node_modules\typescript\lib\lib.es2023.array.d.ts (Line 782:14 - Line 830:14)
<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the value of the last element in the array where predicate is true, and undefined
* otherwise.
* @param predicate findLast calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found, findLast
* immediately returns that element value. Otherwise, findLast returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(
predicate: (
value: bigint,
index: number,
array: this,
) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (
value: bigint,
index: number,
array: this,
) => unknown,
thisArg?: any,
): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
* otherwise.
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
* order, until it finds one where predicate returns true. If such an element is found,
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(
predicate: (
value: bigint,
index: number,
array: this,
) => unknown,
thisArg?: any,
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): BigUint64Arraynode_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 440:15 - Line 475:15), node_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 149:14 - Line 184:14)
<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
/** The size in bytes of each element in the array. */
readonly BYTES_PER_ELEMENT: number;
/** The ArrayBuffer instance referenced by the array. */
readonly buffer: TArrayBuffer;
/** The length in bytes of the array. */
readonly byteLength: number;
/** The offset in bytes of the array. */
readonly byteOffset: number;
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
/** Yields index, value pairs for every entry in the array. */
entries(): ArrayIterator<[number, bigint]>;
/**
* Determines whether all the members of an array satisfy the specified test.
* @param predicate A function that accepts up to three arguments. The every method calls
* the predicate function for each element in the array until the predicate returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the predicate function.
* If thisArg is omitted, undefined is used as the this value.
*/
every(predicate: (value: bigint, index: number, array: BigUint64Arraynode_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 475:15 - Line 494:15), node_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 184:14 - Line 203:14)
<TArrayBuffer>) => boolean, thisArg?: any): boolean;
/**
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: bigint, start?: number, end?: number): this;
/**
* Returns the elements of an array that meet the condition specified in a callback function.
* @param predicate A function that accepts up to three arguments. The filter method calls
* the predicate function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the predicate function.
* If thisArg is omitted, undefined is used as the this value.
*/
filter(predicate: (value: bigint, index: number, array: BigUint64Arraynode_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 525:15 - Line 571:15), node_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 234:14 - Line 280:14)
<TArrayBuffer>) => void, thisArg?: any): void;
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: bigint, fromIndex?: number): boolean;
/**
* Returns the index of the first occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
indexOf(searchElement: bigint, fromIndex?: number): number;
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/** Yields each index in the array. */
keys(): ArrayIterator<number>;
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: bigint, fromIndex?: number): number;
/** The length of the array. */
readonly length: number;
/**
* Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
* @param callbackfn A function that accepts up to three arguments. The map method calls the
* callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: bigint, index: number, array: BigUint64Arraynode_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 619:15 - Line 636:15), node_modules\typescript\lib\lib.es2020.bigint.d.ts (Line 328:14 - Line 345:14)
<TArrayBuffer>) => U, initialValue: U): U;
/** Reverses the elements in the array. */
reverse(): this;
/**
* Sets a value or an array of values.
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: ArrayLike<bigint>, offset?: number): void;
/**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
*/
slice(start?: number, end?: number): BigUint64Arraynode_modules\typescript\lib\lib.es2019.array.d.ts (Line 53:6 - Line 79:2), node_modules\typescript\lib\lib.es2019.array.d.ts (Line 25:14 - Line 51:2)
<T> {
/**
* Calls a defined callback function on each element of an array. Then, flattens the result into
* a new array.
* This is identical to a map followed by flat with depth 1.
*
* @param callback A function that accepts up to three arguments. The flatMap method calls the
* callback function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callback function. If
* thisArg is omitted, undefined is used as the this value.
*/
flatMap<U, This = undefined>(
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
thisArg?: This,
): U[];
/**
* Returns a new array with all sub-array elements concatenated into it recursively up to the
* specified depth.
*
* @param depth The maximum recursion depth
*/
flat<A, D extends number = 1>(
this: A,
depth?: D,
): FlatArray<A, D>[];
}node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 161:12 - Line 181:15), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 141:4 - Line 161:12)
<K, V> {
/** Returns an iterable of entries in the map. */
[Symbol.iterator](): MapIterator<[K, V]>;
/**
* Returns an iterable of key, value pairs for every entry in the map.
*/
entries(): MapIterator<[K, V]>;
/**
* Returns an iterable of keys in the map
*/
keys(): MapIterator<K>;
/**
* Returns an iterable of values in the map
*/
values(): MapIterator<V>;
}
interface MapConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 216:12 - Line 236:15), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 196:4 - Line 216:12)
<T> {
/** Iterates over values in the set. */
[Symbol.iterator](): SetIterator<T>;
/**
* Returns an iterable of [v,v] pairs for every value `v` in the set.
*/
entries(): SetIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set.
*/
keys(): SetIterator<T>;
/**
* Returns an iterable of values in the set.
*/
values(): SetIterator<T>;
}
interface SetConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 312:11 - Line 331:22), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 349:18 - Line 368:29), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ClampedArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 386:11 - Line 404:22), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int16ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 422:12 - Line 441:23), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint16ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 459:11 - Line 478:22), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int32ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 496:12 - Line 515:23), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint32ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 533:13 - Line 552:24), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float32ArrayConstructornode_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 570:13 - Line 589:24), node_modules\typescript\lib\lib.es2015.iterable.d.ts (Line 275:10 - Line 294:21)
<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float64ArrayConstructornode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 66:7 - Line 117:15), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 27:16 - Line 78:14)
>;
}
interface CSSTransformValue {
[Symbol.iterator](): ArrayIterator<CSSTransformComponent>;
entries(): ArrayIterator<[number, CSSTransformComponent]>;
keys(): ArrayIterator<number>;
values(): ArrayIterator<CSSTransformComponent>;
}
interface CSSUnparsedValue {
[Symbol.iterator](): ArrayIterator<CSSUnparsedSegment>;
entries(): ArrayIterator<[number, CSSUnparsedSegment]>;
keys(): ArrayIterator<number>;
values(): ArrayIterator<CSSUnparsedSegment>;
}
interface Cache {
/**
* The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
*/
addAll(requests: Iterable<RequestInfo>): Promise<void>;
}
interface CanvasPath {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */
roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void;
}
interface CanvasPathDrawingStyles {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */
setLineDash(segments: Iterable<number>): void;
}
interface CookieStoreManager {
/**
* The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe)
*/
subscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
/**
* The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe)
*/
unsubscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
}
interface CustomStateSetnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 140:1 - Line 163:18), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 80:1 - Line 103:16)
}
interface FileList {
[Symbol.iterator](): ArrayIterator<File>;
}
interface FontFaceSet extends Set<FontFace> {
}
interface FormDataIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): FormDataIterator<T>;
}
interface FormData {
[Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>;
/** Returns an array of key, value pairs for every entry in the list. */
entries(): FormDataIterator<[string, FormDataEntryValue]>;
/** Returns a list of keys in the list. */
keys(): FormDataIterator<string>;
/** Returns a list of values in the list. */
values(): FormDataIterator<FormDataEntryValue>;
}
interface HTMLAllCollectionnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 180:18 - Line 197:10), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 100:19 - Line 117:12)
>;
}
interface HeadersIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): HeadersIterator<T>;
}
interface Headers {
[Symbol.iterator](): HeadersIterator<[string, string]>;
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
entries(): HeadersIterator<[string, string]>;
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
keys(): HeadersIterator<string>;
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
values(): HeadersIterator<string>;
}
interface Highlightnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 201:1 - Line 225:13), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 115:1 - Line 139:13)
}
interface IDBDatabase {
/**
* The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
*/
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
}
interface IDBObjectStore {
/**
* The **`createIndex()`** method of the field/column defining a new data point for each database record to contain.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
*/
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
}
interface ImageTrackList {
[Symbol.iterator](): ArrayIterator<ImageTrack>;
}
interface MIDIInputMapnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 252:7 - Line 260:14), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 136:11 - Line 144:33)
>;
}
interface MessageEvent<T = any> {
/** @deprecated */
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}
interface MimeTypeArraynode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 353:2 - Line 367:15), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 141:5 - Line 155:13)
;
}
interface StylePropertyMapReadOnlyIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<T>;
}
interface StylePropertyMapReadOnly {
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
entries(): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
keys(): StylePropertyMapReadOnlyIterator<string>;
values(): StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue>>;
}
interface StyleSheetListnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 368:2 - Line 402:17), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 152:3 - Line 186:24)
;
}
interface SubtleCrypto {
/**
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
*/
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
/**
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
*/
generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
/**
* The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
*/
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
/**
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
*/
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
}
interface TextTrackCueListnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 411:6 - Line 428:22), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 183:10 - Line 200:19)
>;
}
interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): URLSearchParamsIterator<T>;
}
interface URLSearchParams {
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
/** Returns an array of key, value pairs for every entry in the search params. */
entries(): URLSearchParamsIterator<[string, string]>;
/** Returns a list of keys in the search params. */
keys(): URLSearchParamsIterator<string>;
/** Returns a list of values in the search params. */
values(): URLSearchParamsIterator<string>;
}
interface ViewTransitionTypeSetnode_modules\typescript\lib\lib.dom.iterable.d.ts (Line 429:1 - Line 571:2), node_modules\typescript\lib\lib.webworker.iterable.d.ts (Line 198:1 - Line 340:2)
}
interface WEBGL_draw_buffers {
/**
* The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL)
*/
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
}
interface WEBGL_multi_draw {
/**
* The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL)
*/
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
/**
* The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL)
*/
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
/**
* The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL)
*/
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
/**
* The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL)
*/
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
}
interface WebGL2RenderingContextBase {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */
drawBuffers(buffers: Iterable<GLenum>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): GLuint[] | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
}
interface WebGL2RenderingContextOverloads {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
}
interface WebGLRenderingContextBase {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
}
interface WebGLRenderingContextOverloads {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
}node_modules\typescript\lib\lib.dom.asynciterable.d.ts (Line 21:1 - Line 41:2), node_modules\typescript\lib\lib.webworker.asynciterable.d.ts (Line 21:1 - Line 41:2)
/////////////////////////////
interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
}
interface FileSystemDirectoryHandle {
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
}
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
}
interface ReadableStream<R = any> {
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
}node_modules\tsconfig-paths\lib\match-path-async.d.ts (Line 1:1 - Line 15:8), node_modules\tsconfig-paths\src\match-path-async.ts (Line 3:1 - Line 26:9)
import * as MappingEntry from "./mapping-entry";
import * as Filesystem from "./filesystem";
/**
* Function that can match a path async
*/
export interface MatchPathAsync {
(requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: ReadonlyArray<string> | undefined, callback: MatchPathAsyncCallback): void;
}
export interface MatchPathAsyncCallback {
(err?: Error, path?: string): void;
}
/**
* See the sync version for docs.
*/
export declarenode_modules\tsconfig-paths\lib\filesystem.d.ts (Line 11:5 - Line 20:2), node_modules\tsconfig-paths\src\filesystem.ts (Line 15:3 - Line 27:35)
(packageJsonPath: string): any | undefined;
}
export interface FileExistsSync {
(name: string): boolean;
}
export interface FileExistsAsync {
(path: string, callback: (err?: Error, exists?: boolean) => void): void;
}
export interface ReadJsonAsyncCallback {
(node_modules\tsconfig-paths\lib\config-loader.d.ts (Line 10:2 - Line 22:2), node_modules\tsconfig-paths\src\config-loader.ts (Line 12:2 - Line 27:2)
type TsConfigLoader = (params: TsConfigLoader2.TsConfigLoaderParams) => TsConfigLoader2.TsConfigLoaderResult;
export interface ConfigLoaderParams {
cwd: string;
explicitParams?: ExplicitParams;
tsConfigLoader?: TsConfigLoader;
}
export interface ConfigLoaderSuccessResult {
resultType: "success";
configFileAbsolutePath: string;
baseUrl: string;
absoluteBaseUrl: string;
paths: {
[key: string]: Array<string>;node_modules\tinyglobby\dist\index.d.mts (Line 1:1 - Line 46:2), node_modules\tinyglobby\dist\index.d.ts (Line 1:1 - Line 46:2)
//#region src/utils.d.ts
declare const convertPathToPattern: (path: string) => string;
declare const escapePath: (path: string) => string;
// #endregion
// #region isDynamicPattern
/*
Has a few minor differences with `fast-glob` for better accuracy:
Doesn't necessarily return false on patterns that include `\\`.
Returns true if the pattern includes parentheses,
regardless of them representing one single pattern or not.
Returns true for unfinished glob extensions i.e. `(h`, `+(h`.
Returns true for unfinished brace expansions as long as they include `,` or `..`.
*/
declare function isDynamicPattern(pattern: string, options?: {
caseSensitiveMatch: boolean;
}): boolean; //#endregion
//#region src/index.d.ts
// #endregion
// #region log
interface GlobOptions {
absolute?: boolean;
cwd?: string;
patterns?: string | string[];
ignore?: string | string[];
dot?: boolean;
deep?: number;
followSymbolicLinks?: boolean;
caseSensitiveMatch?: boolean;
expandDirectories?: boolean;
onlyDirectories?: boolean;
onlyFiles?: boolean;
debug?: boolean;
}
declare function glob(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
declare function glob(options: GlobOptions): Promise<string[]>;
declare function globSync(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): string[];
declare function globSync(options: GlobOptions): string[];
//#endregion
export { GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };node_modules\react-hot-toast\headless\index.d.ts (Line 13:1 - Line 35:5), node_modules\react-hot-toast\src\core\types.ts (Line 34:2 - Line 60:7)
interface Toast {
type: ToastType;
id: string;
toasterId?: string;
message: ValueOrFunction<Renderable, Toast>;
icon?: Renderable;
duration?: number;
pauseDuration: number;
position?: ToastPosition;
removeDelay?: number;
ariaProps: {
role: 'status' | 'alert';
'aria-live': 'assertive' | 'off' | 'polite';
};
style?: CSSProperties;
className?: string;
iconTheme?: IconTheme;
createdAt: number;
visible: boolean;
dismissed: boolean;
height?: number;
}
typenode_modules\react-hot-toast\headless\index.d.ts (Line 39:1 - Line 50:5), node_modules\react-hot-toast\src\core\types.ts (Line 80:2 - Line 91:7)
interface ToasterProps {
position?: ToastPosition;
toastOptions?: DefaultToastOptions;
reverseOrder?: boolean;
gutter?: number;
containerStyle?: React.CSSProperties;
containerClassName?: string;
toasterId?: string;
children?: (toast: Toast) => React.ReactElement;
}
typenode_modules\react-hot-toast\dist\index.d.ts (Line 3:9 - Line 95:10), node_modules\react-hot-toast\headless\index.d.ts (Line 1:8 - Line 93:7)
;
type ToastType = 'success' | 'error' | 'loading' | 'blank' | 'custom';
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
type Renderable = React.ReactElement | string | null;
interface IconTheme {
primary: string;
secondary: string;
}
type ValueFunction<TValue, TArg> = (arg: TArg) => TValue;
type ValueOrFunction<TValue, TArg> = TValue | ValueFunction<TValue, TArg>;
declare const resolveValue: <TValue, TArg>(valOrFunction: ValueOrFunction<TValue, TArg>, arg: TArg) => TValue;
interface Toast {
type: ToastType;
id: string;
toasterId?: string;
message: ValueOrFunction<Renderable, Toast>;
icon?: Renderable;
duration?: number;
pauseDuration: number;
position?: ToastPosition;
removeDelay?: number;
ariaProps: {
role: 'status' | 'alert';
'aria-live': 'assertive' | 'off' | 'polite';
};
style?: CSSProperties;
className?: string;
iconTheme?: IconTheme;
createdAt: number;
visible: boolean;
dismissed: boolean;
height?: number;
}
type ToastOptions = Partial<Pick<Toast, 'id' | 'icon' | 'duration' | 'ariaProps' | 'className' | 'style' | 'position' | 'iconTheme' | 'toasterId' | 'removeDelay'>>;
type DefaultToastOptions = ToastOptions & {
[key in ToastType]?: ToastOptions;
};
interface ToasterProps {
position?: ToastPosition;
toastOptions?: DefaultToastOptions;
reverseOrder?: boolean;
gutter?: number;
containerStyle?: React.CSSProperties;
containerClassName?: string;
toasterId?: string;
children?: (toast: Toast) => React.ReactElement;
}
type Message = ValueOrFunction<Renderable, Toast>;
type ToastHandler = (message: Message, options?: ToastOptions) => string;
declare const toast: {
(message: Message, opts?: ToastOptions): string;
error: ToastHandler;
success: ToastHandler;
loading: ToastHandler;
custom: ToastHandler;
dismiss(toastId?: string, toasterId?: string): void;
dismissAll(toasterId?: string): void;
remove(toastId?: string, toasterId?: string): void;
removeAll(toasterId?: string): void;
promise<T>(promise: Promise<T> | (() => Promise<T>), msgs: {
loading: Renderable;
success?: ValueOrFunction<Renderable, T>;
error?: ValueOrFunction<Renderable, any>;
}, opts?: DefaultToastOptions): Promise<T>;
};
declare const useToaster: (toastOptions?: DefaultToastOptions, toasterId?: string) => {
toasts: Toast[];
handlers: {
updateHeight: (toastId: string, height: number) => void;
startPause: () => void;
endPause: () => void;
calculateOffset: (toast: Toast, opts?: {
reverseOrder?: boolean;
gutter?: number;
defaultPosition?: ToastPosition;
}) => number;
};
};
interface ToasterSettings {
toastLimit: number;
}
interface ToasterState {
toasts: Toast[];
settings: ToasterSettings;
pausedAt: number | undefined;
}
declare const useStore: (toastOptions?: DefaultToastOptions, toasterId?: string) => ToasterState;
interfacenode_modules\rc-util\es\warning.d.ts (Line 1:1 - Line 32:2), node_modules\rc-util\lib\warning.d.ts (Line 1:1 - Line 32:2)
export type preMessageFn = (message: string, type: 'warning' | 'note') => string | null | undefined | number;
/**
* Pre warning enable you to parse content before console.error.
* Modify to null will prevent warning.
*/
export declare const preMessage: (fn: preMessageFn) => void;
/**
* Warning if condition not match.
* @param valid Condition
* @param message Warning message
* @example
* ```js
* warning(false, 'some error'); // print some error
* warning(true, 'some error'); // print nothing
* warning(1 === 2, 'some error'); // print some error
* ```
*/
export declare function warning(valid: boolean, message: string): void;
/** @see Similar to {@link warning} */
export declare function note(valid: boolean, message: string): void;
export declare function resetWarned(): void;
export declare function call(method: (valid: boolean, message: string) => void, valid: boolean, message: string): void;
/** @see Same as {@link warning}, but only warn once for the same message */
export declare function warningOnce(valid: boolean, message: string): void;
export declare namespace warningOnce {
var preMessage: (fn: preMessageFn) => void;
var resetWarned: typeof import("./warning").resetWarned;
var noteOnce: typeof import("./warning").noteOnce;
}
/** @see Same as {@link warning}, but only warn once for the same message */
export declare function noteOnce(valid: boolean, message: string): void;
export default warningOnce;node_modules\rc-util\es\ref.d.ts (Line 1:1 - Line 19:2), node_modules\rc-util\lib\ref.d.ts (Line 1:1 - Line 19:2)
import type * as React from 'react';
export declare const fillRef: <T>(ref: React.Ref<T>, node: T) => void;
/**
* Merge refs into one ref function to support ref passing.
*/
export declare const composeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
export declare const useComposeRef: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
export declare const supportRef: (nodeOrComponent: any) => boolean;
interface RefAttributes<T> extends React.Attributes {
ref: React.Ref<T>;
}
export declare const supportNodeRef: <T = any>(node: React.ReactNode) => node is React.ReactElement<any, string | React.JSXElementConstructor<any>> & RefAttributes<T>;
/**
* In React 19. `ref` is not a property from node.
* But a property from `props.ref`.
* To check if `props.ref` exist or fallback to `ref`.
*/
export declare const getNodeRef: <T = any>(node: React.ReactNode) => React.Ref<T> | null;
export {};node_modules\rc-util\es\PortalWrapper.d.ts (Line 1:1 - Line 51:2), node_modules\rc-util\lib\PortalWrapper.d.ts (Line 1:1 - Line 51:2)
import * as React from 'react';
import { PortalRef } from './Portal';
import ScrollLocker from './Dom/scrollLocker';
/** @private Test usage only */
export declare function getOpenCount(): number;
export type GetContainer = string | HTMLElement | (() => HTMLElement);
export interface PortalWrapperProps {
visible?: boolean;
getContainer?: GetContainer;
wrapperClassName?: string;
forceRender?: boolean;
children: (info: {
getOpenCount: () => number;
getContainer: () => HTMLElement;
switchScrollingEffect: () => void;
scrollLocker: ScrollLocker;
ref?: (c: any) => void;
}) => React.ReactNode;
}
declare class PortalWrapper extends React.Component<PortalWrapperProps> {
container?: HTMLElement;
componentRef: React.RefObject<PortalRef>;
rafId?: number;
scrollLocker: ScrollLocker;
constructor(props: PortalWrapperProps);
renderComponent?: (info: {
afterClose: Function;
onClose: Function;
visible: boolean;
}) => void;
componentDidMount(): void;
componentDidUpdate(prevProps: PortalWrapperProps): void;
updateScrollLocker: (prevProps?: Partial<PortalWrapperProps>) => void;
updateOpenCount: (prevProps?: Partial<PortalWrapperProps>) => void;
componentWillUnmount(): void;
attachToParent: (force?: boolean) => boolean;
getContainer: () => HTMLElement;
setWrapperClassName: () => void;
removeCurrentContainer: () => void;
/**
* Enhance ./switchScrollingEffect
* 1. Simulate document body scroll bar with
* 2. Record body has overflow style and recover when all of PortalWrapper invisible
* 3. Disable body scroll when PortalWrapper has open
*
* @memberof PortalWrapper
*/
switchScrollingEffect: () => void;
render(): any;
}
export default PortalWrapper;node_modules\rc-util\es\Portal.d.ts (Line 1:1 - Line 9:2), node_modules\rc-util\lib\Portal.d.ts (Line 1:1 - Line 9:2)
import type * as React from 'react';
export type PortalRef = {};
export interface PortalProps {
didUpdate?: (prevProps: PortalProps) => void;
getContainer: () => HTMLElement;
children?: React.ReactNode;
}
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<PortalRef>>;
export default Portal;node_modules\rc-util\es\KeyCode.d.ts (Line 1:1 - Line 436:2), node_modules\rc-util\lib\KeyCode.d.ts (Line 1:1 - Line 436:2)
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
declare const KeyCode: {
/**
* MAC_ENTER
*/
MAC_ENTER: number;
/**
* BACKSPACE
*/
BACKSPACE: number;
/**
* TAB
*/
TAB: number;
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: number;
/**
* ENTER
*/
ENTER: number;
/**
* SHIFT
*/
SHIFT: number;
/**
* CTRL
*/
CTRL: number;
/**
* ALT
*/
ALT: number;
/**
* PAUSE
*/
PAUSE: number;
/**
* CAPS_LOCK
*/
CAPS_LOCK: number;
/**
* ESC
*/
ESC: number;
/**
* SPACE
*/
SPACE: number;
/**
* PAGE_UP
*/
PAGE_UP: number;
/**
* PAGE_DOWN
*/
PAGE_DOWN: number;
/**
* END
*/
END: number;
/**
* HOME
*/
HOME: number;
/**
* LEFT
*/
LEFT: number;
/**
* UP
*/
UP: number;
/**
* RIGHT
*/
RIGHT: number;
/**
* DOWN
*/
DOWN: number;
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: number;
/**
* INSERT
*/
INSERT: number;
/**
* DELETE
*/
DELETE: number;
/**
* ZERO
*/
ZERO: number;
/**
* ONE
*/
ONE: number;
/**
* TWO
*/
TWO: number;
/**
* THREE
*/
THREE: number;
/**
* FOUR
*/
FOUR: number;
/**
* FIVE
*/
FIVE: number;
/**
* SIX
*/
SIX: number;
/**
* SEVEN
*/
SEVEN: number;
/**
* EIGHT
*/
EIGHT: number;
/**
* NINE
*/
NINE: number;
/**
* QUESTION_MARK
*/
QUESTION_MARK: number;
/**
* A
*/
A: number;
/**
* B
*/
B: number;
/**
* C
*/
C: number;
/**
* D
*/
D: number;
/**
* E
*/
E: number;
/**
* F
*/
F: number;
/**
* G
*/
G: number;
/**
* H
*/
H: number;
/**
* I
*/
I: number;
/**
* J
*/
J: number;
/**
* K
*/
K: number;
/**
* L
*/
L: number;
/**
* M
*/
M: number;
/**
* N
*/
N: number;
/**
* O
*/
O: number;
/**
* P
*/
P: number;
/**
* Q
*/
Q: number;
/**
* R
*/
R: number;
/**
* S
*/
S: number;
/**
* T
*/
T: number;
/**
* U
*/
U: number;
/**
* V
*/
V: number;
/**
* W
*/
W: number;
/**
* X
*/
X: number;
/**
* Y
*/
Y: number;
/**
* Z
*/
Z: number;
/**
* META
*/
META: number;
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: number;
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: number;
/**
* NUM_ZERO
*/
NUM_ZERO: number;
/**
* NUM_ONE
*/
NUM_ONE: number;
/**
* NUM_TWO
*/
NUM_TWO: number;
/**
* NUM_THREE
*/
NUM_THREE: number;
/**
* NUM_FOUR
*/
NUM_FOUR: number;
/**
* NUM_FIVE
*/
NUM_FIVE: number;
/**
* NUM_SIX
*/
NUM_SIX: number;
/**
* NUM_SEVEN
*/
NUM_SEVEN: number;
/**
* NUM_EIGHT
*/
NUM_EIGHT: number;
/**
* NUM_NINE
*/
NUM_NINE: number;
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: number;
/**
* NUM_PLUS
*/
NUM_PLUS: number;
/**
* NUM_MINUS
*/
NUM_MINUS: number;
/**
* NUM_PERIOD
*/
NUM_PERIOD: number;
/**
* NUM_DIVISION
*/
NUM_DIVISION: number;
/**
* F1
*/
F1: number;
/**
* F2
*/
F2: number;
/**
* F3
*/
F3: number;
/**
* F4
*/
F4: number;
/**
* F5
*/
F5: number;
/**
* F6
*/
F6: number;
/**
* F7
*/
F7: number;
/**
* F8
*/
F8: number;
/**
* F9
*/
F9: number;
/**
* F10
*/
F10: number;
/**
* F11
*/
F11: number;
/**
* F12
*/
F12: number;
/**
* NUMLOCK
*/
NUMLOCK: number;
/**
* SEMICOLON
*/
SEMICOLON: number;
/**
* DASH
*/
DASH: number;
/**
* EQUALS
*/
EQUALS: number;
/**
* COMMA
*/
COMMA: number;
/**
* PERIOD
*/
PERIOD: number;
/**
* SLASH
*/
SLASH: number;
/**
* APOSTROPHE
*/
APOSTROPHE: number;
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: number;
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: number;
/**
* BACKSLASH
*/
BACKSLASH: number;
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: number;
/**
* WIN_KEY
*/
WIN_KEY: number;
/**
* MAC_FF_META
*/
MAC_FF_META: number;
/**
* WIN_IME
*/
WIN_IME: number;
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: (e: KeyboardEvent) => boolean;
/**
* whether character is entered.
*/
isCharacterKey: (keyCode: number) => boolean;
};
export default KeyCode;node_modules\rc-util\es\index.d.ts (Line 1:1 - Line 6:2), node_modules\rc-util\lib\index.d.ts (Line 1:1 - Line 6:2)
export { default as useEvent } from './hooks/useEvent';
export { default as useMergedState } from './hooks/useMergedState';
export { supportNodeRef, supportRef, useComposeRef } from './ref';
export { default as get } from './utils/get';
export { default as set } from './utils/set';
export { default as warning } from './warning';node_modules\rc-slider\es\util.d.ts (Line 1:1 - Line 6:2), node_modules\rc-slider\lib\util.d.ts (Line 1:1 - Line 6:2)
/// <reference types="react" />
import type { Direction } from './interface';
export declare function getOffset(value: number, min: number, max: number): number;
export declare function getDirectionStyle(direction: Direction, value: number, min: number, max: number): import("react").CSSProperties;
/** Return index value if is list or return value directly */
export declare function getIndex<T>(value: T | T[], index: number): T;node_modules\rc-slider\es\Slider.d.ts (Line 1:1 - Line 82:2), node_modules\rc-slider\lib\Slider.d.ts (Line 1:1 - Line 82:2)
import * as React from 'react';
import type { HandlesProps } from './Handles';
import type { MarkObj } from './Marks';
import type { AriaValueFormat, SliderClassNames, SliderStyles } from './interface';
/**
* New:
* - click mark to update range value
* - handleRender
* - Fix handle with count not correct
* - Fix pushable not work in some case
* - No more FindDOMNode
* - Move all position related style into inline style
* - Key: up is plus, down is minus
* - fix Key with step = null not align with marks
* - Change range should not trigger onChange
* - keyboard support pushable
*/
export type RangeConfig = {
editable?: boolean;
draggableTrack?: boolean;
/** Set min count when `editable` */
minCount?: number;
/** Set max count when `editable` */
maxCount?: number;
};
export interface SliderProps<ValueType = number | number[]> {
prefixCls?: string;
className?: string;
style?: React.CSSProperties;
classNames?: SliderClassNames;
styles?: SliderStyles;
id?: string;
disabled?: boolean;
keyboard?: boolean;
autoFocus?: boolean;
onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
range?: boolean | RangeConfig;
/** @deprecated Use `range.minCount` or `range.maxCount` to handle this */
count?: number;
min?: number;
max?: number;
step?: number | null;
value?: ValueType;
defaultValue?: ValueType;
onChange?: (value: ValueType) => void;
/** @deprecated It's always better to use `onChange` instead */
onBeforeChange?: (value: ValueType) => void;
/** @deprecated Use `onChangeComplete` instead */
onAfterChange?: (value: ValueType) => void;
onChangeComplete?: (value: ValueType) => void;
allowCross?: boolean;
pushable?: boolean | number;
reverse?: boolean;
vertical?: boolean;
included?: boolean;
startPoint?: number;
/** @deprecated Please use `styles.track` instead */
trackStyle?: React.CSSProperties | React.CSSProperties[];
/** @deprecated Please use `styles.handle` instead */
handleStyle?: React.CSSProperties | React.CSSProperties[];
/** @deprecated Please use `styles.rail` instead */
railStyle?: React.CSSProperties;
dotStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
activeDotStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
marks?: Record<string | number, React.ReactNode | MarkObj>;
dots?: boolean;
handleRender?: HandlesProps['handleRender'];
activeHandleRender?: HandlesProps['handleRender'];
track?: boolean;
tabIndex?: number | number[];
ariaLabelForHandle?: string | string[];
ariaLabelledByForHandle?: string | string[];
ariaRequired?: boolean;
ariaValueTextFormatterForHandle?: AriaValueFormat | AriaValueFormat[];
}
export interface SliderRef {
focus: () => void;
blur: () => void;
}
declare const Slider: React.ForwardRefExoticComponent<SliderProps<number | number[]> & React.RefAttributes<SliderRef>>;
export default Slider;node_modules\rc-slider\es\interface.d.ts (Line 1:1 - Line 7:2), node_modules\rc-slider\lib\interface.d.ts (Line 1:1 - Line 7:2)
import type React from 'react';
export type Direction = 'rtl' | 'ltr' | 'ttb' | 'btt';
export type OnStartMove = (e: React.MouseEvent | React.TouchEvent, valueIndex: number, startValues?: number[]) => void;
export type AriaValueFormat = (value: number) => string;
export type SemanticName = 'tracks' | 'track' | 'rail' | 'handle';
export type SliderClassNames = Partial<Record<SemanticName, string>>;
export type SliderStyles = Partial<Record<SemanticName, React.CSSProperties>>;node_modules\rc-slider\es\context.d.ts (Line 1:1 - Line 38:2), node_modules\rc-slider\lib\context.d.ts (Line 1:1 - Line 38:2)
import * as React from 'react';
import type { AriaValueFormat, Direction, SliderClassNames, SliderStyles } from './interface';
export interface SliderContextProps {
min: number;
max: number;
includedStart: number;
includedEnd: number;
direction: Direction;
disabled?: boolean;
keyboard?: boolean;
included?: boolean;
step: number | null;
range?: boolean;
tabIndex: number | number[];
ariaLabelForHandle?: string | string[];
ariaLabelledByForHandle?: string | string[];
ariaRequired?: boolean;
ariaValueTextFormatterForHandle?: AriaValueFormat | AriaValueFormat[];
classNames: SliderClassNames;
styles: SliderStyles;
}
declare const SliderContext: React.Context<SliderContextProps>;
export default SliderContext;
export interface UnstableContextProps {
onDragStart?: (info: {
rawValues: number[];
draggingIndex: number;
draggingValue: number;
}) => void;
onDragChange?: (info: {
rawValues: number[];
deleteIndex: number;
draggingIndex: number;
draggingValue: number;
}) => void;
}
/** @private NOT PROMISE AVAILABLE. DO NOT USE IN PRODUCTION. */
export declare const UnstableContext: React.Context<UnstableContextProps>;node_modules\i18next\typescript\t.d.ts (Line 316:19 - Line 322:6), node_modules\i18next\typescript\t.d.ts (Line 295:16 - Line 301:2)
<Ns extends Namespace = DefaultNamespace, KPrefix = undefined>
extends Branded<Ns> {
<
const Key extends ParseKeys<Ns, TOpt, KPrefix> | TemplateStringsArray,
const TOpt extends TOptions,
Ret extends TFunctionReturn<Ns, AppendKeyPrefix<Key, KPrefix>, TOpt>,
constnode_modules\framer-motion\dist\m.d.ts (Line 4:13 - Line 25:2), node_modules\framer-motion\dist\types.d-Cjd591yU.d.ts (Line 54:2 - Line 75:8)
;
type MotionValueString = MotionValue<string>;
type MotionValueNumber = MotionValue<number>;
type MotionValueAny = MotionValue<any>;
type AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny;
type MotionValueHelper<T> = T | AnyMotionValue;
type MakeMotionHelper<T> = {
[K in keyof T]: MotionValueHelper<T[K]>;
};
type MakeCustomValueTypeHelper<T> = MakeMotionHelper<T>;
type MakeMotion<T> = MakeCustomValueTypeHelper<T>;
type MotionCSS = MakeMotion<Omit<CSSProperties, "rotate" | "scale" | "perspective">>;
/**
* @public
*/
type MotionTransform = MakeMotion<TransformProperties>;
type MotionSVGProps = MakeMotion<SVGPathProperties>;
/**
* @public
*/
interface MotionStyle$node_modules\framer-motion\dist\m.d.ts (Line 49:1 - Line 173:4), node_modules\framer-motion\dist\types.d-Cjd591yU.d.ts (Line 127:1 - Line 249:10)
interface HTMLElements {
a: HTMLAnchorElement;
abbr: HTMLElement;
address: HTMLElement;
area: HTMLAreaElement;
article: HTMLElement;
aside: HTMLElement;
audio: HTMLAudioElement;
b: HTMLElement;
base: HTMLBaseElement;
bdi: HTMLElement;
bdo: HTMLElement;
big: HTMLElement;
blockquote: HTMLQuoteElement;
body: HTMLBodyElement;
br: HTMLBRElement;
button: HTMLButtonElement;
canvas: HTMLCanvasElement;
caption: HTMLElement;
center: HTMLElement;
cite: HTMLElement;
code: HTMLElement;
col: HTMLTableColElement;
colgroup: HTMLTableColElement;
data: HTMLDataElement;
datalist: HTMLDataListElement;
dd: HTMLElement;
del: HTMLModElement;
details: HTMLDetailsElement;
dfn: HTMLElement;
dialog: HTMLDialogElement;
div: HTMLDivElement;
dl: HTMLDListElement;
dt: HTMLElement;
em: HTMLElement;
embed: HTMLEmbedElement;
fieldset: HTMLFieldSetElement;
figcaption: HTMLElement;
figure: HTMLElement;
footer: HTMLElement;
form: HTMLFormElement;
h1: HTMLHeadingElement;
h2: HTMLHeadingElement;
h3: HTMLHeadingElement;
h4: HTMLHeadingElement;
h5: HTMLHeadingElement;
h6: HTMLHeadingElement;
head: HTMLHeadElement;
header: HTMLElement;
hgroup: HTMLElement;
hr: HTMLHRElement;
html: HTMLHtmlElement;
i: HTMLElement;
iframe: HTMLIFrameElement;
img: HTMLImageElement;
input: HTMLInputElement;
ins: HTMLModElement;
kbd: HTMLElement;
keygen: HTMLElement;
label: HTMLLabelElement;
legend: HTMLLegendElement;
li: HTMLLIElement;
link: HTMLLinkElement;
main: HTMLElement;
map: HTMLMapElement;
mark: HTMLElement;
menu: HTMLElement;
menuitem: HTMLElement;
meta: HTMLMetaElement;
meter: HTMLMeterElement;
nav: HTMLElement;
noindex: HTMLElement;
noscript: HTMLElement;
object: HTMLObjectElement;
ol: HTMLOListElement;
optgroup: HTMLOptGroupElement;
option: HTMLOptionElement;
output: HTMLOutputElement;
p: HTMLParagraphElement;
param: HTMLParamElement;
picture: HTMLElement;
pre: HTMLPreElement;
progress: HTMLProgressElement;
q: HTMLQuoteElement;
rp: HTMLElement;
rt: HTMLElement;
ruby: HTMLElement;
s: HTMLElement;
samp: HTMLElement;
search: HTMLElement;
slot: HTMLSlotElement;
script: HTMLScriptElement;
section: HTMLElement;
select: HTMLSelectElement;
small: HTMLElement;
source: HTMLSourceElement;
span: HTMLSpanElement;
strong: HTMLElement;
style: HTMLStyleElement;
sub: HTMLElement;
summary: HTMLElement;
sup: HTMLElement;
table: HTMLTableElement;
template: HTMLTemplateElement;
tbody: HTMLTableSectionElement;
td: HTMLTableDataCellElement;
textarea: HTMLTextAreaElement;
tfoot: HTMLTableSectionElement;
th: HTMLTableHeaderCellElement;
thead: HTMLTableSectionElement;
time: HTMLTimeElement;
title: HTMLTitleElement;
tr: HTMLTableRowElement;
track: HTMLTrackElement;
u: HTMLElement;
ul: HTMLUListElement;
var: HTMLElement;
video: HTMLVideoElement;
wbr: HTMLElement;
webview: HTMLWebViewElement;
}
/**
* @public
*/node_modules\framer-motion\dist\m.d.ts (Line 168:19 - Line 221:5), node_modules\framer-motion\dist\types.d-Cjd591yU.d.ts (Line 274:15 - Line 326:10)
;
}
/**
* @public
*/
type ForwardRefComponent<T, P> = {
readonly $$typeof: symbol;
} & ((props: PropsWithoutRef<P> & RefAttributes<T>) => JSX.Element);
type AttributesWithoutMotionProps<Attributes> = {
[K in Exclude<keyof Attributes, keyof MotionProps>]?: Attributes[K];
};
/**
* @public
*/
type HTMLMotionProps<Tag extends keyof HTMLElements> = AttributesWithoutMotionProps<JSX.IntrinsicElements[Tag]> & MotionProps;
/**
* Motion-optimised versions of React's HTML components.
*
* @public
*/
type HTMLMotionComponents = {
[K in keyof HTMLElements]: ForwardRefComponent<HTMLElements[K], HTMLMotionProps<K>>;
};
type UnionStringArray<T extends Readonly<string[]>> = T[number];
declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath"];
type SVGElements = UnionStringArray<typeof svgElements>;
interface SVGAttributesWithoutMotionProps<T> extends Pick<SVGAttributes<T>, Exclude<keyof SVGAttributes<T>, keyof MotionProps>> {
}
/**
* Blanket-accept any SVG attribute as a `MotionValue`
* @public
*/
type SVGAttributesAsMotionValues<T> = MakeMotion<SVGAttributesWithoutMotionProps<T>>;
type UnwrapSVGFactoryElement<F> = F extends React.SVGProps<infer P> ? P : never;
/**
* @public
*/
interface SVGMotionProps<T> extends SVGAttributesAsMotionValues<T>, MotionProps {
}
/**
* Motion-optimised versions of React's SVG components.
*
* @public
*/
type SVGMotionComponents = {
[K in SVGElements]: ForwardRefComponent<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>, SVGMotionProps<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>>>;
};
type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
typenode_modules\framer-motion\dist\m.d.ts (Line 219:20 - Line 231:8), node_modules\framer-motion\dist\types.d-Cjd591yU.d.ts (Line 905:2 - Line 924:4)
;
type MotionComponentProps<Props> = {
[K in Exclude<keyof Props, keyof MotionProps>]?: Props[K];
} & MotionProps;
type MotionComponent<T, P> = T extends keyof DOMMotionComponents ? DOMMotionComponents[T] : React$1.ComponentType<Omit<MotionComponentProps<P>, "children"> & {
children?: "children" extends keyof P ? P["children"] | MotionComponentProps<P>["children"] : MotionComponentProps<P>["children"];
}>;
interface MotionComponentOptions {
forwardMotionProps?: boolean;
}
declarenode_modules\framer-motion\dist\m.d.ts (Line 231:23 - Line 266:4), node_modules\framer-motion\dist\types.d-Cjd591yU.d.ts (Line 925:2 - Line 958:7)
): MotionComponent<TagName, Props>;
declare const optimizedAppearDataAttribute: "data-framer-appear-id";
/**
* Expose only the needed part of the VisualElement interface to
* ensure React types don't end up in the generic DOM bundle.
*/
interface WithAppearProps {
props: {
[optimizedAppearDataAttribute]?: string;
values?: {
[key: string]: MotionValue<number> | MotionValue<string>;
};
};
}
type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;
/**
* The window global object acts as a bridge between our inline script
* triggering the optimized appear animations, and Motion.
*/
declare global {
interface Window {
MotionHandoffAnimation?: HandoffFunction;
MotionHandoffMarkAsComplete?: (elementId: string) => void;
MotionHandoffIsComplete?: (elementId: string) => boolean;
MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean;
MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void;
MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void;
MotionIsMounted?: boolean;
}
}
/**
* HTML components
*/node_modules\framer-motion\dist\m.d.ts (Line 264:1 - Line 435:29), node_modules\framer-motion\dist\types\client.d.ts (Line 8:1 - Line 179:11)
/**
* HTML components
*/
declare const MotionA: ForwardRefComponent<HTMLAnchorElement, HTMLMotionProps<"a">>;
declare const MotionAbbr: ForwardRefComponent<HTMLElement, HTMLMotionProps<"abbr">>;
declare const MotionAddress: ForwardRefComponent<HTMLElement, HTMLMotionProps<"address">>;
declare const MotionArea: ForwardRefComponent<HTMLAreaElement, HTMLMotionProps<"area">>;
declare const MotionArticle: ForwardRefComponent<HTMLElement, HTMLMotionProps<"article">>;
declare const MotionAside: ForwardRefComponent<HTMLElement, HTMLMotionProps<"aside">>;
declare const MotionAudio: ForwardRefComponent<HTMLAudioElement, HTMLMotionProps<"audio">>;
declare const MotionB: ForwardRefComponent<HTMLElement, HTMLMotionProps<"b">>;
declare const MotionBase: ForwardRefComponent<HTMLBaseElement, HTMLMotionProps<"base">>;
declare const MotionBdi: ForwardRefComponent<HTMLElement, HTMLMotionProps<"bdi">>;
declare const MotionBdo: ForwardRefComponent<HTMLElement, HTMLMotionProps<"bdo">>;
declare const MotionBig: ForwardRefComponent<HTMLElement, HTMLMotionProps<"big">>;
declare const MotionBlockquote: ForwardRefComponent<HTMLQuoteElement, HTMLMotionProps<"blockquote">>;
declare const MotionBody: ForwardRefComponent<HTMLBodyElement, HTMLMotionProps<"body">>;
declare const MotionButton: ForwardRefComponent<HTMLButtonElement, HTMLMotionProps<"button">>;
declare const MotionCanvas: ForwardRefComponent<HTMLCanvasElement, HTMLMotionProps<"canvas">>;
declare const MotionCaption: ForwardRefComponent<HTMLElement, HTMLMotionProps<"caption">>;
declare const MotionCite: ForwardRefComponent<HTMLElement, HTMLMotionProps<"cite">>;
declare const MotionCode: ForwardRefComponent<HTMLElement, HTMLMotionProps<"code">>;
declare const MotionCol: ForwardRefComponent<HTMLTableColElement, HTMLMotionProps<"col">>;
declare const MotionColgroup: ForwardRefComponent<HTMLTableColElement, HTMLMotionProps<"colgroup">>;
declare const MotionData: ForwardRefComponent<HTMLDataElement, HTMLMotionProps<"data">>;
declare const MotionDatalist: ForwardRefComponent<HTMLDataListElement, HTMLMotionProps<"datalist">>;
declare const MotionDd: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dd">>;
declare const MotionDel: ForwardRefComponent<HTMLModElement, HTMLMotionProps<"del">>;
declare const MotionDetails: ForwardRefComponent<HTMLDetailsElement, HTMLMotionProps<"details">>;
declare const MotionDfn: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dfn">>;
declare const MotionDialog: ForwardRefComponent<HTMLDialogElement, HTMLMotionProps<"dialog">>;
declare const MotionDiv: ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>;
declare const MotionDl: ForwardRefComponent<HTMLDListElement, HTMLMotionProps<"dl">>;
declare const MotionDt: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dt">>;
declare const MotionEm: ForwardRefComponent<HTMLElement, HTMLMotionProps<"em">>;
declare const MotionEmbed: ForwardRefComponent<HTMLEmbedElement, HTMLMotionProps<"embed">>;
declare const MotionFieldset: ForwardRefComponent<HTMLFieldSetElement, HTMLMotionProps<"fieldset">>;
declare const MotionFigcaption: ForwardRefComponent<HTMLElement, HTMLMotionProps<"figcaption">>;
declare const MotionFigure: ForwardRefComponent<HTMLElement, HTMLMotionProps<"figure">>;
declare const MotionFooter: ForwardRefComponent<HTMLElement, HTMLMotionProps<"footer">>;
declare const MotionForm: ForwardRefComponent<HTMLFormElement, HTMLMotionProps<"form">>;
declare const MotionH1: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h1">>;
declare const MotionH2: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h2">>;
declare const MotionH3: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h3">>;
declare const MotionH4: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h4">>;
declare const MotionH5: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h5">>;
declare const MotionH6: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h6">>;
declare const MotionHead: ForwardRefComponent<HTMLHeadElement, HTMLMotionProps<"head">>;
declare const MotionHeader: ForwardRefComponent<HTMLElement, HTMLMotionProps<"header">>;
declare const MotionHgroup: ForwardRefComponent<HTMLElement, HTMLMotionProps<"hgroup">>;
declare const MotionHr: ForwardRefComponent<HTMLHRElement, HTMLMotionProps<"hr">>;
declare const MotionHtml: ForwardRefComponent<HTMLHtmlElement, HTMLMotionProps<"html">>;
declare const MotionI: ForwardRefComponent<HTMLElement, HTMLMotionProps<"i">>;
declare const MotionIframe: ForwardRefComponent<HTMLIFrameElement, HTMLMotionProps<"iframe">>;
declare const MotionImg: ForwardRefComponent<HTMLImageElement, HTMLMotionProps<"img">>;
declare const MotionInput: ForwardRefComponent<HTMLInputElement, HTMLMotionProps<"input">>;
declare const MotionIns: ForwardRefComponent<HTMLModElement, HTMLMotionProps<"ins">>;
declare const MotionKbd: ForwardRefComponent<HTMLElement, HTMLMotionProps<"kbd">>;
declare const MotionKeygen: ForwardRefComponent<HTMLElement, HTMLMotionProps<"keygen">>;
declare const MotionLabel: ForwardRefComponent<HTMLLabelElement, HTMLMotionProps<"label">>;
declare const MotionLegend: ForwardRefComponent<HTMLLegendElement, HTMLMotionProps<"legend">>;
declare const MotionLi: ForwardRefComponent<HTMLLIElement, HTMLMotionProps<"li">>;
declare const MotionLink: ForwardRefComponent<HTMLLinkElement, HTMLMotionProps<"link">>;
declare const MotionMain: ForwardRefComponent<HTMLElement, HTMLMotionProps<"main">>;
declare const MotionMap: ForwardRefComponent<HTMLMapElement, HTMLMotionProps<"map">>;
declare const MotionMark: ForwardRefComponent<HTMLElement, HTMLMotionProps<"mark">>;
declare const MotionMenu: ForwardRefComponent<HTMLElement, HTMLMotionProps<"menu">>;
declare const MotionMenuitem: ForwardRefComponent<HTMLElement, HTMLMotionProps<"menuitem">>;
declare const MotionMeter: ForwardRefComponent<HTMLMeterElement, HTMLMotionProps<"meter">>;
declare const MotionNav: ForwardRefComponent<HTMLElement, HTMLMotionProps<"nav">>;
declare const MotionObject: ForwardRefComponent<HTMLObjectElement, HTMLMotionProps<"object">>;
declare const MotionOl: ForwardRefComponent<HTMLOListElement, HTMLMotionProps<"ol">>;
declare const MotionOptgroup: ForwardRefComponent<HTMLOptGroupElement, HTMLMotionProps<"optgroup">>;
declare const MotionOption: ForwardRefComponent<HTMLOptionElement, HTMLMotionProps<"option">>;
declare const MotionOutput: ForwardRefComponent<HTMLOutputElement, HTMLMotionProps<"output">>;
declare const MotionP: ForwardRefComponent<HTMLParagraphElement, HTMLMotionProps<"p">>;
declare const MotionParam: ForwardRefComponent<HTMLParamElement, HTMLMotionProps<"param">>;
declare const MotionPicture: ForwardRefComponent<HTMLElement, HTMLMotionProps<"picture">>;
declare const MotionPre: ForwardRefComponent<HTMLPreElement, HTMLMotionProps<"pre">>;
declare const MotionProgress: ForwardRefComponent<HTMLProgressElement, HTMLMotionProps<"progress">>;
declare const MotionQ: ForwardRefComponent<HTMLQuoteElement, HTMLMotionProps<"q">>;
declare const MotionRp: ForwardRefComponent<HTMLElement, HTMLMotionProps<"rp">>;
declare const MotionRt: ForwardRefComponent<HTMLElement, HTMLMotionProps<"rt">>;
declare const MotionRuby: ForwardRefComponent<HTMLElement, HTMLMotionProps<"ruby">>;
declare const MotionS: ForwardRefComponent<HTMLElement, HTMLMotionProps<"s">>;
declare const MotionSamp: ForwardRefComponent<HTMLElement, HTMLMotionProps<"samp">>;
declare const MotionScript: ForwardRefComponent<HTMLScriptElement, HTMLMotionProps<"script">>;
declare const MotionSection: ForwardRefComponent<HTMLElement, HTMLMotionProps<"section">>;
declare const MotionSelect: ForwardRefComponent<HTMLSelectElement, HTMLMotionProps<"select">>;
declare const MotionSmall: ForwardRefComponent<HTMLElement, HTMLMotionProps<"small">>;
declare const MotionSource: ForwardRefComponent<HTMLSourceElement, HTMLMotionProps<"source">>;
declare const MotionSpan: ForwardRefComponent<HTMLSpanElement, HTMLMotionProps<"span">>;
declare const MotionStrong: ForwardRefComponent<HTMLElement, HTMLMotionProps<"strong">>;
declare const MotionStyle: ForwardRefComponent<HTMLStyleElement, HTMLMotionProps<"style">>;
declare const MotionSub: ForwardRefComponent<HTMLElement, HTMLMotionProps<"sub">>;
declare const MotionSummary: ForwardRefComponent<HTMLElement, HTMLMotionProps<"summary">>;
declare const MotionSup: ForwardRefComponent<HTMLElement, HTMLMotionProps<"sup">>;
declare const MotionTable: ForwardRefComponent<HTMLTableElement, HTMLMotionProps<"table">>;
declare const MotionTbody: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"tbody">>;
declare const MotionTd: ForwardRefComponent<HTMLTableDataCellElement, HTMLMotionProps<"td">>;
declare const MotionTextarea: ForwardRefComponent<HTMLTextAreaElement, HTMLMotionProps<"textarea">>;
declare const MotionTfoot: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"tfoot">>;
declare const MotionTh: ForwardRefComponent<HTMLTableHeaderCellElement, HTMLMotionProps<"th">>;
declare const MotionThead: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"thead">>;
declare const MotionTime: ForwardRefComponent<HTMLTimeElement, HTMLMotionProps<"time">>;
declare const MotionTitle: ForwardRefComponent<HTMLTitleElement, HTMLMotionProps<"title">>;
declare const MotionTr: ForwardRefComponent<HTMLTableRowElement, HTMLMotionProps<"tr">>;
declare const MotionTrack: ForwardRefComponent<HTMLTrackElement, HTMLMotionProps<"track">>;
declare const MotionU: ForwardRefComponent<HTMLElement, HTMLMotionProps<"u">>;
declare const MotionUl: ForwardRefComponent<HTMLUListElement, HTMLMotionProps<"ul">>;
declare const MotionVideo: ForwardRefComponent<HTMLVideoElement, HTMLMotionProps<"video">>;
declare const MotionWbr: ForwardRefComponent<HTMLElement, HTMLMotionProps<"wbr">>;
declare const MotionWebview: ForwardRefComponent<HTMLWebViewElement, HTMLMotionProps<"webview">>;
/**
* SVG components
*/
declare const MotionAnimate: ForwardRefComponent<SVGElement, SVGMotionProps<SVGElement>>;
declare const MotionCircle: ForwardRefComponent<SVGCircleElement, SVGMotionProps<SVGCircleElement>>;
declare const MotionDefs: ForwardRefComponent<SVGDefsElement, SVGMotionProps<SVGDefsElement>>;
declare const MotionDesc: ForwardRefComponent<SVGDescElement, SVGMotionProps<SVGDescElement>>;
declare const MotionEllipse: ForwardRefComponent<SVGEllipseElement, SVGMotionProps<SVGEllipseElement>>;
declare const MotionG: ForwardRefComponent<SVGGElement, SVGMotionProps<SVGGElement>>;
declare const MotionImage: ForwardRefComponent<SVGImageElement, SVGMotionProps<SVGImageElement>>;
declare const MotionLine: ForwardRefComponent<SVGLineElement, SVGMotionProps<SVGLineElement>>;
declare const MotionFilter: ForwardRefComponent<SVGFilterElement, SVGMotionProps<SVGFilterElement>>;
declare const MotionMarker: ForwardRefComponent<SVGMarkerElement, SVGMotionProps<SVGMarkerElement>>;
declare const MotionMask: ForwardRefComponent<SVGMaskElement, SVGMotionProps<SVGMaskElement>>;
declare const MotionMetadata: ForwardRefComponent<SVGMetadataElement, SVGMotionProps<SVGMetadataElement>>;
declare const MotionPath: ForwardRefComponent<SVGPathElement, SVGMotionProps<SVGPathElement>>;
declare const MotionPattern: ForwardRefComponent<SVGPatternElement, SVGMotionProps<SVGPatternElement>>;
declare const MotionPolygon: ForwardRefComponent<SVGPolygonElement, SVGMotionProps<SVGPolygonElement>>;
declare const MotionPolyline: ForwardRefComponent<SVGPolylineElement, SVGMotionProps<SVGPolylineElement>>;
declare const MotionRect: ForwardRefComponent<SVGRectElement, SVGMotionProps<SVGRectElement>>;
declare const MotionStop: ForwardRefComponent<SVGStopElement, SVGMotionProps<SVGStopElement>>;
declare const MotionSvg: ForwardRefComponent<SVGSVGElement, SVGMotionProps<SVGSVGElement>>;
declare const MotionSymbol: ForwardRefComponent<SVGSymbolElement, SVGMotionProps<SVGSymbolElement>>;
declare const MotionText: ForwardRefComponent<SVGTextElement, SVGMotionProps<SVGTextElement>>;
declare const MotionTspan: ForwardRefComponent<SVGTSpanElement, SVGMotionProps<SVGTSpanElement>>;
declare const MotionUse: ForwardRefComponent<SVGUseElement, SVGMotionProps<SVGUseElement>>;
declare const MotionView: ForwardRefComponent<SVGViewElement, SVGMotionProps<SVGViewElement>>;
declare const MotionClipPath: ForwardRefComponent<SVGClipPathElement, SVGMotionProps<SVGClipPathElement>>;
declare const MotionFeBlend: ForwardRefComponent<SVGFEBlendElement, SVGMotionProps<SVGFEBlendElement>>;
declare const MotionFeColorMatrix: ForwardRefComponent<SVGFEColorMatrixElement, SVGMotionProps<SVGFEColorMatrixElement>>;
declare const MotionFeComponentTransfer: ForwardRefComponent<SVGFEComponentTransferElement, SVGMotionProps<SVGFEComponentTransferElement>>;
declare const MotionFeComposite: ForwardRefComponent<SVGFECompositeElement, SVGMotionProps<SVGFECompositeElement>>;
declare const MotionFeConvolveMatrix: ForwardRefComponent<SVGFEConvolveMatrixElement, SVGMotionProps<SVGFEConvolveMatrixElement>>;
declare const MotionFeDiffuseLighting: ForwardRefComponent<SVGFEDiffuseLightingElement, SVGMotionProps<SVGFEDiffuseLightingElement>>;
declare const MotionFeDisplacementMap: ForwardRefComponent<SVGFEDisplacementMapElement, SVGMotionProps<SVGFEDisplacementMapElement>>;
declare const MotionFeDistantLight: ForwardRefComponent<SVGFEDistantLightElement, SVGMotionProps<SVGFEDistantLightElement>>;
declare const MotionFeDropShadow: ForwardRefComponent<SVGFEDropShadowElement, SVGMotionProps<SVGFEDropShadowElement>>;
declare const MotionFeFlood: ForwardRefComponent<SVGFEFloodElement, SVGMotionProps<SVGFEFloodElement>>;
declare const MotionFeFuncA: ForwardRefComponent<SVGFEFuncAElement, SVGMotionProps<SVGFEFuncAElement>>;
declare const MotionFeFuncB: ForwardRefComponent<SVGFEFuncBElement, SVGMotionProps<SVGFEFuncBElement>>;
declare const MotionFeFuncG: ForwardRefComponent<SVGFEFuncGElement, SVGMotionProps<SVGFEFuncGElement>>;
declare const MotionFeFuncR: ForwardRefComponent<SVGFEFuncRElement, SVGMotionProps<SVGFEFuncRElement>>;
declare const MotionFeGaussianBlur: ForwardRefComponent<SVGFEGaussianBlurElement, SVGMotionProps<SVGFEGaussianBlurElement>>;
declare const MotionFeImage: ForwardRefComponent<SVGFEImageElement, SVGMotionProps<SVGFEImageElement>>;
declare const MotionFeMerge: ForwardRefComponent<SVGFEMergeElement, SVGMotionProps<SVGFEMergeElement>>;
declare const MotionFeMergeNode: ForwardRefComponent<SVGFEMergeNodeElement, SVGMotionProps<SVGFEMergeNodeElement>>;
declare const MotionFeMorphology: ForwardRefComponent<SVGFEMorphologyElement, SVGMotionProps<SVGFEMorphologyElement>>;
declare const MotionFeOffset: ForwardRefComponent<SVGFEOffsetElement, SVGMotionProps<SVGFEOffsetElement>>;
declare const MotionFePointLight: ForwardRefComponent<SVGFEPointLightElement, SVGMotionProps<SVGFEPointLightElement>>;
declare const MotionFeSpecularLighting: ForwardRefComponent<SVGFESpecularLightingElement, SVGMotionProps<SVGFESpecularLightingElement>>;
declare const MotionFeSpotLight: ForwardRefComponent<SVGFESpotLightElement, SVGMotionProps<SVGFESpotLightElement>>;
declare const MotionFeTile: ForwardRefComponent<SVGFETileElement, SVGMotionProps<SVGFETileElement>>;
declare const MotionFeTurbulence: ForwardRefComponent<SVGFETurbulenceElement, SVGMotionProps<SVGFETurbulenceElement>>;
declare const MotionForeignObject: ForwardRefComponent<SVGForeignObjectElement, SVGMotionProps<SVGForeignObjectElement>>;
declare const MotionLinearGradient: ForwardRefComponent<SVGLinearGradientElement, SVGMotionProps<SVGLinearGradientElement>>;
declare const MotionRadialGradient: ForwardRefComponent<SVGRadialGradientElement, SVGMotionProps<SVGRadialGradientElement>>;
declare const MotionTextPath: ForwardRefComponent<SVGTextPathElement, SVGMotionProps<SVGTextPathElement>>;
export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, createMinimalMotionComponentnode_modules\framer-motion\dist\dom.d.ts (Line 77:8 - Line 86:12), node_modules\framer-motion\dist\dom.d.ts (Line 69:2 - Line 77:8)
: {
(sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen;
(value: string | MotionValue<string>, keyframes: string | UnresolvedValueKeyframe<string>[], options?: ValueAnimationTransition<string>): AnimationPlaybackControlsWithThen;
(value: number | MotionValue<number>, keyframes: number | UnresolvedValueKeyframe<number>[], options?: ValueAnimationTransition<number>): AnimationPlaybackControlsWithThen;
<V extends string | number>(value: V | MotionValue<V>, keyframes: V | UnresolvedValueKeyframe<V>[], options?: ValueAnimationTransition<V>): AnimationPlaybackControlsWithThen;
(element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen;
<O extends {}>(object: O | O[], keyframes: ObjectTarget<O>, options?: AnimationOptions): AnimationPlaybackControlsWithThen;
};
declare const animateMininode_modules\framer-motion\dist\dom-mini.d.ts (Line 1:13 - Line 44:8), node_modules\framer-motion\dist\dom.d.ts (Line 4:15 - Line 46:10)
;
type ObjectTarget<O> = {
[K in keyof O]?: O[K] | UnresolvedValueKeyframe[];
};
type SequenceTime = number | "<" | `+${number}` | `-${number}` | `${string}`;
type SequenceLabel = string;
interface SequenceLabelWithTime {
name: SequenceLabel;
at: SequenceTime;
}
interface At {
at?: SequenceTime;
}
type MotionValueSegment = [
MotionValue,
UnresolvedValueKeyframe | UnresolvedValueKeyframe[]
];
type MotionValueSegmentWithTransition = [
MotionValue,
UnresolvedValueKeyframe | UnresolvedValueKeyframe[],
Transition & At
];
type DOMSegment = [ElementOrSelector, DOMKeyframesDefinition];
type DOMSegmentWithTransition = [
ElementOrSelector,
DOMKeyframesDefinition,
AnimationOptions & At
];
type ObjectSegment<O extends {} = {}> = [O, ObjectTarget<O>];
type ObjectSegmentWithTransition<O extends {} = {}> = [
O,
ObjectTarget<O>,
AnimationOptions & At
];
type Segment = ObjectSegment | ObjectSegmentWithTransition | SequenceLabel | SequenceLabelWithTime | MotionValueSegment | MotionValueSegmentWithTransition | DOMSegment | DOMSegmentWithTransition;
type AnimationSequence = Segment[];
interface SequenceOptions extends AnimationPlaybackOptions {
delay?: number;
duration?: number;
defaultTransition?: Transition;
}
declarenode_modules\acorn\dist\acorn.d.mts (Line 1:1 - Line 883:7), node_modules\acorn\dist\acorn.d.ts (Line 1:1 - Line 883:7)
export interface Node {
start: number
end: number
type: string
range?: [number, number]
loc?: SourceLocation | null
}
export interface SourceLocation {
source?: string | null
start: Position
end: Position
}
export interface Position {
/** 1-based */
line: number
/** 0-based */
column: number
}
export interface Identifier extends Node {
type: "Identifier"
name: string
}
export interface Literal extends Node {
type: "Literal"
value?: string | boolean | null | number | RegExp | bigint
raw?: string
regex?: {
pattern: string
flags: string
}
bigint?: string
}
export interface Program extends Node {
type: "Program"
body: Array<Statement | ModuleDeclaration>
sourceType: "script" | "module"
}
export interface Function extends Node {
id?: Identifier | null
params: Array<Pattern>
body: BlockStatement | Expression
generator: boolean
expression: boolean
async: boolean
}
export interface ExpressionStatement extends Node {
type: "ExpressionStatement"
expression: Expression | Literal
directive?: string
}
export interface BlockStatement extends Node {
type: "BlockStatement"
body: Array<Statement>
}
export interface EmptyStatement extends Node {
type: "EmptyStatement"
}
export interface DebuggerStatement extends Node {
type: "DebuggerStatement"
}
export interface WithStatement extends Node {
type: "WithStatement"
object: Expression
body: Statement
}
export interface ReturnStatement extends Node {
type: "ReturnStatement"
argument?: Expression | null
}
export interface LabeledStatement extends Node {
type: "LabeledStatement"
label: Identifier
body: Statement
}
export interface BreakStatement extends Node {
type: "BreakStatement"
label?: Identifier | null
}
export interface ContinueStatement extends Node {
type: "ContinueStatement"
label?: Identifier | null
}
export interface IfStatement extends Node {
type: "IfStatement"
test: Expression
consequent: Statement
alternate?: Statement | null
}
export interface SwitchStatement extends Node {
type: "SwitchStatement"
discriminant: Expression
cases: Array<SwitchCase>
}
export interface SwitchCase extends Node {
type: "SwitchCase"
test?: Expression | null
consequent: Array<Statement>
}
export interface ThrowStatement extends Node {
type: "ThrowStatement"
argument: Expression
}
export interface TryStatement extends Node {
type: "TryStatement"
block: BlockStatement
handler?: CatchClause | null
finalizer?: BlockStatement | null
}
export interface CatchClause extends Node {
type: "CatchClause"
param?: Pattern | null
body: BlockStatement
}
export interface WhileStatement extends Node {
type: "WhileStatement"
test: Expression
body: Statement
}
export interface DoWhileStatement extends Node {
type: "DoWhileStatement"
body: Statement
test: Expression
}
export interface ForStatement extends Node {
type: "ForStatement"
init?: VariableDeclaration | Expression | null
test?: Expression | null
update?: Expression | null
body: Statement
}
export interface ForInStatement extends Node {
type: "ForInStatement"
left: VariableDeclaration | Pattern
right: Expression
body: Statement
}
export interface FunctionDeclaration extends Function {
type: "FunctionDeclaration"
id: Identifier
body: BlockStatement
}
export interface VariableDeclaration extends Node {
type: "VariableDeclaration"
declarations: Array<VariableDeclarator>
kind: "var" | "let" | "const" | "using" | "await using"
}
export interface VariableDeclarator extends Node {
type: "VariableDeclarator"
id: Pattern
init?: Expression | null
}
export interface ThisExpression extends Node {
type: "ThisExpression"
}
export interface ArrayExpression extends Node {
type: "ArrayExpression"
elements: Array<Expression | SpreadElement | null>
}
export interface ObjectExpression extends Node {
type: "ObjectExpression"
properties: Array<Property | SpreadElement>
}
export interface Property extends Node {
type: "Property"
key: Expression
value: Expression
kind: "init" | "get" | "set"
method: boolean
shorthand: boolean
computed: boolean
}
export interface FunctionExpression extends Function {
type: "FunctionExpression"
body: BlockStatement
}
export interface UnaryExpression extends Node {
type: "UnaryExpression"
operator: UnaryOperator
prefix: boolean
argument: Expression
}
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
export interface UpdateExpression extends Node {
type: "UpdateExpression"
operator: UpdateOperator
argument: Expression
prefix: boolean
}
export type UpdateOperator = "++" | "--"
export interface BinaryExpression extends Node {
type: "BinaryExpression"
operator: BinaryOperator
left: Expression | PrivateIdentifier
right: Expression
}
export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**"
export interface AssignmentExpression extends Node {
type: "AssignmentExpression"
operator: AssignmentOperator
left: Pattern
right: Expression
}
export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??="
export interface LogicalExpression extends Node {
type: "LogicalExpression"
operator: LogicalOperator
left: Expression
right: Expression
}
export type LogicalOperator = "||" | "&&" | "??"
export interface MemberExpression extends Node {
type: "MemberExpression"
object: Expression | Super
property: Expression | PrivateIdentifier
computed: boolean
optional: boolean
}
export interface ConditionalExpression extends Node {
type: "ConditionalExpression"
test: Expression
alternate: Expression
consequent: Expression
}
export interface CallExpression extends Node {
type: "CallExpression"
callee: Expression | Super
arguments: Array<Expression | SpreadElement>
optional: boolean
}
export interface NewExpression extends Node {
type: "NewExpression"
callee: Expression
arguments: Array<Expression | SpreadElement>
}
export interface SequenceExpression extends Node {
type: "SequenceExpression"
expressions: Array<Expression>
}
export interface ForOfStatement extends Node {
type: "ForOfStatement"
left: VariableDeclaration | Pattern
right: Expression
body: Statement
await: boolean
}
export interface Super extends Node {
type: "Super"
}
export interface SpreadElement extends Node {
type: "SpreadElement"
argument: Expression
}
export interface ArrowFunctionExpression extends Function {
type: "ArrowFunctionExpression"
}
export interface YieldExpression extends Node {
type: "YieldExpression"
argument?: Expression | null
delegate: boolean
}
export interface TemplateLiteral extends Node {
type: "TemplateLiteral"
quasis: Array<TemplateElement>
expressions: Array<Expression>
}
export interface TaggedTemplateExpression extends Node {
type: "TaggedTemplateExpression"
tag: Expression
quasi: TemplateLiteral
}
export interface TemplateElement extends Node {
type: "TemplateElement"
tail: boolean
value: {
cooked?: string | null
raw: string
}
}
export interface AssignmentProperty extends Node {
type: "Property"
key: Expression
value: Pattern
kind: "init"
method: false
shorthand: boolean
computed: boolean
}
export interface ObjectPattern extends Node {
type: "ObjectPattern"
properties: Array<AssignmentProperty | RestElement>
}
export interface ArrayPattern extends Node {
type: "ArrayPattern"
elements: Array<Pattern | null>
}
export interface RestElement extends Node {
type: "RestElement"
argument: Pattern
}
export interface AssignmentPattern extends Node {
type: "AssignmentPattern"
left: Pattern
right: Expression
}
export interface Class extends Node {
id?: Identifier | null
superClass?: Expression | null
body: ClassBody
}
export interface ClassBody extends Node {
type: "ClassBody"
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>
}
export interface MethodDefinition extends Node {
type: "MethodDefinition"
key: Expression | PrivateIdentifier
value: FunctionExpression
kind: "constructor" | "method" | "get" | "set"
computed: boolean
static: boolean
}
export interface ClassDeclaration extends Class {
type: "ClassDeclaration"
id: Identifier
}
export interface ClassExpression extends Class {
type: "ClassExpression"
}
export interface MetaProperty extends Node {
type: "MetaProperty"
meta: Identifier
property: Identifier
}
export interface ImportDeclaration extends Node {
type: "ImportDeclaration"
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>
source: Literal
attributes: Array<ImportAttribute>
}
export interface ImportSpecifier extends Node {
type: "ImportSpecifier"
imported: Identifier | Literal
local: Identifier
}
export interface ImportDefaultSpecifier extends Node {
type: "ImportDefaultSpecifier"
local: Identifier
}
export interface ImportNamespaceSpecifier extends Node {
type: "ImportNamespaceSpecifier"
local: Identifier
}
export interface ImportAttribute extends Node {
type: "ImportAttribute"
key: Identifier | Literal
value: Literal
}
export interface ExportNamedDeclaration extends Node {
type: "ExportNamedDeclaration"
declaration?: Declaration | null
specifiers: Array<ExportSpecifier>
source?: Literal | null
attributes: Array<ImportAttribute>
}
export interface ExportSpecifier extends Node {
type: "ExportSpecifier"
exported: Identifier | Literal
local: Identifier | Literal
}
export interface AnonymousFunctionDeclaration extends Function {
type: "FunctionDeclaration"
id: null
body: BlockStatement
}
export interface AnonymousClassDeclaration extends Class {
type: "ClassDeclaration"
id: null
}
export interface ExportDefaultDeclaration extends Node {
type: "ExportDefaultDeclaration"
declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression
}
export interface ExportAllDeclaration extends Node {
type: "ExportAllDeclaration"
source: Literal
exported?: Identifier | Literal | null
attributes: Array<ImportAttribute>
}
export interface AwaitExpression extends Node {
type: "AwaitExpression"
argument: Expression
}
export interface ChainExpression extends Node {
type: "ChainExpression"
expression: MemberExpression | CallExpression
}
export interface ImportExpression extends Node {
type: "ImportExpression"
source: Expression
options: Expression | null
}
export interface ParenthesizedExpression extends Node {
type: "ParenthesizedExpression"
expression: Expression
}
export interface PropertyDefinition extends Node {
type: "PropertyDefinition"
key: Expression | PrivateIdentifier
value?: Expression | null
computed: boolean
static: boolean
}
export interface PrivateIdentifier extends Node {
type: "PrivateIdentifier"
name: string
}
export interface StaticBlock extends Node {
type: "StaticBlock"
body: Array<Statement>
}
export type Statement =
| ExpressionStatement
| BlockStatement
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration
export type Declaration =
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
export type Expression =
| Identifier
| Literal
| ThisExpression
| ArrayExpression
| ObjectExpression
| FunctionExpression
| UnaryExpression
| UpdateExpression
| BinaryExpression
| AssignmentExpression
| LogicalExpression
| MemberExpression
| ConditionalExpression
| CallExpression
| NewExpression
| SequenceExpression
| ArrowFunctionExpression
| YieldExpression
| TemplateLiteral
| TaggedTemplateExpression
| ClassExpression
| MetaProperty
| AwaitExpression
| ChainExpression
| ImportExpression
| ParenthesizedExpression
export type Pattern =
| Identifier
| MemberExpression
| ObjectPattern
| ArrayPattern
| RestElement
| AssignmentPattern
export type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
/**
* This interface is only used for defining {@link AnyNode}.
* It exists so that it can be extended by plugins:
*
* @example
* ```typescript
* declare module 'acorn' {
* interface NodeTypes {
* pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
* }
* }
* ```
*/
interface NodeTypes {
core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
}
export type AnyNode = NodeTypes[keyof NodeTypes]
export function parse(input: string, options: Options): Program
export function parseExpressionAt(input: string, pos: number, options: Options): Expression
export function tokenizer(input: string, options: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
export interface Options {
/**
* `ecmaVersion` indicates the ECMAScript version to parse. Can be a
* number, either in year (`2022`) or plain version number (`6`) form,
* or `"latest"` (the latest the library supports). This influences
* support for strict mode, the set of reserved words, and support for
* new syntax features.
*/
ecmaVersion: ecmaVersion
/**
* `sourceType` indicates the mode the code should be parsed in.
* Can be either `"script"` or `"module"`. This influences global
* strict mode and parsing of `import` and `export` declarations.
*/
sourceType?: "script" | "module"
/**
* a callback that will be called when a semicolon is automatically inserted.
* @param lastTokEnd the position of the comma as an offset
* @param lastTokEndLoc location if {@link locations} is enabled
*/
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
/**
* similar to `onInsertedSemicolon`, but for trailing commas
* @param lastTokEnd the position of the comma as an offset
* @param lastTokEndLoc location if `locations` is enabled
*/
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
/**
* By default, reserved words are only enforced if ecmaVersion >= 5.
* Set `allowReserved` to a boolean value to explicitly turn this on
* an off. When this option has the value "never", reserved words
* and keywords can also not be used as property names.
*/
allowReserved?: boolean | "never"
/**
* When enabled, a return at the top level is not considered an error.
*/
allowReturnOutsideFunction?: boolean
/**
* When enabled, import/export statements are not constrained to
* appearing at the top of the program, and an import.meta expression
* in a script isn't considered an error.
*/
allowImportExportEverywhere?: boolean
/**
* By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022.
* When enabled, await identifiers are allowed to appear at the top-level scope,
* but they are still not allowed in non-async functions.
*/
allowAwaitOutsideFunction?: boolean
/**
* When enabled, super identifiers are not constrained to
* appearing in methods and do not raise an error when they appear elsewhere.
*/
allowSuperOutsideMethod?: boolean
/**
* When enabled, hashbang directive in the beginning of file is
* allowed and treated as a line comment. Enabled by default when
* {@link ecmaVersion} >= 2023.
*/
allowHashBang?: boolean
/**
* By default, the parser will verify that private properties are
* only used in places where they are valid and have been declared.
* Set this to false to turn such checks off.
*/
checkPrivateFields?: boolean
/**
* When `locations` is on, `loc` properties holding objects with
* `start` and `end` properties as {@link Position} objects will be attached to the
* nodes.
*/
locations?: boolean
/**
* a callback that will cause Acorn to call that export function with object in the same
* format as tokens returned from `tokenizer().getToken()`. Note
* that you are not allowed to call the parser from the
* callback—that will corrupt its internal state.
*/
onToken?: ((token: Token) => void) | Token[]
/**
* This takes a export function or an array.
*
* When a export function is passed, Acorn will call that export function with `(block, text, start,
* end)` parameters whenever a comment is skipped. `block` is a
* boolean indicating whether this is a block (`/* *\/`) comment,
* `text` is the content of the comment, and `start` and `end` are
* character offsets that denote the start and end of the comment.
* When the {@link locations} option is on, two more parameters are
* passed, the full locations of {@link Position} export type of the start and
* end of the comments.
*
* When a array is passed, each found comment of {@link Comment} export type is pushed to the array.
*
* Note that you are not allowed to call the
* parser from the callback—that will corrupt its internal state.
*/
onComment?: ((
isBlock: boolean, text: string, start: number, end: number, startLoc?: Position,
endLoc?: Position
) => void) | Comment[]
/**
* Nodes have their start and end characters offsets recorded in
* `start` and `end` properties (directly on the node, rather than
* the `loc` object, which holds line/column data. To also add a
* [semi-standardized][range] `range` property holding a `[start,
* end]` array with the same numbers, set the `ranges` option to
* `true`.
*/
ranges?: boolean
/**
* It is possible to parse multiple files into a single AST by
* passing the tree produced by parsing the first file as
* `program` option in subsequent parses. This will add the
* toplevel forms of the parsed file to the `Program` (top) node
* of an existing parse tree.
*/
program?: Node
/**
* When {@link locations} is on, you can pass this to record the source
* file in every node's `loc` object.
*/
sourceFile?: string
/**
* This value, if given, is stored in every node, whether {@link locations} is on or off.
*/
directSourceFile?: string
/**
* When enabled, parenthesized expressions are represented by
* (non-standard) ParenthesizedExpression nodes
*/
preserveParens?: boolean
}
export class Parser {
options: Options
input: string
protected constructor(options: Options, input: string, startPos?: number)
parse(): Program
static parse(input: string, options: Options): Program
static parseExpressionAt(input: string, pos: number, options: Options): Expression
static tokenizer(input: string, options: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
}
export const defaultOptions: Options
export function getLineInfo(input: string, offset: number): Position
export class TokenType {
label: string
keyword: string | undefined
}
export const tokTypes: {
num: TokenType
regexp: TokenType
string: TokenType
name: TokenType
privateId: TokenType
eof: TokenType
bracketL: TokenType
bracketR: TokenType
braceL: TokenType
braceR: TokenType
parenL: TokenType
parenR: TokenType
comma: TokenType
semi: TokenType
colon: TokenType
dot: TokenType
question: TokenType
questionDot: TokenType
arrow: TokenType
template: TokenType
invalidTemplate: TokenType
ellipsis: TokenType
backQuote: TokenType
dollarBraceL: TokenType
eq: TokenType
assign: TokenType
incDec: TokenType
prefix: TokenType
logicalOR: TokenType
logicalAND: TokenType
bitwiseOR: TokenType
bitwiseXOR: TokenType
bitwiseAND: TokenType
equality: TokenType
relational: TokenType
bitShift: TokenType
plusMin: TokenType
modulo: TokenType
star: TokenType
slash: TokenType
starstar: TokenType
coalesce: TokenType
_break: TokenType
_case: TokenType
_catch: TokenType
_continue: TokenType
_debugger: TokenType
_default: TokenType
_do: TokenType
_else: TokenType
_finally: TokenType
_for: TokenType
_function: TokenType
_if: TokenType
_return: TokenType
_switch: TokenType
_throw: TokenType
_try: TokenType
_var: TokenType
_const: TokenType
_while: TokenType
_with: TokenType
_new: TokenType
_this: TokenType
_super: TokenType
_class: TokenType
_extends: TokenType
_export: TokenType
_import: TokenType
_null: TokenType
_true: TokenType
_false: TokenType
_in: TokenType
_instanceof: TokenType
_typeof: TokenType
_void: TokenType
_delete: TokenType
}
export interface Comment {
type: "Line" | "Block"
value: string
start: number
end: number
loc?: SourceLocation
range?: [number, number]
}
export class Token {
type: TokenType
start: number
end: number
loc?: SourceLocation
range?: [number, number]
}
export const version: stringnode_modules\@typescript-eslint\eslint-plugin\raw-plugin.d.ts (Line 5:10 - Line 21:11), node_modules\@typescript-eslint\eslint-plugin\dist\raw-plugin.d.ts (Line 3:9 - Line 19:2)
: {
flatConfigs: {
'flat/all': FlatConfig.ConfigArray;
'flat/base': FlatConfig.Config;
'flat/disable-type-checked': FlatConfig.Config;
'flat/eslint-recommended': FlatConfig.Config;
'flat/recommended': FlatConfig.ConfigArray;
'flat/recommended-type-checked': FlatConfig.ConfigArray;
'flat/recommended-type-checked-only': FlatConfig.ConfigArray;
'flat/strict': FlatConfig.ConfigArray;
'flat/strict-type-checked': FlatConfig.ConfigArray;
'flat/strict-type-checked-only': FlatConfig.ConfigArray;
'flat/stylistic': FlatConfig.ConfigArray;
'flat/stylistic-type-checked': FlatConfig.ConfigArray;
'flat/stylistic-type-checked-only': FlatConfig.ConfigArray;
};
parser: FlatConfignode_modules\@types\react-dom\client.d.ts (Line 38:5 - Line 57:10), node_modules\@types\react-dom\client.d.ts (Line 18:5 - Line 37:12)
/**
* Prefix for `useId`.
*/
identifierPrefix?: string;
onUncaughtError?:
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
| undefined;
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
onCaughtError?:
| ((
error: unknown,
errorInfo: {
componentStack?: string | undefined;
errorBoundary?: React.Component<unknown> | undefined;
},
) => void)
| undefined;
}
export interface ErrorInfonode_modules\@types\react\jsx-runtime.d.ts (Line 1:1 - Line 36:2), node_modules\@types\react\ts5.0\v18\jsx-runtime.d.ts (Line 1:1 - Line 35:2)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
type ElementType = React.JSX.ElementType;
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsx(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxs(
type: React.ElementType,
props: unknown,
key?: React.Key,
): React.ReactElement;node_modules\@types\react\jsx-dev-runtime.d.ts (Line 1:1 - Line 45:2), node_modules\@types\react\ts5.0\v18\jsx-runtime.d.ts (Line 1:1 - Line 44:2)
import * as React from "./";
export { Fragment } from "./";
export namespace JSX {
type ElementType = React.JSX.ElementType;
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}
export interface JSXSource {
/**
* The source file where the element originates from.
*/
fileName?: string | undefined;
/**
* The line number where the element was created.
*/
lineNumber?: number | undefined;
/**
* The column number where the element was created.
*/
columnNumber?: number | undefined;
}
/**
* Create a React element.
*
* You should not use this function directly. Use JSX and a transpiler instead.
*/
export function jsxDEV(
type: React.ElementType,
props: unknown,
key: React.Key | undefined,
isStatic: boolean,
source?: JSXSource,
self?: unknown,
): React.ReactElement;node_modules\@types\react\global.d.ts (Line 1:1 - Line 165:2), node_modules\@types\react\ts5.0\v18\ts5.0\global.d.ts (Line 1:1 - Line 165:2)
/*
React projects that don't include the DOM library need these interfaces to compile.
React Native applications use React, but there is no DOM available. The JavaScript runtime
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
Warning: all of these interfaces are empty. If you want type definitions for various properties
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
*/
interface Event {}
interface AnimationEvent extends Event {}
interface ClipboardEvent extends Event {}
interface CompositionEvent extends Event {}
interface DragEvent extends Event {}
interface FocusEvent extends Event {}
interface InputEvent extends Event {}
interface KeyboardEvent extends Event {}
interface MouseEvent extends Event {}
interface TouchEvent extends Event {}
interface PointerEvent extends Event {}
interface ToggleEvent extends Event {}
interface TransitionEvent extends Event {}
interface UIEvent extends Event {}
interface WheelEvent extends Event {}
interface EventTarget {}
interface Document {}
interface DataTransfer {}
interface StyleMedia {}
interface Element {}
interface DocumentFragment {}
interface HTMLElement extends Element {}
interface HTMLAnchorElement extends HTMLElement {}
interface HTMLAreaElement extends HTMLElement {}
interface HTMLAudioElement extends HTMLElement {}
interface HTMLBaseElement extends HTMLElement {}
interface HTMLBodyElement extends HTMLElement {}
interface HTMLBRElement extends HTMLElement {}
interface HTMLButtonElement extends HTMLElement {}
interface HTMLCanvasElement extends HTMLElement {}
interface HTMLDataElement extends HTMLElement {}
interface HTMLDataListElement extends HTMLElement {}
interface HTMLDetailsElement extends HTMLElement {}
interface HTMLDialogElement extends HTMLElement {}
interface HTMLDivElement extends HTMLElement {}
interface HTMLDListElement extends HTMLElement {}
interface HTMLEmbedElement extends HTMLElement {}
interface HTMLFieldSetElement extends HTMLElement {}
interface HTMLFormElement extends HTMLElement {}
interface HTMLHeadingElement extends HTMLElement {}
interface HTMLHeadElement extends HTMLElement {}
interface HTMLHRElement extends HTMLElement {}
interface HTMLHtmlElement extends HTMLElement {}
interface HTMLIFrameElement extends HTMLElement {}
interface HTMLImageElement extends HTMLElement {}
interface HTMLInputElement extends HTMLElement {}
interface HTMLModElement extends HTMLElement {}
interface HTMLLabelElement extends HTMLElement {}
interface HTMLLegendElement extends HTMLElement {}
interface HTMLLIElement extends HTMLElement {}
interface HTMLLinkElement extends HTMLElement {}
interface HTMLMapElement extends HTMLElement {}
interface HTMLMetaElement extends HTMLElement {}
interface HTMLMeterElement extends HTMLElement {}
interface HTMLObjectElement extends HTMLElement {}
interface HTMLOListElement extends HTMLElement {}
interface HTMLOptGroupElement extends HTMLElement {}
interface HTMLOptionElement extends HTMLElement {}
interface HTMLOutputElement extends HTMLElement {}
interface HTMLParagraphElement extends HTMLElement {}
interface HTMLParamElement extends HTMLElement {}
interface HTMLPreElement extends HTMLElement {}
interface HTMLProgressElement extends HTMLElement {}
interface HTMLQuoteElement extends HTMLElement {}
interface HTMLSlotElement extends HTMLElement {}
interface HTMLScriptElement extends HTMLElement {}
interface HTMLSelectElement extends HTMLElement {}
interface HTMLSourceElement extends HTMLElement {}
interface HTMLSpanElement extends HTMLElement {}
interface HTMLStyleElement extends HTMLElement {}
interface HTMLTableElement extends HTMLElement {}
interface HTMLTableColElement extends HTMLElement {}
interface HTMLTableDataCellElement extends HTMLElement {}
interface HTMLTableHeaderCellElement extends HTMLElement {}
interface HTMLTableRowElement extends HTMLElement {}
interface HTMLTableSectionElement extends HTMLElement {}
interface HTMLTemplateElement extends HTMLElement {}
interface HTMLTextAreaElement extends HTMLElement {}
interface HTMLTimeElement extends HTMLElement {}
interface HTMLTitleElement extends HTMLElement {}
interface HTMLTrackElement extends HTMLElement {}
interface HTMLUListElement extends HTMLElement {}
interface HTMLVideoElement extends HTMLElement {}
interface HTMLWebViewElement extends HTMLElement {}
interface SVGElement extends Element {}
interface SVGSVGElement extends SVGElement {}
interface SVGCircleElement extends SVGElement {}
interface SVGClipPathElement extends SVGElement {}
interface SVGDefsElement extends SVGElement {}
interface SVGDescElement extends SVGElement {}
interface SVGEllipseElement extends SVGElement {}
interface SVGFEBlendElement extends SVGElement {}
interface SVGFEColorMatrixElement extends SVGElement {}
interface SVGFEComponentTransferElement extends SVGElement {}
interface SVGFECompositeElement extends SVGElement {}
interface SVGFEConvolveMatrixElement extends SVGElement {}
interface SVGFEDiffuseLightingElement extends SVGElement {}
interface SVGFEDisplacementMapElement extends SVGElement {}
interface SVGFEDistantLightElement extends SVGElement {}
interface SVGFEDropShadowElement extends SVGElement {}
interface SVGFEFloodElement extends SVGElement {}
interface SVGFEFuncAElement extends SVGElement {}
interface SVGFEFuncBElement extends SVGElement {}
interface SVGFEFuncGElement extends SVGElement {}
interface SVGFEFuncRElement extends SVGElement {}
interface SVGFEGaussianBlurElement extends SVGElement {}
interface SVGFEImageElement extends SVGElement {}
interface SVGFEMergeElement extends SVGElement {}
interface SVGFEMergeNodeElement extends SVGElement {}
interface SVGFEMorphologyElement extends SVGElement {}
interface SVGFEOffsetElement extends SVGElement {}
interface SVGFEPointLightElement extends SVGElement {}
interface SVGFESpecularLightingElement extends SVGElement {}
interface SVGFESpotLightElement extends SVGElement {}
interface SVGFETileElement extends SVGElement {}
interface SVGFETurbulenceElement extends SVGElement {}
interface SVGFilterElement extends SVGElement {}
interface SVGForeignObjectElement extends SVGElement {}
interface SVGGElement extends SVGElement {}
interface SVGImageElement extends SVGElement {}
interface SVGLineElement extends SVGElement {}
interface SVGLinearGradientElement extends SVGElement {}
interface SVGMarkerElement extends SVGElement {}
interface SVGMaskElement extends SVGElement {}
interface SVGMetadataElement extends SVGElement {}
interface SVGPathElement extends SVGElement {}
interface SVGPatternElement extends SVGElement {}
interface SVGPolygonElement extends SVGElement {}
interface SVGPolylineElement extends SVGElement {}
interface SVGRadialGradientElement extends SVGElement {}
interface SVGRectElement extends SVGElement {}
interface SVGSetElement extends SVGElement {}
interface SVGStopElement extends SVGElement {}
interface SVGSwitchElement extends SVGElement {}
interface SVGSymbolElement extends SVGElement {}
interface SVGTextElement extends SVGElement {}
interface SVGTextPathElement extends SVGElement {}
interface SVGTSpanElement extends SVGElement {}
interface SVGUseElement extends SVGElement {}
interface SVGViewElement extends SVGElement {}
interface FormData {}
interface Text {}
interface TouchList {}
interface WebGLRenderingContext {}
interface WebGL2RenderingContext {}
interface TrustedHTML {}
interface Blob {}
interface MediaStream {}
interface MediaSource {}node_modules\@types\react\experimental.d.ts (Line 1:1 - Line 248:2), node_modules\@types\react\ts5.0\experimental.d.ts (Line 1:1 - Line 248:2)
/**
* These are types for things that are present in the `experimental` builds of React but not yet
* on a stable build.
*
* Once they are promoted to stable they can just be moved to the main index file.
*
* To load the types declared here in an actual project, there are three ways. The easiest one,
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
* is to add `"react/experimental"` to the `"types"` array.
*
* Alternatively, a specific import syntax can to be used from a typescript file.
* This module does not exist in reality, which is why the {} is important:
*
* ```ts
* import {} from 'react/experimental'
* ```
*
* It is also possible to include it through a triple-slash reference:
*
* ```ts
* /// <reference types="react/experimental" />
* ```
*
* Either the import or the reference only needs to appear once, anywhere in the project.
*/
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
//
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
// is a good place to start looking for details; it generally calls prop validation functions or delegates
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
//
// Suspense-related handling can be found in ReactFiberThrow.js.
import React = require("./canary");
export {};
declare const UNDEFINED_VOID_ONLY: unique symbol;
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
declare module "." {
export interface SuspenseProps {
/**
* The presence of this prop indicates that the content is computationally expensive to render.
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
* @see {@link https://github.com/facebook/react/pull/19936}
*/
unstable_expectedLoadTime?: number | undefined;
}
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
export interface SuspenseListCommonProps {
}
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
/**
* Note that SuspenseList require more than one child;
* it is a runtime warning to provide only a single child.
*
* It does, however, allow those children to be wrapped inside a single
* level of `<React.Fragment>`.
*/
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
/**
* Defines the order in which the `SuspenseList` children should be revealed.
*/
revealOrder: "forwards" | "backwards" | "unstable_legacy-backwards";
/**
* Dictates how unloaded items in a SuspenseList is shown.
*
* - By default, `SuspenseList` will show all fallbacks in the list.
* - `collapsed` shows only the next fallback in the list.
* - `hidden` doesn't show any unloaded items.
* - `visible` shows all fallbacks in the list.
*/
tail: SuspenseListTailMode;
}
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
children: ReactNode;
/**
* Defines the order in which the `SuspenseList` children should be revealed.
*/
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
/**
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
*/
tail?: never;
}
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
/**
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
* in which these components are revealed to the user.
*
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
* until previous items have been displayed (this behavior is adjustable).
*
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
*/
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export function experimental_useEffectEvent<T extends Function>(event: T): T;
type Reference = object;
type TaintableUniqueValue = string | bigint | ArrayBufferView;
function experimental_taintUniqueValue(
message: string | undefined,
lifetime: Reference,
value: TaintableUniqueValue,
): void;
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
export interface ViewTransitionInstance {
/**
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
*/
name: string;
}
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
export interface ViewTransitionProps {
children?: ReactNode | undefined;
/**
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
*/
default?: ViewTransitionClass | undefined;
/**
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
* `"none"` is a special value that deactivates the view transition name under that condition.
*/
enter?: ViewTransitionClass | undefined;
/**
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
* `"none"` is a special value that deactivates the view transition name under that condition.
*/
exit?: ViewTransitionClass | undefined;
/**
* "auto" will automatically assign a view-transition-name to the inner DOM node.
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
*
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
* @default "auto"
*/
name?: "auto" | (string & {}) | undefined;
/**
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
*/
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
/**
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
*/
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
/**
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
*/
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
/**
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
*/
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
ref?: Ref<ViewTransitionInstance> | undefined;
/**
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
* `"none"` is a special value that deactivates the view transition name under that condition.
*/
share?: ViewTransitionClass | undefined;
/**
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
* `"none"` is a special value that deactivates the view transition name under that condition.
*/
update?: ViewTransitionClass | undefined;
}
/**
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
*
* @see {@link https://github.com/facebook/react/pull/31975}
*/
export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
export function unstable_addTransitionType(type: string): void;
// @enableGestureTransition
// Implemented by the specific renderer e.g. `react-dom`.
// Keep in mind that augmented interfaces merge their JSDoc so if you put
// JSDoc here and in the renderer, the IDE will display both.
export interface GestureProvider {}
export interface GestureOptions {
rangeStart?: number | undefined;
rangeEnd?: number | undefined;
}
/** */
export function unstable_startGestureTransition(
provider: GestureProvider,
scope: () => void,
options?: GestureOptions,
): () => void;
// @enableFragmentRefs
export interface FragmentInstance {}
export interface FragmentProps {
ref?: Ref<FragmentInstance> | undefined;
}
// @enableActivity
export interface ActivityProps {
/**
* @default "visible"
*/
mode?:
| "hidden"
| "visible"
| undefined;
/**
* A name for this Activity boundary for instrumentation purposes.
* The name will help identify this boundary in React DevTools.
*/
name?: string | undefined;
children: ReactNode;
}
/** */
export const unstable_Activity: ExoticComponent<ActivityProps>;
// @enableSrcObject
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
srcObject: Blob;
}
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
srcObject: Blob | MediaSource | MediaStream;
}
}node_modules\@types\react\canary.d.ts (Line 1:1 - Line 38:2), node_modules\@types\react\ts5.0\canary.d.ts (Line 1:1 - Line 38:2)
/**
* These are types for things that are present in the React `canary` release channel.
*
* To load the types declared here in an actual project, there are three ways. The easiest one,
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
* is to add `"react/canary"` to the `"types"` array.
*
* Alternatively, a specific import syntax can to be used from a typescript file.
* This module does not exist in reality, which is why the {} is important:
*
* ```ts
* import {} from 'react/canary'
* ```
*
* It is also possible to include it through a triple-slash reference:
*
* ```ts
* /// <reference types="react/canary" />
* ```
*
* Either the import or the reference only needs to appear once, anywhere in the project.
*/
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
import React = require(".");
export {};
declare const UNDEFINED_VOID_ONLY: unique symbol;
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
declare module "." {
export function unstable_useCacheRefresh(): () => void;
export interface CacheSignal {}
export function cacheSignal(): null | CacheSignal;
}node_modules\@eslint-community\eslint-utils\index.d.mts (Line 1:1 - Line 217:2), node_modules\@eslint-community\eslint-utils\index.d.ts (Line 1:1 - Line 217:2)
import * as eslint from 'eslint';
import { Rule, AST } from 'eslint';
import * as estree from 'estree';
declare const READ: unique symbol;
declare const CALL: unique symbol;
declare const CONSTRUCT: unique symbol;
declare const ESM: unique symbol;
declare class ReferenceTracker {
constructor(globalScope: Scope$2, options?: {
mode?: "legacy" | "strict" | undefined;
globalObjectNames?: string[] | undefined;
} | undefined);
private variableStack;
private globalScope;
private mode;
private globalObjectNames;
iterateGlobalReferences<T>(traceMap: TraceMap$2<T>): IterableIterator<TrackedReferences$2<T>>;
iterateCjsReferences<T_1>(traceMap: TraceMap$2<T_1>): IterableIterator<TrackedReferences$2<T_1>>;
iterateEsmReferences<T_2>(traceMap: TraceMap$2<T_2>): IterableIterator<TrackedReferences$2<T_2>>;
iteratePropertyReferences<T_3>(node: Expression, traceMap: TraceMap$2<T_3>): IterableIterator<TrackedReferences$2<T_3>>;
private _iterateVariableReferences;
private _iteratePropertyReferences;
private _iterateLhsReferences;
private _iterateImportReferences;
}
declare namespace ReferenceTracker {
export { READ };
export { CALL };
export { CONSTRUCT };
export { ESM };
}
type Scope$2 = eslint.Scope.Scope;
type Expression = estree.Expression;
type TraceMap$2<T> = TraceMap$1<T>;
type TrackedReferences$2<T> = TrackedReferences$1<T>;
type StaticValue$2 = StaticValueProvided$1 | StaticValueOptional$1;
type StaticValueProvided$1 = {
optional?: undefined;
value: unknown;
};
type StaticValueOptional$1 = {
optional?: true;
value: undefined;
};
type ReferenceTrackerOptions$1 = {
globalObjectNames?: string[];
mode?: "legacy" | "strict";
};
type TraceMap$1<T = unknown> = {
[i: string]: TraceMapObject<T>;
};
type TraceMapObject<T> = {
[i: string]: TraceMapObject<T>;
[CALL]?: T;
[CONSTRUCT]?: T;
[READ]?: T;
[ESM]?: boolean;
};
type TrackedReferences$1<T> = {
info: T;
node: Rule.Node;
path: string[];
type: typeof CALL | typeof CONSTRUCT | typeof READ;
};
type HasSideEffectOptions$1 = {
considerGetters?: boolean;
considerImplicitTypeConversion?: boolean;
};
type PunctuatorToken<Value extends string> = AST.Token & {
type: "Punctuator";
value: Value;
};
type ArrowToken$1 = PunctuatorToken<"=>">;
type CommaToken$1 = PunctuatorToken<",">;
type SemicolonToken$1 = PunctuatorToken<";">;
type ColonToken$1 = PunctuatorToken<":">;
type OpeningParenToken$1 = PunctuatorToken<"(">;
type ClosingParenToken$1 = PunctuatorToken<")">;
type OpeningBracketToken$1 = PunctuatorToken<"[">;
type ClosingBracketToken$1 = PunctuatorToken<"]">;
type OpeningBraceToken$1 = PunctuatorToken<"{">;
type ClosingBraceToken$1 = PunctuatorToken<"}">;
declare function findVariable(initialScope: Scope$1, nameOrNode: string | Identifier): Variable | null;
type Scope$1 = eslint.Scope.Scope;
type Variable = eslint.Scope.Variable;
type Identifier = estree.Identifier;
declare function getFunctionHeadLocation(node: FunctionNode$1, sourceCode: SourceCode$2): SourceLocation | null;
type SourceCode$2 = eslint.SourceCode;
type FunctionNode$1 = estree.Function;
type SourceLocation = estree.SourceLocation;
declare function getFunctionNameWithKind(node: FunctionNode, sourceCode?: eslint.SourceCode | undefined): string;
type FunctionNode = estree.Function;
declare function getInnermostScope(initialScope: Scope, node: Node$4): Scope;
type Scope = eslint.Scope.Scope;
type Node$4 = estree.Node;
declare function getPropertyName(node: MemberExpression | MethodDefinition | Property | PropertyDefinition, initialScope?: eslint.Scope.Scope | undefined): string | null | undefined;
type MemberExpression = estree.MemberExpression;
type MethodDefinition = estree.MethodDefinition;
type Property = estree.Property;
type PropertyDefinition = estree.PropertyDefinition;
declare function getStaticValue(node: Node$3, initialScope?: eslint.Scope.Scope | null | undefined): StaticValue$1 | null;
type StaticValue$1 = StaticValue$2;
type Node$3 = estree.Node;
declare function getStringIfConstant(node: Node$2, initialScope?: eslint.Scope.Scope | null | undefined): string | null;
type Node$2 = estree.Node;
declare function hasSideEffect(node: Node$1, sourceCode: SourceCode$1, options?: HasSideEffectOptions$1 | undefined): boolean;
type Node$1 = estree.Node;
type SourceCode$1 = eslint.SourceCode;
declare function isArrowToken(token: CommentOrToken): token is ArrowToken$1;
declare function isCommaToken(token: CommentOrToken): token is CommaToken$1;
declare function isSemicolonToken(token: CommentOrToken): token is SemicolonToken$1;
declare function isColonToken(token: CommentOrToken): token is ColonToken$1;
declare function isOpeningParenToken(token: CommentOrToken): token is OpeningParenToken$1;
declare function isClosingParenToken(token: CommentOrToken): token is ClosingParenToken$1;
declare function isOpeningBracketToken(token: CommentOrToken): token is OpeningBracketToken$1;
declare function isClosingBracketToken(token: CommentOrToken): token is ClosingBracketToken$1;
declare function isOpeningBraceToken(token: CommentOrToken): token is OpeningBraceToken$1;
declare function isClosingBraceToken(token: CommentOrToken): token is ClosingBraceToken$1;
declare function isCommentToken(token: CommentOrToken): token is estree.Comment;
declare function isNotArrowToken(arg0: CommentOrToken): boolean;
declare function isNotCommaToken(arg0: CommentOrToken): boolean;
declare function isNotSemicolonToken(arg0: CommentOrToken): boolean;
declare function isNotColonToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningParenToken(arg0: CommentOrToken): boolean;
declare function isNotClosingParenToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningBracketToken(arg0: CommentOrToken): boolean;
declare function isNotClosingBracketToken(arg0: CommentOrToken): boolean;
declare function isNotOpeningBraceToken(arg0: CommentOrToken): boolean;
declare function isNotClosingBraceToken(arg0: CommentOrToken): boolean;
declare function isNotCommentToken(arg0: CommentOrToken): boolean;
type Token = eslint.AST.Token;
type Comment = estree.Comment;
type CommentOrToken = Comment | Token;
declare function isParenthesized(timesOrNode: Node | number, nodeOrSourceCode: Node | SourceCode, optionalSourceCode?: eslint.SourceCode | undefined): boolean;
type Node = estree.Node;
type SourceCode = eslint.SourceCode;
declare class PatternMatcher {
constructor(pattern: RegExp, options?: {
escaped?: boolean | undefined;
} | undefined);
execAll(str: string): IterableIterator<RegExpExecArray>;
test(str: string): boolean;
[Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string;
}
declare namespace _default {
export { CALL };
export { CONSTRUCT };
export { ESM };
export { findVariable };
export { getFunctionHeadLocation };
export { getFunctionNameWithKind };
export { getInnermostScope };
export { getPropertyName };
export { getStaticValue };
export { getStringIfConstant };
export { hasSideEffect };
export { isArrowToken };
export { isClosingBraceToken };
export { isClosingBracketToken };
export { isClosingParenToken };
export { isColonToken };
export { isCommaToken };
export { isCommentToken };
export { isNotArrowToken };
export { isNotClosingBraceToken };
export { isNotClosingBracketToken };
export { isNotClosingParenToken };
export { isNotColonToken };
export { isNotCommaToken };
export { isNotCommentToken };
export { isNotOpeningBraceToken };
export { isNotOpeningBracketToken };
export { isNotOpeningParenToken };
export { isNotSemicolonToken };
export { isOpeningBraceToken };
export { isOpeningBracketToken };
export { isOpeningParenToken };
export { isParenthesized };
export { isSemicolonToken };
export { PatternMatcher };
export { READ };
export { ReferenceTracker };
}
type StaticValue = StaticValue$2;
type StaticValueOptional = StaticValueOptional$1;
type StaticValueProvided = StaticValueProvided$1;
type ReferenceTrackerOptions = ReferenceTrackerOptions$1;
type TraceMap<T> = TraceMap$1<T>;
type TrackedReferences<T> = TrackedReferences$1<T>;
type HasSideEffectOptions = HasSideEffectOptions$1;
type ArrowToken = ArrowToken$1;
type CommaToken = CommaToken$1;
type SemicolonToken = SemicolonToken$1;
type ColonToken = ColonToken$1;
type OpeningParenToken = OpeningParenToken$1;
type ClosingParenToken = ClosingParenToken$1;
type OpeningBracketToken = OpeningBracketToken$1;
type ClosingBracketToken = ClosingBracketToken$1;
type OpeningBraceToken = OpeningBraceToken$1;
type ClosingBraceToken = ClosingBraceToken$1;
export { ArrowToken, CALL, CONSTRUCT, ClosingBraceToken, ClosingBracketToken, ClosingParenToken, ColonToken, CommaToken, ESM, HasSideEffectOptions, OpeningBraceToken, OpeningBracketToken, OpeningParenToken, PatternMatcher, READ, ReferenceTracker, ReferenceTrackerOptions, SemicolonToken, StaticValue, StaticValueOptional, StaticValueProvided, TraceMap, TrackedReferences, _default as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken };src\utils\DateUtils.ts (Line 57:2 - Line 71:7), src\utils\DateUtils.ts (Line 3:2 - Line 17:6)
= (timestamp: number | Date | string): string => {
let date: Date;
if (typeof timestamp === 'string') {
date = new Date(timestamp);
} else if (typeof timestamp === 'number') {
date = new Date(timestamp);
} else {
date = timestamp;
}
if (!date || isNaN(date.getTime())) {
return i18n.t('dates.invalidDate');
}
returnsrc\utils\DateUtils.ts (Line 74:2 - Line 89:6), src\utils\DateUtils.ts (Line 3:2 - Line 18:7)
= (timestamp: number | Date | string): string => {
let date: Date;
if (typeof timestamp === 'string') {
date = new Date(timestamp);
} else if (typeof timestamp === 'number') {
date = new Date(timestamp);
} else {
date = timestamp;
}
if (!date || isNaN(date.getTime())) {
return i18n.t('dates.invalidDate');
}
const now = new Date();
const todaysrc\utils\CanvasUtils.ts (Line 160:3 - Line 174:16), src\utils\CanvasUtils.ts (Line 121:3 - Line 135:19)
targetCtx.closePath();
// Draw fill if fillColor is provided and not null
if (fillColor && fillColor !== null) {
targetCtx.fillStyle = fillColor;
targetCtx.fill();
}
// Draw stroke
targetCtx.strokeStyle = color;
targetCtx.lineWidth = strokeWidth;
targetCtx.stroke();
};
export const drawTextPayloadsrc\utils\CanvasUtils.ts (Line 268:2 - Line 290:24), src\utils\CanvasUtils.ts (Line 152:2 - Line 135:19)
* Math.sin(angle);
if (i === 0) {
targetCtx.moveTo(pointX, pointY);
} else {
targetCtx.lineTo(pointX, pointY);
}
}
targetCtx.closePath();
// Draw fill if fillColor is provided and not null
if (fillColor && fillColor !== null) {
targetCtx.fillStyle = fillColor;
targetCtx.fill();
}
// Draw stroke
targetCtx.strokeStyle = color;
targetCtx.lineWidth = strokeWidth;
targetCtx.stroke();
};
export const drawStraightLinePayloadnode_modules\side-channel-map\index.d.ts (Line 1:2 - Line 8:2), node_modules\side-channel-weakmap\index.d.ts (Line 1:2 - Line 9:2)
{
type Channel<K, V> = {
assert: (key: K) => void;
has: (key: K) => boolean;
get: (key: K) => V | undefined;
set: (key: K, value: V) => void;
delete: (key: K) => boolean;
};node_modules\side-channel-list\index.d.ts (Line 1:2 - Line 11:19), node_modules\side-channel-weakmap\index.d.ts (Line 1:2 - Line 11:18)
{
type Channel<K, V> = {
assert: (key: K) => void;
has: (key: K) => boolean;
get: (key: K) => V | undefined;
set: (key: K, value: V) => void;
delete: (key: K) => boolean;
};
}
declare function getSideChannelListnode_modules\react-i18next\TransWithoutContext.d.ts (Line 45:3 - Line 52:2), node_modules\react-i18next\TransWithoutContext.d.ts (Line 21:11 - Line 28:2)
<
Key extends ParseKeys<Ns, TOpt, KPrefix>,
Ns extends Namespace = _DefaultNamespace,
KPrefix = undefined,
TContext extends string | undefined = undefined,
TOpt extends TOptions & { context?: TContext } = { context: TContext },
E = React.HTMLProps<HTMLDivElement>,
>(node_modules\react-i18next\TransWithoutContext.d.ts (Line 63:2 - Line 70:2), node_modules\react-i18next\TransWithoutContext.d.ts (Line 28:2 - Line 35:2)
{
children?: TransChild | readonly TransChild[];
components?: readonly React.ReactElement[] | { readonly [tagName: string]: React.ReactElement };
count?: number;
context?: TContext;
defaults?: string;
i18n?: i18n;
i18nKey?: Key;node_modules\nanoid\index.d.cts (Line 1:1 - Line 91:11), node_modules\nanoid\index.d.ts (Line 1:1 - Line 91:11)
/**
* Generate secure URL-friendly unique ID.
*
* By default, the ID will have 21 symbols to have a collision probability
* similar to UUID v4.
*
* ```js
* import { nanoid } from 'nanoid'
* model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
* ```
*
* @param size Size of the ID. The default size is 21.
* @returns A random string.
*/
export function nanoid(size?: number): string
/**
* Generate secure unique ID with custom alphabet.
*
* Alphabet must contain 256 symbols or less. Otherwise, the generator
* will not be secure.
*
* @param alphabet Alphabet used to generate the ID.
* @param defaultSize Size of the ID. The default size is 21.
* @returns A random string generator.
*
* ```js
* const { customAlphabet } = require('nanoid')
* const nanoid = customAlphabet('0123456789абвгдеё', 5)
* nanoid() //=> "8ё56а"
* ```
*/
export function customAlphabet(
alphabet: string,
defaultSize?: number
): (size?: number) => string
/**
* Generate unique ID with custom random generator and alphabet.
*
* Alphabet must contain 256 symbols or less. Otherwise, the generator
* will not be secure.
*
* ```js
* import { customRandom } from 'nanoid/format'
*
* const nanoid = customRandom('abcdef', 5, size => {
* const random = []
* for (let i = 0; i < size; i++) {
* random.push(randomByte())
* }
* return random
* })
*
* nanoid() //=> "fbaef"
* ```
*
* @param alphabet Alphabet used to generate a random string.
* @param size Size of the random string.
* @param random A random bytes generator.
* @returns A random string generator.
*/
export function customRandom(
alphabet: string,
size: number,
random: (bytes: number) => Uint8Array
): () => string
/**
* URL safe symbols.
*
* ```js
* import { urlAlphabet } from 'nanoid'
* const nanoid = customAlphabet(urlAlphabet, 10)
* nanoid() //=> "Uakgb_J5m9"
* ```
*/
export const urlAlphabet: string
/**
* Generate an array of random bytes collected from hardware noise.
*
* ```js
* import { customRandom, random } from 'nanoid'
* const nanoid = customRandom("abcdef", 5, random)
* ```
*
* @param bytes Size of the array.
* @returns An array of random bytes.
*/
export function random(bytes: number): Uint8Arraynode_modules\i18next\index.d.mts (Line 42:1 - Line 59:2), node_modules\i18next\index.d.ts (Line 559:1 - Line 576:2)
declare const i18next: i18n;
export default i18next;
export const createInstance: i18n['createInstance'];
export const dir: i18n['dir'];
export const init: i18n['init'];
export const loadResources: i18n['loadResources'];
export const reloadResources: i18n['reloadResources'];
export const use: i18n['use'];
export const changeLanguage: i18n['changeLanguage'];
export const getFixedT: i18n['getFixedT'];
export const t: i18n['t'];
export const exists: i18n['exists'];
export const setDefaultNamespace: i18n['setDefaultNamespace'];
export const hasLoadedNamespace: i18n['hasLoadedNamespace'];
export const loadNamespaces: i18n['loadNamespaces'];
export const loadLanguages: i18n['loadLanguages'];node_modules\for-each\index.d.ts (Line 7:2 - Line 13:7), node_modules\for-each\index.d.ts (Line 1:2 - Line 7:10)
, This = undefined>(
arr: O,
callback: (this: This | void, value: O[number], index: number, array: O) => void,
thisArg?: This,
): void;
declare function forEach<O extends objectnode_modules\eslint-plugin-react\index.d.ts (Line 16:9 - Line 121:8), node_modules\eslint-plugin-react\lib\rules\index.d.ts (Line 3:6 - Line 108:36)
: {
'boolean-prop-naming': import("eslint").Rule.RuleModule;
'button-has-type': import("eslint").Rule.RuleModule;
'checked-requires-onchange-or-readonly': import("eslint").Rule.RuleModule;
'default-props-match-prop-types': import("eslint").Rule.RuleModule;
'destructuring-assignment': import("eslint").Rule.RuleModule;
'display-name': import("eslint").Rule.RuleModule;
'forbid-component-props': import("eslint").Rule.RuleModule;
'forbid-dom-props': import("eslint").Rule.RuleModule;
'forbid-elements': import("eslint").Rule.RuleModule;
'forbid-foreign-prop-types': import("eslint").Rule.RuleModule;
'forbid-prop-types': import("eslint").Rule.RuleModule;
'forward-ref-uses-ref': import("eslint").Rule.RuleModule;
'function-component-definition': import("eslint").Rule.RuleModule;
'hook-use-state': import("eslint").Rule.RuleModule;
'iframe-missing-sandbox': import("eslint").Rule.RuleModule;
'jsx-boolean-value': import("eslint").Rule.RuleModule;
'jsx-child-element-spacing': import("eslint").Rule.RuleModule;
'jsx-closing-bracket-location': import("eslint").Rule.RuleModule;
'jsx-closing-tag-location': import("eslint").Rule.RuleModule;
'jsx-curly-spacing': import("eslint").Rule.RuleModule;
'jsx-curly-newline': import("eslint").Rule.RuleModule;
'jsx-equals-spacing': import("eslint").Rule.RuleModule;
'jsx-filename-extension': import("eslint").Rule.RuleModule;
'jsx-first-prop-new-line': import("eslint").Rule.RuleModule;
'jsx-handler-names': import("eslint").Rule.RuleModule;
'jsx-indent': import("eslint").Rule.RuleModule;
'jsx-indent-props': import("eslint").Rule.RuleModule;
'jsx-key': import("eslint").Rule.RuleModule;
'jsx-max-depth': import("eslint").Rule.RuleModule;
'jsx-max-props-per-line': import("eslint").Rule.RuleModule;
'jsx-newline': import("eslint").Rule.RuleModule;
'jsx-no-bind': import("eslint").Rule.RuleModule;
'jsx-no-comment-textnodes': import("eslint").Rule.RuleModule;
'jsx-no-constructed-context-values': import("eslint").Rule.RuleModule;
'jsx-no-duplicate-props': import("eslint").Rule.RuleModule;
'jsx-no-leaked-render': import("eslint").Rule.RuleModule;
'jsx-no-literals': import("eslint").Rule.RuleModule;
'jsx-no-script-url': import("eslint").Rule.RuleModule;
'jsx-no-target-blank': import("eslint").Rule.RuleModule;
'jsx-no-useless-fragment': import("eslint").Rule.RuleModule;
'jsx-one-expression-per-line': import("eslint").Rule.RuleModule;
'jsx-no-undef': import("eslint").Rule.RuleModule;
'jsx-curly-brace-presence': import("eslint").Rule.RuleModule;
'jsx-pascal-case': import("eslint").Rule.RuleModule;
'jsx-fragments': import("eslint").Rule.RuleModule;
'jsx-props-no-multi-spaces': import("eslint").Rule.RuleModule;
'jsx-props-no-spreading': import("eslint").Rule.RuleModule;
'jsx-props-no-spread-multi': import("eslint").Rule.RuleModule;
'jsx-sort-default-props': import("eslint").Rule.RuleModule;
'jsx-sort-props': import("eslint").Rule.RuleModule;
'jsx-space-before-closing': import("eslint").Rule.RuleModule;
'jsx-tag-spacing': import("eslint").Rule.RuleModule;
'jsx-uses-react': import("eslint").Rule.RuleModule;
'jsx-uses-vars': import("eslint").Rule.RuleModule;
'jsx-wrap-multilines': import("eslint").Rule.RuleModule;
'no-invalid-html-attribute': import("eslint").Rule.RuleModule;
'no-access-state-in-setstate': import("eslint").Rule.RuleModule;
'no-adjacent-inline-elements': import("eslint").Rule.RuleModule;
'no-array-index-key': import("eslint").Rule.RuleModule;
'no-arrow-function-lifecycle': import("eslint").Rule.RuleModule;
'no-children-prop': import("eslint").Rule.RuleModule;
'no-danger': import("eslint").Rule.RuleModule;
'no-danger-with-children': import("eslint").Rule.RuleModule;
'no-deprecated': import("eslint").Rule.RuleModule;
'no-did-mount-set-state': import("eslint").Rule.RuleModule;
'no-did-update-set-state': import("eslint").Rule.RuleModule;
'no-direct-mutation-state': import("eslint").Rule.RuleModule;
'no-find-dom-node': import("eslint").Rule.RuleModule;
'no-is-mounted': import("eslint").Rule.RuleModule;
'no-multi-comp': import("eslint").Rule.RuleModule;
'no-namespace': import("eslint").Rule.RuleModule;
'no-set-state': import("eslint").Rule.RuleModule;
'no-string-refs': import("eslint").Rule.RuleModule;
'no-redundant-should-component-update': import("eslint").Rule.RuleModule;
'no-render-return-value': import("eslint").Rule.RuleModule;
'no-this-in-sfc': import("eslint").Rule.RuleModule;
'no-typos': import("eslint").Rule.RuleModule;
'no-unescaped-entities': import("eslint").Rule.RuleModule;
'no-unknown-property': import("eslint").Rule.RuleModule;
'no-unsafe': import("eslint").Rule.RuleModule;
'no-unstable-nested-components': import("eslint").Rule.RuleModule;
'no-unused-class-component-methods': import("eslint").Rule.RuleModule;
'no-unused-prop-types': import("eslint").Rule.RuleModule;
'no-unused-state': import("eslint").Rule.RuleModule;
'no-object-type-as-default-prop': import("eslint").Rule.RuleModule;
'no-will-update-set-state': import("eslint").Rule.RuleModule;
'prefer-es6-class': import("eslint").Rule.RuleModule;
'prefer-exact-props': import("eslint").Rule.RuleModule;
'prefer-read-only-props': import("eslint").Rule.RuleModule;
'prefer-stateless-function': import("eslint").Rule.RuleModule;
'prop-types': import("eslint").Rule.RuleModule;
'react-in-jsx-scope': import("eslint").Rule.RuleModule;
'require-default-props': import("eslint").Rule.RuleModule;
'require-optimization': import("eslint").Rule.RuleModule;
'require-render-return': import("eslint").Rule.RuleModule;
'self-closing-comp': import("eslint").Rule.RuleModule;
'sort-comp': import("eslint").Rule.RuleModule;
'sort-default-props': import("eslint").Rule.RuleModule;
'sort-prop-types': import("eslint").Rule.RuleModule;
'state-in-constructor': import("eslint").Rule.RuleModule;
'static-property-placement': import("eslint").Rule.RuleModule;
'style-prop-object': import("eslint").Rule.RuleModule;
'void-dom-elements-no-children': import("eslint").Rule.RuleModule;
};
declarenode_modules\axios\index.d.cts (Line 6:2 - Line 11:6), node_modules\axios\index.d.ts (Line 9:2 - Line 14:17)
Method as Lowercase<Key>]: AxiosHeaders;
} & {common: AxiosHeaders}>;
type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean);
type AxiosHeaderParser = (this: AxiosHeaders, value: axiosnode_modules\axios\index.d.cts (Line 30:2 - Line 52:6), node_modules\axios\index.d.ts (Line 27:2 - Line 49:17)
AxiosHeaderValue;
has(header: string, matcher?: AxiosHeaderMatcher): boolean;
delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
clear(matcher?: AxiosHeaderMatcher): boolean;
normalize(format: boolean): AxiosHeaders;
concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
toJSON(asStrings?: boolean): RawAxiosHeaders;
static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
static accessor(header: string | string[]): AxiosHeaders;
static concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
getContentType(parser?: RegExp): RegExpExecArray | null;
getContentType(matcher?: AxiosHeaderMatcher): axiosnode_modules\axios\index.d.cts (Line 97:2 - Line 105:6), node_modules\axios\index.d.ts (Line 417:2 - Line 425:27)
AxiosResponse<T, D>;
isAxiosError: boolean;
status?: number;
toJSON: () => object;
cause?: Error;
static from<T = unknown, D = any>(
error: Error | unknown,
code?: string,
config?: axiosnode_modules\axios\index.d.cts (Line 107:2 - Line 124:8), node_modules\axios\index.d.ts (Line 427:2 - Line 444:7)
AxiosResponse<T, D>,
customProps?: object,
): AxiosError<T, D>;
static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
static readonly ERR_NETWORK = "ERR_NETWORK";
static readonly ERR_DEPRECATED = "ERR_DEPRECATED";
static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
static readonly ERR_INVALID_URL = "ERR_INVALID_URL";
static readonly ERR_CANCELED = "ERR_CANCELED";
static readonly ECONNABORTED = "ECONNABORTED";
static readonly ETIMEDOUT = "ETIMEDOUT";
}
declarenode_modules\axios\index.d.cts (Line 148:2 - Line 214:5), node_modules\axios\index.d.ts (Line 130:2 - Line 196:7)
enum HttpStatusCode {
Continue = 100,
SwitchingProtocols = 101,
Processing = 102,
EarlyHints = 103,
Ok = 200,
Created = 201,
Accepted = 202,
NonAuthoritativeInformation = 203,
NoContent = 204,
ResetContent = 205,
PartialContent = 206,
MultiStatus = 207,
AlreadyReported = 208,
ImUsed = 226,
MultipleChoices = 300,
MovedPermanently = 301,
Found = 302,
SeeOther = 303,
NotModified = 304,
UseProxy = 305,
Unused = 306,
TemporaryRedirect = 307,
PermanentRedirect = 308,
BadRequest = 400,
Unauthorized = 401,
PaymentRequired = 402,
Forbidden = 403,
NotFound = 404,
MethodNotAllowed = 405,
NotAcceptable = 406,
ProxyAuthenticationRequired = 407,
RequestTimeout = 408,
Conflict = 409,
Gone = 410,
LengthRequired = 411,
PreconditionFailed = 412,
PayloadTooLarge = 413,
UriTooLong = 414,
UnsupportedMediaType = 415,
RangeNotSatisfiable = 416,
ExpectationFailed = 417,
ImATeapot = 418,
MisdirectedRequest = 421,
UnprocessableEntity = 422,
Locked = 423,
FailedDependency = 424,
TooEarly = 425,
UpgradeRequired = 426,
PreconditionRequired = 428,
TooManyRequests = 429,
RequestHeaderFieldsTooLarge = 431,
UnavailableForLegalReasons = 451,
InternalServerError = 500,
NotImplemented = 501,
BadGateway = 502,
ServiceUnavailable = 503,
GatewayTimeout = 504,
HttpVersionNotSupported = 505,
VariantAlsoNegotiates = 506,
InsufficientStorage = 507,
LoopDetected = 508,
NotExtended = 510,
NetworkAuthenticationRequired = 511,
}
typenode_modules\axios\index.d.cts (Line 284:3 - Line 298:10), node_modules\axios\index.d.ts (Line 217:2 - Line 231:7)
type responseEncoding =
| 'ascii' | 'ASCII'
| 'ansi' | 'ANSI'
| 'binary' | 'BINARY'
| 'base64' | 'BASE64'
| 'base64url' | 'BASE64URL'
| 'hex' | 'HEX'
| 'latin1' | 'LATIN1'
| 'ucs-2' | 'UCS-2'
| 'ucs2' | 'UCS2'
| 'utf-8' | 'UTF-8'
| 'utf8' | 'UTF8'
| 'utf16le' | 'UTF16LE';
interfacenode_modules\axios\index.d.cts (Line 357:3 - Line 376:5), node_modules\axios\index.d.ts (Line 290:2 - Line 309:7)
interface AxiosProgressEvent {
loaded: number;
total?: number;
progress?: number;
bytes: number;
rate?: number;
estimated?: number;
upload?: boolean;
download?: boolean;
event?: BrowserProgressEvent;
lengthComputable: boolean;
}
type Milliseconds = number;
type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | (string & {});
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
typenode_modules\axios\index.d.cts (Line 385:3 - Line 435:5), node_modules\axios\index.d.ts (Line 318:2 - Line 368:7)
interface AxiosRequestConfig<D = any> {
url?: string;
method?: Method | string;
baseURL?: string;
allowAbsoluteUrls?: boolean;
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
params?: any;
paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
data?: D;
timeout?: Milliseconds;
timeoutErrorMessage?: string;
withCredentials?: boolean;
adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
responseEncoding?: responseEncoding | string;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
maxContentLength?: number;
validateStatus?: ((status: number) => boolean) | null;
maxBodyLength?: number;
maxRedirects?: number;
maxRate?: number | [MaxUploadRate, MaxDownloadRate];
beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>, statusCode: HttpStatusCode}) => void;
socketPath?: string | null;
transport?: any;
httpAgent?: any;
httpsAgent?: any;
proxy?: AxiosProxyConfig | false;
cancelToken?: CancelToken;
decompress?: boolean;
transitional?: TransitionalOptions;
signal?: GenericAbortSignal;
insecureHTTPParser?: boolean;
env?: {
FormData?: new (...args: any[]) => object;
};
formSerializer?: FormSerializerOptions;
family?: AddressFamily;
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
}
// Alias
typenode_modules\axios\index.d.cts (Line 441:3 - Line 455:10), node_modules\axios\index.d.ts (Line 374:2 - Line 388:7)
interface HeadersDefaults {
common: RawAxiosRequestHeaders;
delete: RawAxiosRequestHeaders;
get: RawAxiosRequestHeaders;
head: RawAxiosRequestHeaders;
post: RawAxiosRequestHeaders;
put: RawAxiosRequestHeaders;
patch: RawAxiosRequestHeaders;
options?: RawAxiosRequestHeaders;
purge?: RawAxiosRequestHeaders;
link?: RawAxiosRequestHeaders;
unlink?: RawAxiosRequestHeaders;
}
interfacenode_modules\axios\index.d.cts (Line 502:3 - Line 511:10), node_modules\axios\index.d.ts (Line 477:2 - Line 486:7)
interface AxiosInterceptorOptions {
synchronous?: boolean;
runWhen?: (config: InternalAxiosRequestConfig) => boolean;
}
type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number;
interfacenode_modules\axios\index.d.cts (Line 517:3 - Line 529:10), node_modules\axios\index.d.ts (Line 513:2 - Line 525:7)
interface AxiosInstance extends Axios {
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
create(config?: CreateAxiosDefaults): AxiosInstance;
defaults: Omit<AxiosDefaults, 'headers'> & {
headers: HeadersDefaults & {
[key: string]: AxiosHeaderValue
}
};
}
interfaceurl
node_modules\typed-array-byte-length\README.md (Line 56:1 - Line 70:63), node_modules\typed-array-byte-offset\README.md (Line 56:1 - Line 70:63)
BigUint64Array(buffer, 16)));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/typed-array-byte-offset
[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg
[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg
[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset
[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg
[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset
[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-node_modules\resolve\readme.markdown (Line 287:1 - Line 301:47), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 280:1 - Line 294:47)
les',
preserveSymlinks: true
}
```
# install
With [npm](https://npmjs.org) do:
```sh
npm install resolve
```
# license
MIT
[1]: https://npmjs.org/package/resolve
[2]: https://versionbadg.es/browserify/resolve.svg
[5]: https://david-dm.org/browserify/resolve.svg
[6]: https://david-dm.org/browserify/resolve
[7]: https://david-dm.org/browserify/resolve/dev-status.svg
[8]: https://david-dm.org/browserify/resolve#info=devDependencies
[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/resolve.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/resolve.svg
[downloads-url]: https://npm-stat.com/charts.html?package=resolve
[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/browserify/resolve/
[actions-image]: https://img.shields.io/endpoint?urmarkdown
node_modules\tsconfig-paths\node_modules\json5\LICENSE.md (Line 5:1 - Line 21:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\tinyglobby\node_modules\picomatch\README.md (Line 1:1 - Line 738:2), node_modules\vite\node_modules\picomatch\README.md (Line 1:1 - Line 738:2)
<h1 align="center">Picomatch</h1>
<p align="center">
<a href="https://npmjs.org/package/picomatch">
<img src="https://img.shields.io/npm/v/picomatch.svg" alt="version">
</a>
<a href="https://github.com/micromatch/picomatch/actions?workflow=Tests">
<img src="https://github.com/micromatch/picomatch/workflows/Tests/badge.svg" alt="test status">
</a>
<a href="https://coveralls.io/github/micromatch/picomatch">
<img src="https://img.shields.io/coveralls/github/micromatch/picomatch/master.svg" alt="coverage status">
</a>
<a href="https://npmjs.org/package/picomatch">
<img src="https://img.shields.io/npm/dm/picomatch.svg" alt="downloads">
</a>
</p>
<br>
<br>
<p align="center">
<strong>Blazing fast and accurate glob matcher written in JavaScript.</strong></br>
<em>No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.</em>
</p>
<br>
<br>
## Why picomatch?
* **Lightweight** - No dependencies
* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
* **Well tested** - Thousands of unit tests
See the [library comparison](#library-comparisons) to other libraries.
<br>
<br>
## Table of Contents
<details><summary> Click to expand </summary>
- [Install](#install)
- [Usage](#usage)
- [API](#api)
* [picomatch](#picomatch)
* [.test](#test)
* [.matchBase](#matchbase)
* [.isMatch](#ismatch)
* [.parse](#parse)
* [.scan](#scan)
* [.compileRe](#compilere)
* [.makeRe](#makere)
* [.toRegex](#toregex)
- [Options](#options)
* [Picomatch options](#picomatch-options)
* [Scan Options](#scan-options)
* [Options Examples](#options-examples)
- [Globbing features](#globbing-features)
* [Basic globbing](#basic-globbing)
* [Advanced globbing](#advanced-globbing)
* [Braces](#braces)
* [Matching special characters as literals](#matching-special-characters-as-literals)
- [Library Comparisons](#library-comparisons)
- [Benchmarks](#benchmarks)
- [Philosophies](#philosophies)
- [About](#about)
* [Author](#author)
* [License](#license)
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
</details>
<br>
<br>
## Install
Install with [npm](https://www.npmjs.com/):
```sh
npm install --save picomatch
```
<br>
## Usage
The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
```js
const pm = require('picomatch');
const isMatch = pm('*.js');
console.log(isMatch('abcd')); //=> false
console.log(isMatch('a.js')); //=> true
console.log(isMatch('a.md')); //=> false
console.log(isMatch('a/b.js')); //=> false
```
<br>
## API
### [picomatch](lib/picomatch.js#L31)
Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
**Params**
* `globs` **{String|Array}**: One or more glob patterns.
* `options` **{Object=}**
* `returns` **{Function=}**: Returns a matcher function.
**Example**
```js
const picomatch = require('picomatch');
// picomatch(glob[, options]);
const isMatch = picomatch('*.!(*a)');
console.log(isMatch('a.a')); //=> false
console.log(isMatch('a.b')); //=> true
```
**Example without node.js**
For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
```js
const picomatch = require('picomatch/posix');
// the same API, defaulting to posix paths
const isMatch = picomatch('a/*');
console.log(isMatch('a\\b')); //=> false
console.log(isMatch('a/b')); //=> true
// you can still configure the matcher function to accept windows paths
const isMatch = picomatch('a/*', { options: windows });
console.log(isMatch('a\\b')); //=> true
console.log(isMatch('a/b')); //=> true
```
### [.test](lib/picomatch.js#L116)
Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
**Params**
* `input` **{String}**: String to test.
* `regex` **{RegExp}**
* `returns` **{Object}**: Returns an object with matching info.
**Example**
```js
const picomatch = require('picomatch');
// picomatch.test(input, regex[, options]);
console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
```
### [.matchBase](lib/picomatch.js#L160)
Match the basename of a filepath.
**Params**
* `input` **{String}**: String to test.
* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
* `returns` **{Boolean}**
**Example**
```js
const picomatch = require('picomatch');
// picomatch.matchBase(input, glob[, options]);
console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
```
### [.isMatch](lib/picomatch.js#L182)
Returns true if **any** of the given glob `patterns` match the specified `string`.
**Params**
* **{String|Array}**: str The string to test.
* **{String|Array}**: patterns One or more glob patterns to use for matching.
* **{Object}**: See available [options](#options).
* `returns` **{Boolean}**: Returns true if any patterns match `str`
**Example**
```js
const picomatch = require('picomatch');
// picomatch.isMatch(string, patterns[, options]);
console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
```
### [.parse](lib/picomatch.js#L198)
Parse a glob pattern to create the source string for a regular expression.
**Params**
* `pattern` **{String}**
* `options` **{Object}**
* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
**Example**
```js
const picomatch = require('picomatch');
const result = picomatch.parse(pattern[, options]);
```
### [.scan](lib/picomatch.js#L230)
Scan a glob pattern to separate the pattern into segments.
**Params**
* `input` **{String}**: Glob pattern to scan.
* `options` **{Object}**
* `returns` **{Object}**: Returns an object with
**Example**
```js
const picomatch = require('picomatch');
// picomatch.scan(input[, options]);
const result = picomatch.scan('!./foo/*.js');
console.log(result);
{ prefix: '!./',
input: '!./foo/*.js',
start: 3,
base: 'foo',
glob: '*.js',
isBrace: false,
isBracket: false,
isGlob: true,
isExtglob: false,
isGlobstar: false,
negated: true }
```
### [.compileRe](lib/picomatch.js#L244)
Compile a regular expression from the `state` object returned by the
[parse()](#parse) method.
**Params**
* `state` **{Object}**
* `options` **{Object}**
* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
* `returns` **{RegExp}**
### [.makeRe](lib/picomatch.js#L285)
Create a regular expression from a parsed glob pattern.
**Params**
* `state` **{String}**: The object returned from the `.parse` method.
* `options` **{Object}**
* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
* `returns` **{RegExp}**: Returns a regex created from the given pattern.
**Example**
```js
const picomatch = require('picomatch');
const state = picomatch.parse('*.js');
// picomatch.compileRe(state[, options]);
console.log(picomatch.compileRe(state));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
```
### [.toRegex](lib/picomatch.js#L320)
Create a regular expression from the given regex source string.
**Params**
* `source` **{String}**: Regular expression source string.
* `options` **{Object}**
* `returns` **{RegExp}**
**Example**
```js
const picomatch = require('picomatch');
// picomatch.toRegex(source[, options]);
const { output } = picomatch.parse('*.js');
console.log(picomatch.toRegex(output));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
```
<br>
## Options
### Picomatch options
The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
| **Option** | **Type** | **Default value** | **Description** |
| --- | --- | --- | --- |
| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
| `matchBase` | `boolean` | `false` | Alias for `basename` |
| `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
| `noext` | `boolean` | `false` | Alias for `noextglob` |
| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
### Scan Options
In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
| **Option** | **Type** | **Default value** | **Description** |
| --- | --- | --- | --- |
| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
**Example**
```js
const picomatch = require('picomatch');
const result = picomatch.scan('!./foo/*.js', { tokens: true });
console.log(result);
// {
// prefix: '!./',
// input: '!./foo/*.js',
// start: 3,
// base: 'foo',
// glob: '*.js',
// isBrace: false,
// isBracket: false,
// isGlob: true,
// isExtglob: false,
// isGlobstar: false,
// negated: true,
// maxDepth: 2,
// tokens: [
// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
// { value: 'foo', depth: 1, isGlob: false },
// { value: '*.js', depth: 1, isGlob: true }
// ],
// slashes: [ 2, 6 ],
// parts: [ 'foo', '*.js' ]
// }
```
<br>
### Options Examples
#### options.expandRange
**Type**: `function`
**Default**: `undefined`
Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
**Example**
The following example shows how to create a glob that matches a folder
```js
const fill = require('fill-range');
const regex = pm.makeRe('foo/{01..25}/bar', {
expandRange(a, b) {
return `(${fill(a, b, { toRegex: true })})`;
}
});
console.log(regex);
//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
console.log(regex.test('foo/00/bar')) // false
console.log(regex.test('foo/01/bar')) // true
console.log(regex.test('foo/10/bar')) // true
console.log(regex.test('foo/22/bar')) // true
console.log(regex.test('foo/25/bar')) // true
console.log(regex.test('foo/26/bar')) // false
```
#### options.format
**Type**: `function`
**Default**: `undefined`
Custom function for formatting strings before they're matched.
**Example**
```js
// strip leading './' from strings
const format = str => str.replace(/^\.\//, '');
const isMatch = picomatch('foo/*.js', { format });
console.log(isMatch('./foo/bar.js')); //=> true
```
#### options.onMatch
```js
const onMatch = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onMatch });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
#### options.onIgnore
```js
const onIgnore = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
#### options.onResult
```js
const onResult = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onResult, ignore: 'f*' });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
<br>
<br>
## Globbing features
* [Basic globbing](#basic-globbing) (Wildcard matching)
* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
### Basic globbing
| **Character** | **Description** |
| --- | --- |
| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` with the `windows` option) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
#### Matching behavior vs. Bash
Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
<br>
### Advanced globbing
* [extglobs](#extglobs)
* [POSIX brackets](#posix-brackets)
* [Braces](#brace-expansion)
#### Extglobs
| **Pattern** | **Description** |
| --- | --- |
| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
| `!(pattern)` | Match _anything but_ `pattern` |
**Examples**
```js
const pm = require('picomatch');
// *(pattern) matches ZERO or more of "pattern"
console.log(pm.isMatch('a', 'a*(z)')); // true
console.log(pm.isMatch('az', 'a*(z)')); // true
console.log(pm.isMatch('azzz', 'a*(z)')); // true
// +(pattern) matches ONE or more of "pattern"
console.log(pm.isMatch('a', 'a+(z)')); // false
console.log(pm.isMatch('az', 'a+(z)')); // true
console.log(pm.isMatch('azzz', 'a+(z)')); // true
// supports multiple extglobs
console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
// supports nested extglobs
console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
```
#### POSIX brackets
POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
**Enable POSIX bracket support**
```js
console.log(pm.makeRe('[[:word:]]+', { posix: true }));
//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
```
**Supported POSIX classes**
The following named POSIX bracket expressions are supported:
* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
### Braces
Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
### Matching special characters as literals
If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
**Special Characters**
Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
To match any of the following characters as literals: `$^*+?()[]
Examples:
```js
console.log(pm.makeRe('foo/bar \\(1\\)'));
console.log(pm.makeRe('foo/bar \\(1\\)'));
```
<br>
<br>
## Library Comparisons
The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - |
| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - |
| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - |
| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - |
| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ |
| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
| File system operations | - | - | - | - | - | - | - |
<br>
<br>
## Benchmarks
Performance comparison of picomatch and minimatch.
_(Pay special attention to the last three benchmarks. Minimatch freezes on long ranges.)_
```
# .makeRe star (*)
picomatch x 4,449,159 ops/sec ±0.24% (97 runs sampled)
minimatch x 632,772 ops/sec ±0.14% (98 runs sampled)
# .makeRe star; dot=true (*)
picomatch x 3,500,079 ops/sec ±0.26% (99 runs sampled)
minimatch x 564,916 ops/sec ±0.23% (96 runs sampled)
# .makeRe globstar (**)
picomatch x 3,261,000 ops/sec ±0.27% (98 runs sampled)
minimatch x 1,664,766 ops/sec ±0.20% (100 runs sampled)
# .makeRe globstars (**/**/**)
picomatch x 3,284,469 ops/sec ±0.18% (97 runs sampled)
minimatch x 1,435,880 ops/sec ±0.34% (95 runs sampled)
# .makeRe with leading star (*.txt)
picomatch x 3,100,197 ops/sec ±0.35% (99 runs sampled)
minimatch x 428,347 ops/sec ±0.42% (94 runs sampled)
# .makeRe - basic braces ({a,b,c}*.txt)
picomatch x 443,578 ops/sec ±1.33% (89 runs sampled)
minimatch x 107,143 ops/sec ±0.35% (94 runs sampled)
# .makeRe - short ranges ({a..z}*.txt)
picomatch x 415,484 ops/sec ±0.76% (96 runs sampled)
minimatch x 14,299 ops/sec ±0.26% (96 runs sampled)
# .makeRe - medium ranges ({1..100000}*.txt)
picomatch x 395,020 ops/sec ±0.87% (89 runs sampled)
minimatch x 2 ops/sec ±4.59% (10 runs sampled)
# .makeRe - long ranges ({1..10000000}*.txt)
picomatch x 400,036 ops/sec ±0.83% (90 runs sampled)
minimatch (FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory)
```
<br>
<br>
## Philosophies
The goal of this library is to be blazing fast, without compromising on accuracy.
**Accuracy**
The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
**Performance**
Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
<br>
<br>
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](.github/contributing.md)node_modules\tinyglobby\node_modules\fdir\README.md (Line 1:1 - Line 91:76), node_modules\vite\node_modules\fdir\README.md (Line 1:1 - Line 91:76)
<p align="center">
<img src="https://github.com/thecodrr/fdir/raw/master/assets/fdir.gif" width="75%"/>
<h1 align="center">The Fastest Directory Crawler & Globber for NodeJS</h1>
<p align="center">
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/v/fdir?style=for-the-badge"/></a>
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/dw/fdir?style=for-the-badge"/></a>
<a href="https://codeclimate.com/github/thecodrr/fdir/maintainability"><img src="https://img.shields.io/codeclimate/maintainability-percentage/thecodrr/fdir?style=for-the-badge"/></a>
<a href="https://coveralls.io/github/thecodrr/fdir?branch=master"><img src="https://img.shields.io/coveralls/github/thecodrr/fdir?style=for-the-badge"/></a>
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/bundlephobia/minzip/fdir?style=for-the-badge"/></a>
<a href="https://www.producthunt.com/posts/fdir-every-millisecond-matters"><img src="https://img.shields.io/badge/ProductHunt-Upvote-red?style=for-the-badge&logo=product-hunt"/></a>
<a href="https://dev.to/thecodrr/how-i-wrote-the-fastest-directory-crawler-ever-3p9c"><img src="https://img.shields.io/badge/dev.to-Read%20Blog-black?style=for-the-badge&logo=dev.to"/></a>
<a href="./LICENSE"><img src="https://img.shields.io/github/license/thecodrr/fdir?style=for-the-badge"/></a>
</p>
</p>
⚡ **The Fastest:** Nothing similar (in the NodeJS world) beats `fdir` in speed. It can easily crawl a directory containing **1 million files in < 1 second.**
💡 **Stupidly Easy:** `fdir` uses expressive Builder pattern to build the crawler increasing code readability.
🤖 **Zero Dependencies\*:** `fdir` only uses NodeJS `fs` & `path` modules.
🕺 **Astonishingly Small:** < 2KB in size gzipped & minified.
🖮 **Hackable:** Extending `fdir` is extremely simple now that the new Builder API is here. Feel free to experiment around.
_\* `picomatch` must be installed manually by the user to support globbing._
## 🚄 Quickstart
### Installation
You can install using `npm`:
```sh
$ npm i fdir
```
or Yarn:
```sh
$ yarn add fdir
```
### Usage
```ts
import { fdir } from "fdir";
// create the builder
const api = new fdir().withFullPaths().crawl("path/to/dir");
// get all files in a directory synchronously
const files = api.sync();
// or asynchronously
api.withPromise().then((files) => {
// do something with the result here.
});
```
## Documentation:
Documentation for all methods is available [here](/documentation.md).
## 📊 Benchmarks:
Please check the benchmark against the latest version [here](/BENCHMARKS.md).
## 🙏Used by:
`fdir` is downloaded over 200k+ times a week by projects around the world. Here's a list of some notable projects using `fdir` in production:
> Note: if you think your project should be here, feel free to open an issue. Notable is anything with a considerable amount of GitHub stars.
1. [rollup/plugins](https://github.com/rollup/plugins)
2. [SuperchupuDev/tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
3. [pulumi/pulumi](https://github.com/pulumi/pulumi)
4. [dotenvx/dotenvx](https://github.com/dotenvx/dotenvx)
5. [mdn/yari](https://github.com/mdn/yari)
6. [streetwriters/notesnook](https://github.com/streetwriters/notesnook)
7. [imba/imba](https://github.com/imba/imba)
8. [moroshko/react-scanner](https://github.com/moroshko/react-scanner)
9. [netlify/build](https://github.com/netlify/build)
10. [yassinedoghri/astro-i18next](https://github.com/yassinedoghri/astro-i18next)
11. [selfrefactor/rambda](https://github.com/selfrefactor/rambda)
12. [whyboris/Video-Hub-App](https://github.com/whyboris/Video-Hub-App)
## 🦮 LICENSE
Copyright © 2024node_modules\sockjs-client\node_modules\debug\README.md (Line 422:2 - Line 431:4), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 120:2 - Line 129:4)
vg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restricnode_modules\sockjs-client\node_modules\debug\README.md (Line 431:2 - Line 437:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 129:2 - Line 135:10)
including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANnode_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 192:1 - Line 230:35), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 85:1 - Line 123:27)
ileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified
* pkgfile - path to package.json
* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
* pkg - package data
* pkgfile - path to package.json
* dir - directory that contains package.json
* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
* pkg - package data
* path - the path being resolved
* relativePath - the path relative from the package.json location
* returns - a relative path that will be joined from the package.json location
* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
* request - the import specifier being resolved
* start - lookup path
* getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
* request - the import specifier being resolved
* start - lookup path
* getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
default `opts` values:
```js
{
paths: []node_modules\eslint-plugin-jsx-a11y\docs\rules\no-noninteractive-element-interactions.md (Line 15:1 - Line 30:4), node_modules\eslint-plugin-jsx-a11y\docs\rules\no-static-element-interactions.md (Line 29:1 - Line 47:3)
nt (`<button>`, `<a href>`) or that has an interactive role. This leaves the _content_ or _container_ semantic value of this element intact.
Common interactive roles include:
1. `button`
1. `link`
1. `checkbox`
1. `menuitem`
1. `menuitemcheckbox`
1. `menuitemradio`
1. `option`
1. `radio`
1. `searchbox`
1. `switch`
1. `textbox`
Note: Adding a role to your element does **not** add behavior. When a semantic HTML element like `<button>` is used, then it will also respond to Enter key presses when it has focus. The developer node_modules\eslint-plugin-import\node_modules\debug\README.md (Line 2:1 - Line 437:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 2:1 - Line 135:10)
debug
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
[](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
A tiny JavaScript debugging utility modelled after Node.js core's debugging
technique. Works in Node.js and web browsers.
## Installation
```bash
$ npm install debug
```
## Usage
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
, http = require('http')
, name = 'My App';
// fake app
debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
res.end('hello\n');
}).listen(3000, function(){
debug('listening');
});
// fake worker of some kind
require('./worker');
```
Example [_worker.js_](./examples/node/worker.js):
```js
var a = require('debug')('worker:a')
, b = require('debug')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();
```
The `DEBUG` environment variable is then used to enable these based on space or
comma-delimited names.
Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows command prompt notes
##### CMD
On Windows the environment variable is set using the `set` command.
```cmd
set DEBUG=*,-not_this
```
Example:
```cmd
set DEBUG=* & node app.js
```
##### PowerShell (VS Code default)
PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
$env:DEBUG='app';node app.js
```
Then, run the program to be debugged as usual.
npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```
## Namespace Colors
Every debug instance has a color generated for it based on its namespace name.
This helps when visually parsing the debug output to identify which debug instance
a debug line belongs to.
#### Node.js
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
otherwise debug will only use a small handful of basic colors.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### Web Browser
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## Millisecond diff
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
## Conventions
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
The `*` character may be used as a wildcard. Suppose for example your library has
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
You can also exclude specific debuggers by prefixing them with a "-" character.
For example, `DEBUG=*,-connect:*` would include all debuggers except those
starting with "connect:".
## Environment Variables
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
## Formatters
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
| `%O` | Pretty-print an Object on multiple lines. |
| `%o` | Pretty-print an Object all on a single line. |
| `%s` | String. |
| `%d` | Number (both integer and float). |
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
### Custom formatters
You can add custom formatters by extending the `debug.formatters` object.
For example, if you wanted to add support for rendering a Buffer as hex with
`%h`, you could do something like:
```js
const createDebug = require('debug')
createDebug.formatters.h = (v) => {
return v.toString('hex')
}
// …elsewhere
const debug = createDebug('foo')
debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
## Browser Support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
```
And then refresh the page.
```js
a = debug('worker:a');
b = debug('worker:b');
setInterval(function(){
a('doing some work');
}, 1000);
setInterval(function(){
b('doing some work');
}, 1200);
```
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
var error = debug('app:error');
// by default stderr is used
error('goes to stderr!');
var log = debug('app:log');
// set this namespace to log via console.log
log.log = console.log.bind(console); // don't forget to bind to console!
log('goes to stdout');
error('still goes to stderr!');
// set all output to go via console.info
// overrides all per-namespace log settings
debug.log = console.info.bind(console);
error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
## Extend
You can simply extend debugger
```js
const log = require('debug')('auth');
//creates new debug instance with extended namespace
const logSign = log.extend('sign');
const logLogin = log.extend('login');
log('hello'); // auth hello
logSign('hello'); //auth:sign hello
logLogin('hello'); //auth:login hello
```
## Set dynamically
You can also enable debug dynamically by calling the `enable()` method :
```js
let debug = require('debug');
console.log(1, debug.enabled('test'));
debug.enable('test');
console.log(2, debug.enabled('test'));
debug.disable();
console.log(3, debug.enabled('test'));
```
print :
```
1 false
2 true
3 false
```
Usage :
`enable(namespaces)`
`namespaces` can include modes separated by a colon and wildcards.
Note that calling `enable()` completely overrides previously set DEBUG variable :
```
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
=> false
```
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
enabled by checking the `enabled` property:
```javascript
const debug = require('debug')('http');
if (debug.enabled) {
// do stuff...
}
```
You can also manually toggle this property to force the debug instance to be
enabled or disabled.
## Authors
- TJ Holowaychuk
- Nathan Rajlich
- Andrew Rhyne
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANnode_modules\eslint-plugin-import\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8), node_modules\sockjs-client\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8)
0 / 2017-09-26
==================
* Add `DEBUG_HIDE_DATE` env var (#486)
* Remove ReDoS regexp in %o formatter (#504)
* Remove "component" from package.json
* Remove `component.json`
* Ignore package-lock.json
* Examples: fix colors printout
* Fix: browser detection
* Fix: spelling mistake (#496, @EdwardBetts)
3.0.1 / 2017-08-24
==================
* Fix: Disable colors in Edge and Internet Explorer (#489)
3.0.0 / 2017-08-08
==================
* Breaking: Remove DEBUG_FD (#406)
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* Addition: document `enabled` flag (#465)
* Addition: add 256 colors mode (#481)
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
* Update: component: update "ms" to v2.0.0
* Update: separate the Node and Browser tests in Travis-CI
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
* Update: separate Node.js and web browser examples for organization
* Update: update "browserify" to v14.4.0
* Fix: fix Readme typo (#473)
2.6.9 / 2017-09-22
==================
* remove ReDoS regexp in %o formatter (#504)
2.6.8 / 2017-05-18
==================
* Fix: Check for undefined on browser globals (#462, @marbemac)
2.6.7 / 2017-05-16
==================
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
* Fix: Inline extend function in node implementation (#452, @dougwilson)
* Docs: Fix typo (#455, @msasad)
2.6.5 / 2017-04-27
==================
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
* Misc: clean up browser reference checks (#447, @thebigredgeek)
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
2.6.4 / 2017-04-20
==================
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
2.6.3 / 2017-03-13
==================
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
* Docs: Changelog fix (@thebigredgeek)
2.6.2 / 2017-03-10
==================
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
* Docs: Add Slackin invite badge (@tootallnate)
2.6.1 / 2017-02-10
==================
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
* Fix: Namespaces would not disable once enabled (#409, @musikov)
2.6.0 / 2016-12-28
==================
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
2.5.2 / 2016-12-25
==================
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
* Docs: fixed README typo (#391, @lurch)
* Docs: added notice about v3 api discussion (@thebigredgeek)
2.5.1 / 2016-12-20
==================
* Fix: babel-core compatibility
2.5.0 / 2016-12-20
==================
* Fix: wrong reference in bower file (@thebigredgeek)
* Fix: webworker compatibility (@thebigredgeek)
* Fix: output formatting issue (#388, @kribblo)
* Fix: babel-loader compatibility (#383, @escwald)
* Misc: removed built asset from repo and publications (@thebigredgeek)
* Misc: moved source files to /src (#378, @yamikuronue)
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
* Test: coveralls integration (#378, @yamikuronue)
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
2.4.5 / 2016-12-17
==================
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
* Fix: custom log function (#379, @hsiliev)
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
2.4.4 / 2016-12-14
==================
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
2.4.3 / 2016-12-14
==================
* Fix: navigation.userAgent error for react native (#364, @escwald)
2.4.2 / 2016-12-14
==================
* Fix: browser colors (#367, @tootallnate)
* Misc: travis ci integration (@thebigredgeek)
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
2.4.1 / 2016-12-13
==================
* Fix: typo that broke the package (#356)
2.4.0 / 2016-12-13
==================
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
* Fix: revert "handle regex special characters" (@tootallnate)
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
* Improvement: allow colors in workers (#335, @botverse)
* Improvement: use same color for same namespace. (#338, @lchenay)
2.3.3 / 2016-11-09
==================
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
2.3.2 / 2016-11-09
==================
* Fix: be super-safe in index.js as well (@TooTallNate)
* Fix: should check whether process exists (Tom Newby)
2.3.1 / 2016-11-09
==================
* Fix: Added electron compatibility (#324, @paulcbetts)
* Improvement: Added performance optimizations (@tootallnate)
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
2.3.0 / 2016-11-07
==================
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
* Readme: fix USE_COLORS to DEBUG_COLORS
* Readme: Doc fixes for format string sugar (#269, @mlucool)
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
* Readme: better docs for browser support (#224, @matthewmueller)
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
* Misc: Updated contributors (@thebigredgeek)
2.2.0 / 2015-05-09
==================
* package: update "ms" to v0.7.1 (#202, @dougwilson)
* README: add logging to file example (#193, @DanielOchoa)
* README: fixed a typo (#191, @amir-s)
* browser: expose `storage` (#190, @stephenmathieson)
* Makefile: add a `distclean` target (#189, @stephenmathieson)
2.1.3 / 2015-03-13
==================
* Updated stdout/stderr example (#186)
* Updated example/stdout.js to match debug current behaviour
* Renamed example/stderr.js to stdout.js
* Update Readme.md (#184)
* replace high intensity foreground color for bold (#182, #183)
2.1.2 / 2015-03-01
==================
* dist: recompile
* update "ms" to v0.7.0
* package: update "browserify" to v9.0.3
* component: fix "ms.js" repo location
* changed bower package name
* updated documentation about using debug in a browser
* fix: security error on safari (#167, #168, @yields)
2.1.1 / 2014-12-29
==================
* browser: use `typeof` to check for `console` existence
* browser: check for `console.log` truthiness (fix IE 8/9)
* browser: add support for Chrome apps
* Readme: added Windows usage remarks
* Add `bower.json` to properly support bower install
2.1.0 / 2014-10-15
==================
* node: implement `DEBUG_FD` env variable support
* package: update "browserify" to v6.1.0
* package: add "license" field to package.json (#135, @panuhorsmalahti)
2.0.0 / 2014-09-01
==================
* package: update "browserify" to v5.11.0
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
1.0.4 / 2014-07-15
==================
* dist: recompile
* example: remove `console.info()` log usage
* example: add "Content-Type" UTF-8 header to browser example
* browser: place %c marker after the space character
* browser: reset the "content" color via `color: inherit`
* browser: add colors support for Firefox >= v31
* debug: prefer an instance `log()` function over the global one (#119)
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
1.0.3 / 2014-07-09
==================
* Add support for multiple wildcards in namespaces (#122, @seegno)
* browser: fix lint
1.0.2 / 2014-06-10
==================
* browser: update color palette (#113, @gscottolson)
* common: make console logging function configurable (#108, @timoxley)
* node: fix %o colors on old node <= 0.8.x
* Makefile: find node path using shell/which (#109, @timoxley)
1.0.1 / 2014-06-06
==================
* browser: use `removeItem()` to clear localStorage
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
* package: add "contributors" section
* node: fix comment typo
* README: list authors
1.0.0 / 2014-06-04
==================
* make ms diff be global, not be scope
* debug: ignore empty strings in enable()
* node: make DEBUG_COLORS able to disable coloring
* *: export the `colors` array
* npmignore: don't publish the `dist` dir
* Makefile: refactor to use browserify
* package: add "browserify" as a dev dependency
* Readme: add Web Inspector Colors section
* node: reset terminal color for the debug content
* node: map "%o" to `util.inspect()`
* browser: map "%j" to `JSON.stringify()`
* debug: add custom "formatters"
* debug: use "ms" module for humanizing the diff
* Readme: add "bash" syntax highlighting
* browser: add Firebug color support
* browser: add colors for WebKit browsers
* node: apply log to `console`
* rewrite: abstract common logic for Node & browsers
* add .jshintrc file
0.8.1 / 2014-04-14
==================
* package: re-add the "component" section
0.8.0 / 2014-03-30
==================
* add `enable()` method for nodejs.node_modules\eslint-plugin-import\docs\rules\no-internal-modules.md (Line 78:1 - Line 104:60), node_modules\eslint-plugin-import\docs\rules\no-internal-modules.md (Line 16:1 - Line 42:59)
ort/register';
export { settings } from '../app';
```
Given the following folder structure:
```pt
my-project
├── actions
│ └── getUser.js
│ └── updateUser.js
├── reducer
│ └── index.js
│ └── user.js
├── redux
│ └── index.js
│ └── configureStore.js
└── app
│ └── index.js
│ └── settings.js
└── entry.js
```
And the .eslintrc file:
```json
{
...
"rules": {
"import/no-internal-modules": [ "error", {
node_modules\eslint-plugin-import\docs\rules\no-default-export.md (Line 37:1 - Line 57:15), node_modules\eslint-plugin-import\docs\rules\prefer-default-export.md (Line 62:1 - Line 82:9)
named export.
export const foo = 'foo';
```
```javascript
// good2.js
// There is more than one named export in the module.
export const foo = 'foo';
export const bar = 'bar';
```
```javascript
// good3.js
// There is more than one named export in the module
const foo = 'foo';
const bar = 'bar';
export { foo, bnode_modules\eslint-module-utils\node_modules\debug\README.md (Line 2:1 - Line 437:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 2:1 - Line 135:10)
debug
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
[](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
A tiny JavaScript debugging utility modelled after Node.js core's debugging
technique. Works in Node.js and web browsers.
## Installation
```bash
$ npm install debug
```
## Usage
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
, http = require('http')
, name = 'My App';
// fake app
debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
res.end('hello\n');
}).listen(3000, function(){
debug('listening');
});
// fake worker of some kind
require('./worker');
```
Example [_worker.js_](./examples/node/worker.js):
```js
var a = require('debug')('worker:a')
, b = require('debug')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();
```
The `DEBUG` environment variable is then used to enable these based on space or
comma-delimited names.
Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows command prompt notes
##### CMD
On Windows the environment variable is set using the `set` command.
```cmd
set DEBUG=*,-not_this
```
Example:
```cmd
set DEBUG=* & node app.js
```
##### PowerShell (VS Code default)
PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
$env:DEBUG='app';node app.js
```
Then, run the program to be debugged as usual.
npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```
## Namespace Colors
Every debug instance has a color generated for it based on its namespace name.
This helps when visually parsing the debug output to identify which debug instance
a debug line belongs to.
#### Node.js
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
otherwise debug will only use a small handful of basic colors.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### Web Browser
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## Millisecond diff
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
## Conventions
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
The `*` character may be used as a wildcard. Suppose for example your library has
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
You can also exclude specific debuggers by prefixing them with a "-" character.
For example, `DEBUG=*,-connect:*` would include all debuggers except those
starting with "connect:".
## Environment Variables
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
## Formatters
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
| `%O` | Pretty-print an Object on multiple lines. |
| `%o` | Pretty-print an Object all on a single line. |
| `%s` | String. |
| `%d` | Number (both integer and float). |
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
### Custom formatters
You can add custom formatters by extending the `debug.formatters` object.
For example, if you wanted to add support for rendering a Buffer as hex with
`%h`, you could do something like:
```js
const createDebug = require('debug')
createDebug.formatters.h = (v) => {
return v.toString('hex')
}
// …elsewhere
const debug = createDebug('foo')
debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
## Browser Support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
```
And then refresh the page.
```js
a = debug('worker:a');
b = debug('worker:b');
setInterval(function(){
a('doing some work');
}, 1000);
setInterval(function(){
b('doing some work');
}, 1200);
```
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
var error = debug('app:error');
// by default stderr is used
error('goes to stderr!');
var log = debug('app:log');
// set this namespace to log via console.log
log.log = console.log.bind(console); // don't forget to bind to console!
log('goes to stdout');
error('still goes to stderr!');
// set all output to go via console.info
// overrides all per-namespace log settings
debug.log = console.info.bind(console);
error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
## Extend
You can simply extend debugger
```js
const log = require('debug')('auth');
//creates new debug instance with extended namespace
const logSign = log.extend('sign');
const logLogin = log.extend('login');
log('hello'); // auth hello
logSign('hello'); //auth:sign hello
logLogin('hello'); //auth:login hello
```
## Set dynamically
You can also enable debug dynamically by calling the `enable()` method :
```js
let debug = require('debug');
console.log(1, debug.enabled('test'));
debug.enable('test');
console.log(2, debug.enabled('test'));
debug.disable();
console.log(3, debug.enabled('test'));
```
print :
```
1 false
2 true
3 false
```
Usage :
`enable(namespaces)`
`namespaces` can include modes separated by a colon and wildcards.
Note that calling `enable()` completely overrides previously set DEBUG variable :
```
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
=> false
```
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
enabled by checking the `enabled` property:
```javascript
const debug = require('debug')('http');
if (debug.enabled) {
// do stuff...
}
```
You can also manually toggle this property to force the debug instance to be
enabled or disabled.
## Authors
- TJ Holowaychuk
- Nathan Rajlich
- Andrew Rhyne
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANnode_modules\eslint-module-utils\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8), node_modules\sockjs-client\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8)
0 / 2017-09-26
==================
* Add `DEBUG_HIDE_DATE` env var (#486)
* Remove ReDoS regexp in %o formatter (#504)
* Remove "component" from package.json
* Remove `component.json`
* Ignore package-lock.json
* Examples: fix colors printout
* Fix: browser detection
* Fix: spelling mistake (#496, @EdwardBetts)
3.0.1 / 2017-08-24
==================
* Fix: Disable colors in Edge and Internet Explorer (#489)
3.0.0 / 2017-08-08
==================
* Breaking: Remove DEBUG_FD (#406)
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* Addition: document `enabled` flag (#465)
* Addition: add 256 colors mode (#481)
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
* Update: component: update "ms" to v2.0.0
* Update: separate the Node and Browser tests in Travis-CI
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
* Update: separate Node.js and web browser examples for organization
* Update: update "browserify" to v14.4.0
* Fix: fix Readme typo (#473)
2.6.9 / 2017-09-22
==================
* remove ReDoS regexp in %o formatter (#504)
2.6.8 / 2017-05-18
==================
* Fix: Check for undefined on browser globals (#462, @marbemac)
2.6.7 / 2017-05-16
==================
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
* Fix: Inline extend function in node implementation (#452, @dougwilson)
* Docs: Fix typo (#455, @msasad)
2.6.5 / 2017-04-27
==================
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
* Misc: clean up browser reference checks (#447, @thebigredgeek)
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
2.6.4 / 2017-04-20
==================
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
2.6.3 / 2017-03-13
==================
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
* Docs: Changelog fix (@thebigredgeek)
2.6.2 / 2017-03-10
==================
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
* Docs: Add Slackin invite badge (@tootallnate)
2.6.1 / 2017-02-10
==================
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
* Fix: Namespaces would not disable once enabled (#409, @musikov)
2.6.0 / 2016-12-28
==================
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
2.5.2 / 2016-12-25
==================
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
* Docs: fixed README typo (#391, @lurch)
* Docs: added notice about v3 api discussion (@thebigredgeek)
2.5.1 / 2016-12-20
==================
* Fix: babel-core compatibility
2.5.0 / 2016-12-20
==================
* Fix: wrong reference in bower file (@thebigredgeek)
* Fix: webworker compatibility (@thebigredgeek)
* Fix: output formatting issue (#388, @kribblo)
* Fix: babel-loader compatibility (#383, @escwald)
* Misc: removed built asset from repo and publications (@thebigredgeek)
* Misc: moved source files to /src (#378, @yamikuronue)
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
* Test: coveralls integration (#378, @yamikuronue)
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
2.4.5 / 2016-12-17
==================
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
* Fix: custom log function (#379, @hsiliev)
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
2.4.4 / 2016-12-14
==================
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
2.4.3 / 2016-12-14
==================
* Fix: navigation.userAgent error for react native (#364, @escwald)
2.4.2 / 2016-12-14
==================
* Fix: browser colors (#367, @tootallnate)
* Misc: travis ci integration (@thebigredgeek)
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
2.4.1 / 2016-12-13
==================
* Fix: typo that broke the package (#356)
2.4.0 / 2016-12-13
==================
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
* Fix: revert "handle regex special characters" (@tootallnate)
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
* Improvement: allow colors in workers (#335, @botverse)
* Improvement: use same color for same namespace. (#338, @lchenay)
2.3.3 / 2016-11-09
==================
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
2.3.2 / 2016-11-09
==================
* Fix: be super-safe in index.js as well (@TooTallNate)
* Fix: should check whether process exists (Tom Newby)
2.3.1 / 2016-11-09
==================
* Fix: Added electron compatibility (#324, @paulcbetts)
* Improvement: Added performance optimizations (@tootallnate)
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
2.3.0 / 2016-11-07
==================
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
* Readme: fix USE_COLORS to DEBUG_COLORS
* Readme: Doc fixes for format string sugar (#269, @mlucool)
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
* Readme: better docs for browser support (#224, @matthewmueller)
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
* Misc: Updated contributors (@thebigredgeek)
2.2.0 / 2015-05-09
==================
* package: update "ms" to v0.7.1 (#202, @dougwilson)
* README: add logging to file example (#193, @DanielOchoa)
* README: fixed a typo (#191, @amir-s)
* browser: expose `storage` (#190, @stephenmathieson)
* Makefile: add a `distclean` target (#189, @stephenmathieson)
2.1.3 / 2015-03-13
==================
* Updated stdout/stderr example (#186)
* Updated example/stdout.js to match debug current behaviour
* Renamed example/stderr.js to stdout.js
* Update Readme.md (#184)
* replace high intensity foreground color for bold (#182, #183)
2.1.2 / 2015-03-01
==================
* dist: recompile
* update "ms" to v0.7.0
* package: update "browserify" to v9.0.3
* component: fix "ms.js" repo location
* changed bower package name
* updated documentation about using debug in a browser
* fix: security error on safari (#167, #168, @yields)
2.1.1 / 2014-12-29
==================
* browser: use `typeof` to check for `console` existence
* browser: check for `console.log` truthiness (fix IE 8/9)
* browser: add support for Chrome apps
* Readme: added Windows usage remarks
* Add `bower.json` to properly support bower install
2.1.0 / 2014-10-15
==================
* node: implement `DEBUG_FD` env variable support
* package: update "browserify" to v6.1.0
* package: add "license" field to package.json (#135, @panuhorsmalahti)
2.0.0 / 2014-09-01
==================
* package: update "browserify" to v5.11.0
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
1.0.4 / 2014-07-15
==================
* dist: recompile
* example: remove `console.info()` log usage
* example: add "Content-Type" UTF-8 header to browser example
* browser: place %c marker after the space character
* browser: reset the "content" color via `color: inherit`
* browser: add colors support for Firefox >= v31
* debug: prefer an instance `log()` function over the global one (#119)
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
1.0.3 / 2014-07-09
==================
* Add support for multiple wildcards in namespaces (#122, @seegno)
* browser: fix lint
1.0.2 / 2014-06-10
==================
* browser: update color palette (#113, @gscottolson)
* common: make console logging function configurable (#108, @timoxley)
* node: fix %o colors on old node <= 0.8.x
* Makefile: find node path using shell/which (#109, @timoxley)
1.0.1 / 2014-06-06
==================
* browser: use `removeItem()` to clear localStorage
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
* package: add "contributors" section
* node: fix comment typo
* README: list authors
1.0.0 / 2014-06-04
==================
* make ms diff be global, not be scope
* debug: ignore empty strings in enable()
* node: make DEBUG_COLORS able to disable coloring
* *: export the `colors` array
* npmignore: don't publish the `dist` dir
* Makefile: refactor to use browserify
* package: add "browserify" as a dev dependency
* Readme: add Web Inspector Colors section
* node: reset terminal color for the debug content
* node: map "%o" to `util.inspect()`
* browser: map "%j" to `JSON.stringify()`
* debug: add custom "formatters"
* debug: use "ms" module for humanizing the diff
* Readme: add "bash" syntax highlighting
* browser: add Firebug color support
* browser: add colors for WebKit browsers
* node: apply log to `console`
* rewrite: abstract common logic for Node & browsers
* add .jshintrc file
0.8.1 / 2014-04-14
==================
* package: re-add the "component" section
0.8.0 / 2014-03-30
==================
* add `enable()` method for nodejs.node_modules\eslint-import-resolver-node\node_modules\debug\README.md (Line 2:1 - Line 437:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 2:1 - Line 135:10)
debug
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
[](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
A tiny JavaScript debugging utility modelled after Node.js core's debugging
technique. Works in Node.js and web browsers.
## Installation
```bash
$ npm install debug
```
## Usage
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
, http = require('http')
, name = 'My App';
// fake app
debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
res.end('hello\n');
}).listen(3000, function(){
debug('listening');
});
// fake worker of some kind
require('./worker');
```
Example [_worker.js_](./examples/node/worker.js):
```js
var a = require('debug')('worker:a')
, b = require('debug')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();
```
The `DEBUG` environment variable is then used to enable these based on space or
comma-delimited names.
Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows command prompt notes
##### CMD
On Windows the environment variable is set using the `set` command.
```cmd
set DEBUG=*,-not_this
```
Example:
```cmd
set DEBUG=* & node app.js
```
##### PowerShell (VS Code default)
PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
$env:DEBUG='app';node app.js
```
Then, run the program to be debugged as usual.
npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```
## Namespace Colors
Every debug instance has a color generated for it based on its namespace name.
This helps when visually parsing the debug output to identify which debug instance
a debug line belongs to.
#### Node.js
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
otherwise debug will only use a small handful of basic colors.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### Web Browser
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## Millisecond diff
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
## Conventions
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
The `*` character may be used as a wildcard. Suppose for example your library has
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
You can also exclude specific debuggers by prefixing them with a "-" character.
For example, `DEBUG=*,-connect:*` would include all debuggers except those
starting with "connect:".
## Environment Variables
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
## Formatters
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
| `%O` | Pretty-print an Object on multiple lines. |
| `%o` | Pretty-print an Object all on a single line. |
| `%s` | String. |
| `%d` | Number (both integer and float). |
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
### Custom formatters
You can add custom formatters by extending the `debug.formatters` object.
For example, if you wanted to add support for rendering a Buffer as hex with
`%h`, you could do something like:
```js
const createDebug = require('debug')
createDebug.formatters.h = (v) => {
return v.toString('hex')
}
// …elsewhere
const debug = createDebug('foo')
debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
## Browser Support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
```
And then refresh the page.
```js
a = debug('worker:a');
b = debug('worker:b');
setInterval(function(){
a('doing some work');
}, 1000);
setInterval(function(){
b('doing some work');
}, 1200);
```
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
var error = debug('app:error');
// by default stderr is used
error('goes to stderr!');
var log = debug('app:log');
// set this namespace to log via console.log
log.log = console.log.bind(console); // don't forget to bind to console!
log('goes to stdout');
error('still goes to stderr!');
// set all output to go via console.info
// overrides all per-namespace log settings
debug.log = console.info.bind(console);
error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
## Extend
You can simply extend debugger
```js
const log = require('debug')('auth');
//creates new debug instance with extended namespace
const logSign = log.extend('sign');
const logLogin = log.extend('login');
log('hello'); // auth hello
logSign('hello'); //auth:sign hello
logLogin('hello'); //auth:login hello
```
## Set dynamically
You can also enable debug dynamically by calling the `enable()` method :
```js
let debug = require('debug');
console.log(1, debug.enabled('test'));
debug.enable('test');
console.log(2, debug.enabled('test'));
debug.disable();
console.log(3, debug.enabled('test'));
```
print :
```
1 false
2 true
3 false
```
Usage :
`enable(namespaces)`
`namespaces` can include modes separated by a colon and wildcards.
Note that calling `enable()` completely overrides previously set DEBUG variable :
```
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
=> false
```
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
enabled by checking the `enabled` property:
```javascript
const debug = require('debug')('http');
if (debug.enabled) {
// do stuff...
}
```
You can also manually toggle this property to force the debug instance to be
enabled or disabled.
## Authors
- TJ Holowaychuk
- Nathan Rajlich
- Andrew Rhyne
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANnode_modules\eslint-import-resolver-node\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8), node_modules\sockjs-client\node_modules\debug\CHANGELOG.md (Line 4:3 - Line 345:8)
0 / 2017-09-26
==================
* Add `DEBUG_HIDE_DATE` env var (#486)
* Remove ReDoS regexp in %o formatter (#504)
* Remove "component" from package.json
* Remove `component.json`
* Ignore package-lock.json
* Examples: fix colors printout
* Fix: browser detection
* Fix: spelling mistake (#496, @EdwardBetts)
3.0.1 / 2017-08-24
==================
* Fix: Disable colors in Edge and Internet Explorer (#489)
3.0.0 / 2017-08-08
==================
* Breaking: Remove DEBUG_FD (#406)
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* Addition: document `enabled` flag (#465)
* Addition: add 256 colors mode (#481)
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
* Update: component: update "ms" to v2.0.0
* Update: separate the Node and Browser tests in Travis-CI
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
* Update: separate Node.js and web browser examples for organization
* Update: update "browserify" to v14.4.0
* Fix: fix Readme typo (#473)
2.6.9 / 2017-09-22
==================
* remove ReDoS regexp in %o formatter (#504)
2.6.8 / 2017-05-18
==================
* Fix: Check for undefined on browser globals (#462, @marbemac)
2.6.7 / 2017-05-16
==================
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
* Fix: Inline extend function in node implementation (#452, @dougwilson)
* Docs: Fix typo (#455, @msasad)
2.6.5 / 2017-04-27
==================
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
* Misc: clean up browser reference checks (#447, @thebigredgeek)
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
2.6.4 / 2017-04-20
==================
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
2.6.3 / 2017-03-13
==================
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
* Docs: Changelog fix (@thebigredgeek)
2.6.2 / 2017-03-10
==================
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
* Docs: Add Slackin invite badge (@tootallnate)
2.6.1 / 2017-02-10
==================
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
* Fix: Namespaces would not disable once enabled (#409, @musikov)
2.6.0 / 2016-12-28
==================
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
2.5.2 / 2016-12-25
==================
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
* Docs: fixed README typo (#391, @lurch)
* Docs: added notice about v3 api discussion (@thebigredgeek)
2.5.1 / 2016-12-20
==================
* Fix: babel-core compatibility
2.5.0 / 2016-12-20
==================
* Fix: wrong reference in bower file (@thebigredgeek)
* Fix: webworker compatibility (@thebigredgeek)
* Fix: output formatting issue (#388, @kribblo)
* Fix: babel-loader compatibility (#383, @escwald)
* Misc: removed built asset from repo and publications (@thebigredgeek)
* Misc: moved source files to /src (#378, @yamikuronue)
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
* Test: coveralls integration (#378, @yamikuronue)
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
2.4.5 / 2016-12-17
==================
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
* Fix: custom log function (#379, @hsiliev)
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
2.4.4 / 2016-12-14
==================
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
2.4.3 / 2016-12-14
==================
* Fix: navigation.userAgent error for react native (#364, @escwald)
2.4.2 / 2016-12-14
==================
* Fix: browser colors (#367, @tootallnate)
* Misc: travis ci integration (@thebigredgeek)
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
2.4.1 / 2016-12-13
==================
* Fix: typo that broke the package (#356)
2.4.0 / 2016-12-13
==================
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
* Fix: revert "handle regex special characters" (@tootallnate)
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
* Improvement: allow colors in workers (#335, @botverse)
* Improvement: use same color for same namespace. (#338, @lchenay)
2.3.3 / 2016-11-09
==================
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
2.3.2 / 2016-11-09
==================
* Fix: be super-safe in index.js as well (@TooTallNate)
* Fix: should check whether process exists (Tom Newby)
2.3.1 / 2016-11-09
==================
* Fix: Added electron compatibility (#324, @paulcbetts)
* Improvement: Added performance optimizations (@tootallnate)
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
2.3.0 / 2016-11-07
==================
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
* Readme: fix USE_COLORS to DEBUG_COLORS
* Readme: Doc fixes for format string sugar (#269, @mlucool)
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
* Readme: better docs for browser support (#224, @matthewmueller)
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
* Misc: Updated contributors (@thebigredgeek)
2.2.0 / 2015-05-09
==================
* package: update "ms" to v0.7.1 (#202, @dougwilson)
* README: add logging to file example (#193, @DanielOchoa)
* README: fixed a typo (#191, @amir-s)
* browser: expose `storage` (#190, @stephenmathieson)
* Makefile: add a `distclean` target (#189, @stephenmathieson)
2.1.3 / 2015-03-13
==================
* Updated stdout/stderr example (#186)
* Updated example/stdout.js to match debug current behaviour
* Renamed example/stderr.js to stdout.js
* Update Readme.md (#184)
* replace high intensity foreground color for bold (#182, #183)
2.1.2 / 2015-03-01
==================
* dist: recompile
* update "ms" to v0.7.0
* package: update "browserify" to v9.0.3
* component: fix "ms.js" repo location
* changed bower package name
* updated documentation about using debug in a browser
* fix: security error on safari (#167, #168, @yields)
2.1.1 / 2014-12-29
==================
* browser: use `typeof` to check for `console` existence
* browser: check for `console.log` truthiness (fix IE 8/9)
* browser: add support for Chrome apps
* Readme: added Windows usage remarks
* Add `bower.json` to properly support bower install
2.1.0 / 2014-10-15
==================
* node: implement `DEBUG_FD` env variable support
* package: update "browserify" to v6.1.0
* package: add "license" field to package.json (#135, @panuhorsmalahti)
2.0.0 / 2014-09-01
==================
* package: update "browserify" to v5.11.0
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
1.0.4 / 2014-07-15
==================
* dist: recompile
* example: remove `console.info()` log usage
* example: add "Content-Type" UTF-8 header to browser example
* browser: place %c marker after the space character
* browser: reset the "content" color via `color: inherit`
* browser: add colors support for Firefox >= v31
* debug: prefer an instance `log()` function over the global one (#119)
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
1.0.3 / 2014-07-09
==================
* Add support for multiple wildcards in namespaces (#122, @seegno)
* browser: fix lint
1.0.2 / 2014-06-10
==================
* browser: update color palette (#113, @gscottolson)
* common: make console logging function configurable (#108, @timoxley)
* node: fix %o colors on old node <= 0.8.x
* Makefile: find node path using shell/which (#109, @timoxley)
1.0.1 / 2014-06-06
==================
* browser: use `removeItem()` to clear localStorage
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
* package: add "contributors" section
* node: fix comment typo
* README: list authors
1.0.0 / 2014-06-04
==================
* make ms diff be global, not be scope
* debug: ignore empty strings in enable()
* node: make DEBUG_COLORS able to disable coloring
* *: export the `colors` array
* npmignore: don't publish the `dist` dir
* Makefile: refactor to use browserify
* package: add "browserify" as a dev dependency
* Readme: add Web Inspector Colors section
* node: reset terminal color for the debug content
* node: map "%o" to `util.inspect()`
* browser: map "%j" to `JSON.stringify()`
* debug: add custom "formatters"
* debug: use "ms" module for humanizing the diff
* Readme: add "bash" syntax highlighting
* browser: add Firebug color support
* browser: add colors for WebKit browsers
* node: apply log to `console`
* rewrite: abstract common logic for Node & browsers
* add .jshintrc file
0.8.1 / 2014-04-14
==================
* package: re-add the "component" section
0.8.0 / 2014-03-30
==================
* add `enable()` method for nodejs.node_modules\@nodelib\fs.stat\README.md (Line 46:1 - Line 70:18), node_modules\@nodelib\fs.walk\README.md (Line 58:1 - Line 82:18)
ed path.
```ts
const stats = fsStat.stat('path');
const stats = fsStat.stat('path', {});
const stats = fsStat.stat('path', new fsStat.Settings());
```
#### path
* Required: `true`
* Type: `string | Buffer | URL`
A path to a file. If a URL is provided, it must use the `file:` protocol.
#### optionsOrSettings
* Required: `false`
* Type: `Options | Settings`
* Default: An instance of `Settings` class
An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If yonode_modules\@nodelib\fs.scandir\README.md (Line 116:2 - Line 127:2), node_modules\@nodelib\fs.walk\README.md (Line 178:2 - Line 189:20)
licLinks
* Type: `boolean`
* Default: `false`
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
### `throwErrorOnBrokenSymbolicLink`
* Type: `boolean`
* Default: `true`
Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
### `pathSegmentnode_modules\@humanwhocodes\retry\README.md (Line 3:1 - Line 108:8), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\README.md (Line 3:1 - Line 106:5)
Retry utility
by [Nicholas C. Zakas](https://humanwhocodes.com)
If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star.
## Description
A utility for retrying failed async JavaScript calls based on the error returned.
## Usage
### Node.js
Install using [npm][npm] or [yarn][yarn]:
```
npm install @humanwhocodes/retry
# or
yarn add @humanwhocodes/retry
```
Import into your Node.js project:
```js
// CommonJS
const { Retrier } = require("@humanwhocodes/retry");
// ESM
import { Retrier } from "@humanwhocodes/retry";
```
### Deno
Install using [JSR](https://jsr.io):
```shell
deno add @humanwhocodes/retry
#or
jsr add @humanwhocodes/retry
```
Then import into your Deno project:
```js
import { Retrier } from "@humanwhocodes/retry";
```
### Bun
Install using this command:
```
bun add @humanwhocodes/retry
```
Import into your Bun project:
```js
import { Retrier } from "@humanwhocodes/retry";
```
### Browser
It's recommended to import the minified version to save bandwidth:
```js
import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry?min";
```
However, you can also import the unminified version for debugging purposes:
```js
import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry";
```
## API
After importing, create a new instance of `Retrier` and specify the function to run on the error. This function should return `true` if you want the call retried and `false` if not.
```js
// this instance will retry if the specific error code is found
const retrier = new Retrier(error => {
return error.code === "ENFILE" || error.code === "EMFILE";
});
```
Then, call the `retry()` method around the function you'd like to retry, such as:
```js
import fs from "fs/promises";
const retrier = new Retrier(error => {
return error.code === "ENFILE" || error.code === "EMFILE";
});
const text = await retrier.retry(() => fs.readFile("README.md", "utf8"));
```
The `retry()` method will either pass through the result on success or wait and retry on failure. Any error that isn't caught by the retrier is automatically rejected so the end node_modules\@humanwhocodes\retry\README.md (Line 141:1 - Line 166:7), node_modules\@humanfs\node\node_modules\@humanwhocodes\retry\README.md (Line 106:1 - Line 131:7)
onst contents = await Promise.all(
filenames.map(filename => retrier.retry(() => fs.readFile(filename, "utf8"))
);
```
### Aborting with `AbortSignal`
You can also pass an `AbortSignal` to cancel a retry:
```js
import fs from "fs/promises";
const controller = new AbortController();
const retrier = new Retrier(error => {
return error.code === "ENFILE" || error.code === "EMFILE";
});
const text = await retrier.retry(
() => fs.readFile("README.md", "utf8"),
{ signalnode_modules\@eslint\object-schema\README.md (Line 224:1 - Line 236:3), node_modules\@eslint\plugin-kit\README.md (Line 253:1 - Line 265:2)
},
},
});
// throws error: Key "time" requires keys "date"
schema.validate({
time: "13:45",
});
```
In this example, even though `date` is an optional key, it is required to be present whenever `time` is present.
## License
Apache 2.0
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.shnode_modules\@eslint\core\README.md (Line 11:1 - Line 29:19), node_modules\@eslint\plugin-kit\README.md (Line 253:1 - Line 271:19)
nt language plugins.
## License
Apache 2.0
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Passnode_modules\@eslint\config-helpers\README.md (Line 79:1 - Line 97:19), node_modules\@eslint\plugin-kit\README.md (Line 253:1 - Line 271:19)
r",
},
},
globalIgnores(["node_modules/", "dist/", "coverage/"]),
]);
```
## License
Apache 2.0
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/node_modules\word-wrap\README.md (Line 133:1 - Line 141:2), node_modules\vite\node_modules\picomatch\README.md (Line 701:1 - Line 709:4)
ing);
}
});
```
### options.trim
Type: `Boolean`
Default: `false`
Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line.
**Example:**
```js
wrnode_modules\websocket-driver\LICENSE.md (Line 1:2 - Line 12:9), node_modules\websocket-extensions\LICENSE.md (Line 1:2 - Line 12:9)
James Coglan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.node_modules\typescript\ThirdPartyNoticeText.txt (Line 14:2 - Line 20:20), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 120:2 - Line 129:4)
of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all cnode_modules\typescript\ThirdPartyNoticeText.txt (Line 179:2 - Line 187:14), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 129:2 - Line 134:9)
publicly available.
10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls.
-------------------------------------------------------------------------------------
------------------- WebGL -----------------------------
Copyright (c) 2018 The Khronos Group Inc.
Permissionode_modules\typed-array-byte-length\README.md (Line 3:1 - Line 54:11), node_modules\typed-array-byte-offset\README.md (Line 3:1 - Line 54:11)
typed-array-byte-offset <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Robustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden.
## Example
```js
var typedArrayByteOffset = require('typed-array-byte-offset');
var assert = require('assert');
assert.equal(false, typedArrayByteOffset(undefined));
assert.equal(false, typedArrayByteOffset(null));
assert.equal(false, typedArrayByteOffset(false));
assert.equal(false, typedArrayByteOffset(true));
assert.equal(false, typedArrayByteOffset([]));
assert.equal(false, typedArrayByteOffset({}));
assert.equal(false, typedArrayByteOffset(/a/g));
assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g')));
assert.equal(false, typedArrayByteOffset(new Date()));
assert.equal(false, typedArrayByteOffset(42));
assert.equal(false, typedArrayByteOffset(NaN));
assert.equal(false, typedArrayByteOffset(Infinity));
assert.equal(false, typedArrayByteOffset(new Number(42)));
assert.equal(false, typedArrayByteOffset('foo'));
assert.equal(false, typedArrayByteOffset(Object('foo')));
assert.equal(false, typedArrayByteOffset(function () {}));
assert.equal(false, typedArrayByteOffset(function* () {}));
assert.equal(false, typedArrayByteOffset(x => x * x));
assert.equal(false, typedArrayByteOffset([]));
const buffer = new ArrayBuffer(32);
assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8)));
assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4)));
assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4)));
assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8)));
assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8)));
assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16)));
assert.equal(16, typedArrayByteOffset(nnode_modules\tslib\SECURITY.md (Line 17:62 - Line 31:74), node_modules\typescript\SECURITY.md (Line 17:53 - Line 31:71)
ttps://aka.ms/opensource/security/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](httnode_modules\tslib\CopyrightNotice.txt (Line 2:1 - Line 13:10), node_modules\tslib\LICENSE.txt (Line 1:1 - Line 12:10)
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.node_modules\ts-api-utils\LICENSE.md (Line 3:1 - Line 20:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 420:1 - Line 135:10)
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN node_modules\to-regex-range\README.md (Line 235:1 - Line 270:59), node_modules\word-wrap\README.md (Line 128:1 - Line 163:59)
| _42μs_ |
| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ |
## Heads up!
**Order of arguments**
When the `min` is larger than the `max`, values will be flipped to create a valid range:
```js
toRegexRange('51', '29');
```
Is effectively flipped to:
```js
toRegexRange('29', '51');
//=> 29|[3-4][0-9]|5[0-1]
```
**Steps / increments**
This library does not support steps (increments). A pr to add support would be welcome.
## History
### v2.0.0 - 2017-04-21
**New features**
Adds support for zero-padding!
### v1.0.0
**Optimizations**
Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching.
## Attribution
Inspired by the python library [range-regex](https://github.com/dimka665/range-regex).
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests andnode_modules\string.prototype.repeat\LICENSE-MIT.txt (Line 3:1 - Line 20:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.node_modules\semver\README.md (Line 5:1 - Line 27:3), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 5:1 - Line 27:4)
er(1) -- The semantic versioner for npm
===========================================
## Install
```bash
npm install semver
````
## Usage
As a node module:
```js
const semver = require('semver')
semver.valid('1.2.3') // '1.2.3'
semver.valid('a.b.c') // null
semver.clean(' =v1.2.3 ') // '1.2.3'
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
semver.minVersion('>=1.0.0') // '1.0.0'
semver.node_modules\semver\README.md (Line 25:1 - Line 45:60), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 82:1 - Line 102:69)
semver.valid(semver.coerce('v2')) // '2.0.0'
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
```
As a command-line utility:
```
$ semver -h
A JavaScript implementation of the https://semver.org/ specification
Copyright Isaac Z. Schlueter
Usage: semver [options] <version> [<version> [...]]
Prints valid versions sorted by SemVer precedence
Options:
-r --range <range>
Print versions that match the specified range.
-i --increment [<level>]
Increment a version by the specified level. Level can
be onenode_modules\semver\README.md (Line 55:1 - Line 86:2), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 115:1 - Line 143:8)
prepatch or prerelease version increments.
-l --loose
Interpret versions and ranges loosely
-p --include-prerelease
Always include prerelease versions in range matching
-c --coerce
Coerce a string into SemVer if possible
(does not imply --loose)
--rtl
Coerce version strings right to left
--ltr
Coerce version strings left to right (default)
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
If no satisfying versions are found, then exits failure.
Versions are printed in ascending order, so supplying
multiple versions to the utility will just sort them.
```
## Versions
A "version" is described by the `v2.0.0`node_modules\semver\README.md (Line 86:2 - Line 97:10), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 148:2 - Line 159:9)
leading `"="` or `"v"` character is stripped off and ignored.
## Ranges
A `version range` is a set of `comparators` which specify versions
that satisfy the range.
A `comparator` is composed of an `operator` and a `version`. The set
of primitive `operators` is:
* `<` Less than
* `<=` Less than or equal to
* `>` Greater than
* `>=` node_modules\semver\README.md (Line 101:1 - Line 129:4), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 165:2 - Line 194:8)
mple, the comparator `>=1.2.7` would match the versions
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
or `1.1.0`.
Comparators can be joined by whitespace to form a `comparator set`,
which is satisfied by the **intersection** of all of the comparators
it includes.
A range is composed of one or more comparator sets, joined by `||`. A
version matches a range if and only if every comparator in at least
one of the `||`-separated comparator sets is satisfied by the version.
For example, the range `>=1.2.7 <1.3.0` would match the versions
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
or `1.1.0`.
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
### Prerelease Tags
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
it will only be allowed to satisfy comparator sets if at least one
comparator with the same `[major, minor, patch]` tuple also has a
prerelease tag.
For example, the range `>1.2.3-alpha.3` would be allowed to match the
version `1.2.3-alpha.7`, but it would *not* be satisfied by
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technicallynode_modules\semver\README.md (Line 140:2 - Line 147:4), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 204:1 - Line 211:16)
erefore, by default, they are excluded from range matching
semantics.
Second, a user who has opted into using a prerelease version has
clearly indicated the intent to use *that specific* set of
alpha/beta/rc versions. By including a prerelease tag in the range,
the user is indicating that they are aware of the risk. However, it
is still not appropriate to assume that they have opted into taking a
similar risk on the *next* snode_modules\semver\README.md (Line 148:2 - Line 179:9), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 212:1 - Line 241:3)
Note that this behavior can be suppressed (treating all prerelease
versions as if they were normal versions, for the purpose of range
matching) by setting the `includePrerelease` flag on the options
object to any
[functions](https://github.com/npm/node-semver#functions) that do
range matching.
#### Prerelease Identifiers
The method `.inc` takes an additional `identifier` string argument that
will append the value of the string as a prerelease identifier:
```javascript
semver.inc('1.2.3', 'prerelease', 'beta')
// '1.2.4-beta.0'
```
command-line example:
```bash
$ semvenode_modules\semver\README.md (Line 175:1 - Line 201:17), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 275:1 - Line 301:19)
```bash
$ semver 1.2.3 -i prerelease --preid beta
1.2.4-beta.0
```
Which then can be used to increment further:
```bash
$ semver 1.2.4-beta.0 -i prerelease
1.2.4-beta.1
```
### Advanced Range Syntax
Advanced range syntax desugars to primitive comparators in
deterministic ways.
Advanced ranges may be combined in the same way as primitive
comparators using white space or `||`.
#### Hyphen Ranges `X.Y.Z - A.B.C`
Specifies an inclusive set.
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
If a partial version is provided as the first version in the inclusive
range, then the missing pieces are replaced with zeroes.
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
If a partial version is provided as the seconnode_modules\semver\README.md (Line 231:2 - Line 253:17), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 333:2 - Line 355:19)
s `1.x`)
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
the `1.2.3` version will be allowed, if they are greater than or
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
`1.2.4-beta.2` would not, because it is a prerelease of a
different `[major, minor, patch]` tuple.
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
Allows changes that do not modify the left-most non-zero element in the
`[major, minor, patch]` tuple. In other words, this allows patch and
minor updates for versions `1.0.0` and above, patch updates for
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
Many authors treat a `0.x` version as if the `x` were the major
"breaking-change" indicator.
Caret ranges are ideal when an author may make breaking changes
between `0.2.4` and `0.3.0` releases, whicnode_modules\semver\README.md (Line 261:3 - Line 269:17), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 363:3 - Line 371:19)
.3` version will be allowed, if they are greater than or
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
`1.2.4-beta.2` would not, because it is a prerelease of a
different `[major, minor, patch]` tuple.
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
`0.0.3` version *only* will be allowed, if they are greater than onode_modules\semver\README.md (Line 282:1 - Line 310:3), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 384:1 - Line 412:2)
* `^0.0.x` := `>=0.0.0 <0.1.0`
* `^0.0` := `>=0.0.0 <0.1.0`
A missing `minor` and `patch` values will desugar to zero, but also
allow flexibility within those values, even if the major version is
zero.
* `^1.x` := `>=1.0.0 <2.0.0`
* `^0.x` := `>=0.0.0 <1.0.0`
### Range Grammar
Putting all this together, here is a Backus-Naur grammar for ranges,
for the benefit of parser authors:
```bnf
range-set ::= range ( logical-or range ) *
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
range ::= hyphen | simple ( ' ' simple ) * | ''
hyphen ::= partial ' - ' partial
simple ::= primitive | partial | tilde | caret
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
xr ::= 'x' | 'X' | '*' | nr
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
tilde ::= '~' partial
caret ::= '^' partial
qualifier ::= ( '-' pre )? ( '+' buinode_modules\semver\README.md (Line 334:1 - Line 351:6), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 441:1 - Line 458:5)
ersion.
`preminor`, and `prepatch` work the same way.
* If called from a non-prerelease version, the `prerelease` will work the
same as `prepatch`. It increments the patch version, then makes a
prerelease. If the input version is already a prerelease it simply
increments it.
* `prerelease(v)`: Returns an array of prerelease components, or null
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
* `major(v)`: Return the major version number.
* `minor(v)`: Return the minor version number.
* `patch(v)`: Return the patch version number.
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
or comparators intersect.
* `parse(v)`: Attempt to parse anode_modules\semver\README.md (Line 351:2 - Line 360:9), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 458:2 - Line 467:10)
string as a semantic version, returning either
a `SemVer` object or `null`.
### Comparison
* `gt(v1, v2)`: `v1 > v2`
* `gte(v1, v2)`: `v1 >= v2`
* `lt(v1, v2)`: `v1 < v2`
* `lte(v1, v2)`: `v1 <= v2`
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
even if they're not the exact same string. You already know how to
compare strings.
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
the corresponding function above. `"==="` and `"!=="` do simple
strinnode_modules\semver\README.md (Line 376:1 - Line 382:9), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 490:1 - Line 496:6)
een two versions by the release type
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
or null if the versions are the same.
### Comparators
* `intersects(comparator)`: Return true if the comparators intersect
### Ranges
* `validRange(range)`: Return the valid range or null if it's not valid
* `satisfies(version, range)`: Return true if the version satisfies the
rangenode_modules\semver\README.md (Line 386:2 - Line 392:7), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 500:2 - Line 506:6)
n the lowest version in the list
that satisfies the range, or `null` if none of them do.
* `minVersion(range)`: Return the lowest version that can possibly match
the given range.
* `gtr(version, range)`: Return `true` if version is greater than all the
versions possible in the range.
* `ltr(version, range)`: Return `true` if version is less than all the
versionsnode_modules\semver\README.md (Line 397:2 - Line 410:8), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 521:2 - Line 534:7)
by `gtr` and `ltr`.)
* `intersects(range)`: Return true if any of the ranges comparators intersect
Note that, since ranges may be non-contiguous, a version might not be
greater than a range, less than a range, *or* satisfy a range! For
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
until `2.0.0`, so the version `1.2.10` would not be greater than the
range (because `2.0.1` satisfies, which is higher), nor less than the
range (since `1.2.8` satisfies, which is lower), and it also does not
satnode_modules\semver\README.md (Line 410:2 - Line 419:42), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 534:2 - Line 543:41)
sfy the range.
If you want to know if a version satisfies or does not satisfy a
range, use the `satisfies(version, range)` function.
### Coercion
* `coerce(version, options)`: Coerces a string to semver if possible
This aims to provide a very forgiving translation of a non-semver string to
semver. It looks for the first digit in a string, and consumes all
remaining characters which satisfy at least a partial semver (e.g., `1`,
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomesnode_modules\semver\README.md (Line 419:42 - Line 430:2), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 543:41 - Line 552:3)
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
is not valid). The maximum length for any semver component considered for
coercion is 16 characters; longer components will be ignored
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
components are invalid (`9999999999999999.4.7.4` is likelynode_modules\semver\README.md (Line 430:1 - Line 440:8), node_modules\@typescript-eslint\typescript-estree\node_modules\semver\README.md (Line 558:1 - Line 570:10)
y invalid).
If the `options.rtl` flag is set, then `coerce` will return the right-most
coercible tuple that does not share an ending index with a longer coercible
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
any other overlapping SemVer tuple.
### Clean
* `clean(version)`: Clean a string to be a valid semver if possible
This will return a cleaned and trimmed semver version. If the pronode_modules\safe-buffer\README.md (Line 258:2 - Line 269:5), node_modules\safe-buffer\README.md (Line 213:2 - Line 224:6)
ze, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
difference is subtle but can be important when an application requires the
additional performance that `Buffer.allocUnsafe(size)` provides.
### Class Method: Buffer.allocUnsafeSlow(size)
<!-- YAML
added: v5.10.0
-->
* `size` {Number}
Allocates a new *non-zero-fillnode_modules\rollup\LICENSE.md (Line 54:1 - Line 71:2), node_modules\rollup\LICENSE.md (Line 25:1 - Line 41:4)
he MIT License (MIT)
>
> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN node_modules\rollup\LICENSE.md (Line 124:1 - Line 146:4), node_modules\rollup\LICENSE.md (Line 25:1 - Line 76:4)
inkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
Repository: micromatch/braces
> The MIT License (MIT)
>
> Copyright (c) 2014-present, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTnode_modules\rollup\LICENSE.md (Line 153:1 - Line 164:5), node_modules\rollup\LICENSE.md (Line 107:1 - Line 118:4)
builtin-modules
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/builtin-modules
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACnode_modules\rollup\LICENSE.md (Line 172:2 - Line 181:4), node_modules\rollup\LICENSE.md (Line 27:2 - Line 36:4)
Miller (https://paulmillr.com), Elan Shanker
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the “Software”), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subjenode_modules\rollup\LICENSE.md (Line 181:2 - Line 194:23), node_modules\rollup\LICENSE.md (Line 36:2 - Line 148:29)
the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>node_modules\rollup\LICENSE.md (Line 196:1 - Line 210:4), node_modules\rollup\LICENSE.md (Line 150:1 - Line 118:6)
UT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## date-time
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/date-time
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OFnode_modules\rollup\LICENSE.md (Line 213:1 - Line 239:5), node_modules\rollup\LICENSE.md (Line 121:1 - Line 147:7)
HE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## fill-range
License: MIT
By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
Repository: jonschlinkert/fill-range
> The MIT License (MIT)
>
> Copyright (c) 2014-present, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY,node_modules\rollup\LICENSE.md (Line 245:1 - Line 255:4), node_modules\rollup\LICENSE.md (Line 107:1 - Line 117:4)
SE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## flru
License: MIT
By: Luke Edwards
Repository: lukeed/flru
> MIT License
>
> Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGESnode_modules\rollup\LICENSE.md (Line 262:1 - Line 280:28), node_modules\rollup\LICENSE.md (Line 83:1 - Line 101:31)
SE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## glob-parent
License: ISC
By: Gulp Team, Elan Shanker, Blaine Bublitz
Repository: gulpjs/glob-parent
> The ISC License
>
> Copyright (c) 2015, 2019 Elan Shanker
>
> Permission to use, copy, modify, and/or distribute this software for any
> purpose with or without fee is hereby granted, provided that the above
> copyright notice and this permission notice appear in all copies.
>
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> ACTIOnode_modules\rollup\LICENSE.md (Line 284:2 - Line 296:11), node_modules\rollup\LICENSE.md (Line 106:2 - Line 118:12)
RMANCE OF THIS SOFTWARE.
---------------------------------------
## is-binary-path
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/is-binary-path
> MIT License
>
> Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLnode_modules\rollup\LICENSE.md (Line 302:1 - Line 325:4), node_modules\rollup\LICENSE.md (Line 25:1 - Line 147:7)
R IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## is-extglob
License: MIT
By: Jon Schlinkert
Repository: jonschlinkert/is-extglob
> The MIT License (MIT)
>
> Copyright (c) 2014-2016, Jon Schlinkert
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BEnode_modules\rollup\LICENSE.md (Line 330:2 - Line 354:7), node_modules\rollup\LICENSE.md (Line 123:2 - Line 325:6)
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## is-glob
License: MIT
By: Jon Schlinkert, Brian Woodward, Daniel Perez
Repository: micromatch/is-glob
> The MIT License (MIT)
>
> Copyright (c) 2014-2017, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE Fnode_modules\rollup\LICENSE.md (Line 357:1 - Line 383:5), node_modules\rollup\LICENSE.md (Line 121:1 - Line 147:7)
TION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## is-number
License: MIT
By: Jon Schlinkert, Olsten Larck, Rouven Weßling
Repository: jonschlinkert/is-number
> The MIT License (MIT)
>
> Copyright (c) 2014-present, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS ORnode_modules\rollup\LICENSE.md (Line 401:1 - Line 412:7), node_modules\rollup\LICENSE.md (Line 107:1 - Line 118:6)
rence.git
---------------------------------------
## locate-character
License: MIT
By: Rich Harris
Repository: git+https://gitlab.com/Rich-Harris/locate-character.git
---------------------------------------
## magic-string
License: MIT
By: Rich Harris
Repository: https://github.com/rich-harris/magic-string.git
> Copyright 2018 Rich Harris
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMnode_modules\rollup\LICENSE.md (Line 417:2 - Line 442:22), node_modules\rollup\LICENSE.md (Line 123:2 - Line 148:29)
TY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## normalize-path
License: MIT
By: Jon Schlinkert, Blaine Bublitz
Repository: jonschlinkert/normalize-path
> The MIT License (MIT)
>
> Copyright (c) 2014-2018, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENTnode_modules\rollup\LICENSE.md (Line 444:1 - Line 458:7), node_modules\rollup\LICENSE.md (Line 150:1 - Line 256:5)
HALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## parse-ms
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/parse-ms
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNEnode_modules\rollup\LICENSE.md (Line 464:1 - Line 475:2), node_modules\rollup\LICENSE.md (Line 83:1 - Line 93:3)
ABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## picocolors
License: ISC
By: Alexey Raspopov
Repository: alexeyraspopov/picocolors
> ISC License
>
> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
>
> Permission to use, copy, modify, and/or distribute this software for any
> purpose with or without fee is hereby granted, provided that the above
> copyright notice and this permission notice appear in all copies.
>
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORnode_modules\rollup\LICENSE.md (Line 486:2 - Line 511:26), node_modules\rollup\LICENSE.md (Line 123:2 - Line 148:29)
Y DAMAGES
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------
## picomatch
License: MIT
By: Jon Schlinkert
Repository: micromatch/picomatch
> The MIT License (MIT)
>
> Copyright (c) 2017-present, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE node_modules\rollup\LICENSE.md (Line 513:1 - Line 527:7), node_modules\rollup\LICENSE.md (Line 150:1 - Line 118:4)
D NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------
## pretty-bytes
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/pretty-bytes
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO node_modules\rollup\LICENSE.md (Line 530:1 - Line 544:9), node_modules\rollup\LICENSE.md (Line 150:1 - Line 118:4)
OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## pretty-ms
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/pretty-ms
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT Lnode_modules\rollup\LICENSE.md (Line 550:1 - Line 558:4), node_modules\rollup\LICENSE.md (Line 25:1 - Line 34:2)
AIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## readdirp
License: MIT
By: Thorsten Lorenz, Paul Miller
Repository: git://github.com/paulmillr/readdirp.git
> MIT License
>
> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this sonode_modules\rollup\LICENSE.md (Line 559:2 - Line 572:4), node_modules\rollup\LICENSE.md (Line 34:2 - Line 47:4)
are and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUnode_modules\rollup\LICENSE.md (Line 600:1 - Line 614:7), node_modules\rollup\LICENSE.md (Line 150:1 - Line 118:6)
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------
## time-zone
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/time-zone
> MIT License
>
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLInode_modules\rollup\LICENSE.md (Line 619:2 - Line 642:5), node_modules\rollup\LICENSE.md (Line 123:2 - Line 76:4)
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------
## to-regex-range
License: MIT
By: Jon Schlinkert, Rouven Weßling
Repository: micromatch/to-regex-range
> The MIT License (MIT)
>
> Copyright (c) 2015-present, Jon Schlinkert.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTnode_modules\rollup\LICENSE.md (Line 666:2 - Line 679:10), node_modules\rollup\LICENSE.md (Line 578:2 - Line 591:10)
> AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
> LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
> OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
> PERFORMANCE OF THIS SOFTWARE.
---------------------------------------
## yargs-parser
License: ISC
By: Ben Coe
Repository: https://github.com/yargs/yargs-parser.git
> Copyright (c) 2016, Contributors
>
> Permission to use, copy, modify, and/or distribute this software
> for any purpose with or without fee is hereby granted, provided
> that the above copyright notice and this permission notice
> appear in all copies.node_modules\resolve\readme.markdown (Line 3:1 - Line 83:9), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 3:1 - Line 83:10)
resolve <sup>[![Version Badge][2]][1]</sup>
implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
# example
asynchronously resolve:
```js
var resolve = require('resolve/async'); // or, require('resolve')
resolve('tap', { basedir: __dirname }, function (err, res) {
if (err) console.error(err);
else console.log(res);
});
```
```
$ node example/async.js
/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
```
synchronously resolve:
```js
var resolve = require('resolve/sync'); // or, `require('resolve').sync
var res = resolve('tap', { basedir: __dirname });
console.log(res);
```
```
$ node example/sync.js
/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
```
# methods
```js
var resolve = require('resolve');
var async = require('resolve/async');
var sync = require('resolve/sync');
```
For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values:
- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module
- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory
- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string)
## resolve(id, opts={}, cb)
Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`.
options are:
* opts.basedir - directory to begin resolving from
* opts.package - `package.json` data applicable to the module being loaded
* opts.extensions - array of file extensions to search in order
* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
* opts.readFile - how to read files asynchronously
* opts.isFile - function to asynchronously test whether a file exists
* opts.isDirectory - function to asynchronously test whether a file exists and is a directory
* opts.realpath - function to asynchronously resolve a potential symlink to its real path
* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file
* readFile - the passed `opts.readFinode_modules\resolve\readme.markdown (Line 85:1 - Line 114:3), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 85:1 - Line 115:8)
` or `fs.readFile` if not specified
* pkgfile - path to package.json
* cb - callback
* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
* pkg - package data
* pkgfile - path to package.json
* dir - directory that contains package.json
* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
* pkg - package data
* path - the path being resolved
* relativePath - the path relative from the package.json location
* returns - a relative path that will be joined from the package.json location
* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
* request - the import specifier being resolved
* start - lookup path
* getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
* request - the import specifier being resolved
* start - lookup path
* getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
This is the way Node resolves dependencies when executed withnode_modules\resolve\readme.markdown (Line 166:1 - Line 190:5), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 164:1 - Line 188:6)
}
});
},
moduleDirectory: 'node_modules',
preserveSymlinks: true
}
```
## resolve.sync(id, opts)
Synchronously resolve the module path string `id`, returning the result and
throwing an error when `id` can't be resolved.
options are:
* opts.basedir - directory to begin resolving from
* opts.extensions - array of file extensions to search in order
* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
* opts.readFileSync - how to read files synchronously
* opts.isFile - function to synchronously test whether a file exists
* opts.isDirectory - function to synchronously test whether a file exists and is a directory
* opts.realpathSync - function to synchronously resolve a potential symlink to its real pnode_modules\resolve\readme.markdown (Line 198:1 - Line 233:35), node_modules\eslint-plugin-react\node_modules\resolve\readme.markdown (Line 90:1 - Line 125:27)
ge data
* dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2)
* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
* pkg - package data
* path - the path being resolved
* relativePath - the path relative from the package.json location
* returns - a relative path that will be joined from the package.json location
* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
* request - the import specifier being resolved
* start - lookup path
* getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
* request - the import specifier being resolved
* start - lookup path
* getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
**Note:** this property is currently `true` by default but it will be changed to
`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
default `opts` values:
```js
{
paths: []node_modules\react-router-dom\LICENSE.md (Line 7:1 - Line 23:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\react-router\LICENSE.md (Line 1:1 - Line 23:10), node_modules\react-router-dom\LICENSE.md (Line 1:1 - Line 135:10)
MIT License
Copyright (c) React Training LLC 2015-2019
Copyright (c) Remix Software Inc. 2020-2021
Copyright (c) Shopify Inc. 2022-2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\react-is\README.md (Line 1:1 - Line 104:4), node_modules\rc-util\node_modules\react-is\README.md (Line 1:1 - Line 104:4)
# `react-is`
This package allows you to test arbitrary values and see if they're a particular React element type.
## Installation
```sh
# Yarn
yarn add react-is
# NPM
npm install react-is
```
## Usage
### Determining if a Component is Valid
```js
import React from "react";
import * as ReactIs from "react-is";
class ClassComponent extends React.Component {
render() {
return React.createElement("div");
}
}
const FunctionComponent = () => React.createElement("div");
const ForwardRefComponent = React.forwardRef((props, ref) =>
React.createElement(Component, { forwardedRef: ref, ...props })
);
const Context = React.createContext(false);
ReactIs.isValidElementType("div"); // true
ReactIs.isValidElementType(ClassComponent); // true
ReactIs.isValidElementType(FunctionComponent); // true
ReactIs.isValidElementType(ForwardRefComponent); // true
ReactIs.isValidElementType(Context.Provider); // true
ReactIs.isValidElementType(Context.Consumer); // true
ReactIs.isValidElementType(React.createFactory("div")); // true
```
### Determining an Element's Type
#### Context
```js
import React from "react";
import * as ReactIs from 'react-is';
const ThemeContext = React.createContext("blue");
ReactIs.isContextConsumer(<ThemeContext.Consumer />); // true
ReactIs.isContextProvider(<ThemeContext.Provider />); // true
ReactIs.typeOf(<ThemeContext.Provider />) === ReactIs.ContextProvider; // true
ReactIs.typeOf(<ThemeContext.Consumer />) === ReactIs.ContextConsumer; // true
```
#### Element
```js
import React from "react";
import * as ReactIs from 'react-is';
ReactIs.isElement(<div />); // true
ReactIs.typeOf(<div />) === ReactIs.Element; // true
```
#### Fragment
```js
import React from "react";
import * as ReactIs from 'react-is';
ReactIs.isFragment(<></>); // true
ReactIs.typeOf(<></>) === ReactIs.Fragment; // true
```
#### Portal
```js
import React from "react";
import ReactDOM from "react-dom";
import * as ReactIs from 'react-is';
const div = document.createElement("div");
const portal = ReactDOM.createPortal(<div />, div);
ReactIs.isPortal(portal); // true
ReactIs.typeOf(portal) === ReactIs.Portal; // true
```
#### StrictMode
```js
import React from node_modules\punycode\LICENSE-MIT.txt (Line 1:1 - Line 20:10), node_modules\string.prototype.repeat\LICENSE-MIT.txt (Line 1:1 - Line 135:10)
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.node_modules\picomatch\README.md (Line 1:1 - Line 133:5), node_modules\vite\node_modules\picomatch\README.md (Line 1:1 - Line 131:3)
<h1 align="center">Picomatch</h1>
<p align="center">
<a href="https://npmjs.org/package/picomatch">
<img src="https://img.shields.io/npm/v/picomatch.svg" alt="version">
</a>
<a href="https://github.com/micromatch/picomatch/actions?workflow=Tests">
<img src="https://github.com/micromatch/picomatch/workflows/Tests/badge.svg" alt="test status">
</a>
<a href="https://coveralls.io/github/micromatch/picomatch">
<img src="https://img.shields.io/coveralls/github/micromatch/picomatch/master.svg" alt="coverage status">
</a>
<a href="https://npmjs.org/package/picomatch">
<img src="https://img.shields.io/npm/dm/picomatch.svg" alt="downloads">
</a>
</p>
<br>
<br>
<p align="center">
<strong>Blazing fast and accurate glob matcher written in JavaScript.</strong></br>
<em>No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.</em>
</p>
<br>
<br>
## Why picomatch?
* **Lightweight** - No dependencies
* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
* **Well tested** - Thousands of unit tests
See the [library comparison](#library-comparisons) to other libraries.
<br>
<br>
## Table of Contents
<details><summary> Click to expand </summary>
- [Install](#install)
- [Usage](#usage)
- [API](#api)
* [picomatch](#picomatch)
* [.test](#test)
* [.matchBase](#matchbase)
* [.isMatch](#ismatch)
* [.parse](#parse)
* [.scan](#scan)
* [.compileRe](#compilere)
* [.makeRe](#makere)
* [.toRegex](#toregex)
- [Options](#options)
* [Picomatch options](#picomatch-options)
* [Scan Options](#scan-options)
* [Options Examples](#options-examples)
- [Globbing features](#globbing-features)
* [Basic globbing](#basic-globbing)
* [Advanced globbing](#advanced-globbing)
* [Braces](#braces)
* [Matching special characters as literals](#matching-special-characters-as-literals)
- [Library Comparisons](#library-comparisons)
- [Benchmarks](#benchmarks)
- [Philosophies](#philosophies)
- [About](#about)
* [Author](#author)
* [License](#license)
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
</details>
<br>
<br>
## Install
Install with [npm](https://www.npmjs.com/):
```sh
npm install --save picomatch
```
<br>
## Usage
The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
```js
const pm = require('picomatch');
const isMatch = pm('*.js');
console.log(isMatch('abcd')); //=> false
console.log(isMatch('a.js')); //=> true
console.log(isMatch('a.md')); //=> false
console.log(isMatch('a/b.js')); //=> false
```
<br>
## API
### [picomatch](lib/picomatch.js#L32)
Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
**Params**
* `globs` **{String|Array}**: One or more glob patterns.
* `options` **{Object=}**
* `returns` **{Function=}**: Returns a matcher function.
**Example**
```js
const picomatch = require('picomatch');
// picomatch(glob[, options]);
const isMatch = picomatch('*.!node_modules\picomatch\README.md (Line 128:2 - Line 321:10), node_modules\vite\node_modules\picomatch\README.md (Line 145:2 - Line 338:9)
atch = picomatch('*.!(*a)');
console.log(isMatch('a.a')); //=> false
console.log(isMatch('a.b')); //=> true
```
### [.test](lib/picomatch.js#L117)
Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
**Params**
* `input` **{String}**: String to test.
* `regex` **{RegExp}**
* `returns` **{Object}**: Returns an object with matching info.
**Example**
```js
const picomatch = require('picomatch');
// picomatch.test(input, regex[, options]);
console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
```
### [.matchBase](lib/picomatch.js#L161)
Match the basename of a filepath.
**Params**
* `input` **{String}**: String to test.
* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
* `returns` **{Boolean}**
**Example**
```js
const picomatch = require('picomatch');
// picomatch.matchBase(input, glob[, options]);
console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
```
### [.isMatch](lib/picomatch.js#L183)
Returns true if **any** of the given glob `patterns` match the specified `string`.
**Params**
* **{String|Array}**: str The string to test.
* **{String|Array}**: patterns One or more glob patterns to use for matching.
* **{Object}**: See available [options](#options).
* `returns` **{Boolean}**: Returns true if any patterns match `str`
**Example**
```js
const picomatch = require('picomatch');
// picomatch.isMatch(string, patterns[, options]);
console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
```
### [.parse](lib/picomatch.js#L199)
Parse a glob pattern to create the source string for a regular expression.
**Params**
* `pattern` **{String}**
* `options` **{Object}**
* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
**Example**
```js
const picomatch = require('picomatch');
const result = picomatch.parse(pattern[, options]);
```
### [.scan](lib/picomatch.js#L231)
Scan a glob pattern to separate the pattern into segments.
**Params**
* `input` **{String}**: Glob pattern to scan.
* `options` **{Object}**
* `returns` **{Object}**: Returns an object with
**Example**
```js
const picomatch = require('picomatch');
// picomatch.scan(input[, options]);
const result = picomatch.scan('!./foo/*.js');
console.log(result);
{ prefix: '!./',
input: '!./foo/*.js',
start: 3,
base: 'foo',
glob: '*.js',
isBrace: false,
isBracket: false,
isGlob: true,
isExtglob: false,
isGlobstar: false,
negated: true }
```
### [.compileRe](lib/picomatch.js#L245)
Compile a regular expression from the `state` object returned by the
[parse()](#parse) method.
**Params**
* `state` **{Object}**
* `options` **{Object}**
* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
* `returns` **{RegExp}**
### [.makeRe](lib/picomatch.js#L286)
Create a regular expression from a parsed glob pattern.
**Params**
* `state` **{String}**: The object returned from the `.parse` method.
* `options` **{Object}**
* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
* `returns` **{RegExp}**: Returns a regex created from the given pattern.
**Example**
```js
const picomatch = require('picomatch');
const state = picomatch.parse('*.js');
// picomatch.compileRe(state[, options]);
console.log(picomatch.compileRe(state));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
```
### [.toRegex](lib/picomatch.js#L321)
Create a regular expression from the given regex source string.
**Params**
* `source` **{String}**: Regular expression source string.
* `options` **{Object}**
* `returns` **{RegExp}**
**Example**
```js
const picomatch = require('picomatch');
// picomatch.toRegex(source[, options]);
const { output } = picomatch.parse('*.js');
console.log(picomatch.toRegex(output));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
```
<br>
## Options
### Picomatch options
The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
| **Option** | **Type** | **Default value** | **Description** |
| --- | --- | --- | --- |
| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
| `keepQuotes` node_modules\picomatch\README.md (Line 321:7 - Line 343:10), node_modules\vite\node_modules\picomatch\README.md (Line 338:7 - Line 359:2)
boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
| `matchBase` | `boolean` | `false` | Alias for `basename` |
| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
| `noext` | `boolean` | `false` | Alias for `noextglob` |
| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. node_modules\picomatch\README.md (Line 347:1 - Line 487:3), node_modules\vite\node_modules\picomatch\README.md (Line 363:1 - Line 503:5)
backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error.
### Scan Options
In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
| **Option** | **Type** | **Default value** | **Description** |
| --- | --- | --- | --- |
| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
**Example**
```js
const picomatch = require('picomatch');
const result = picomatch.scan('!./foo/*.js', { tokens: true });
console.log(result);
// {
// prefix: '!./',
// input: '!./foo/*.js',
// start: 3,
// base: 'foo',
// glob: '*.js',
// isBrace: false,
// isBracket: false,
// isGlob: true,
// isExtglob: false,
// isGlobstar: false,
// negated: true,
// maxDepth: 2,
// tokens: [
// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
// { value: 'foo', depth: 1, isGlob: false },
// { value: '*.js', depth: 1, isGlob: true }
// ],
// slashes: [ 2, 6 ],
// parts: [ 'foo', '*.js' ]
// }
```
<br>
### Options Examples
#### options.expandRange
**Type**: `function`
**Default**: `undefined`
Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
**Example**
The following example shows how to create a glob that matches a folder
```js
const fill = require('fill-range');
const regex = pm.makeRe('foo/{01..25}/bar', {
expandRange(a, b) {
return `(${fill(a, b, { toRegex: true })})`;
}
});
console.log(regex);
//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
console.log(regex.test('foo/00/bar')) // false
console.log(regex.test('foo/01/bar')) // true
console.log(regex.test('foo/10/bar')) // true
console.log(regex.test('foo/22/bar')) // true
console.log(regex.test('foo/25/bar')) // true
console.log(regex.test('foo/26/bar')) // false
```
#### options.format
**Type**: `function`
**Default**: `undefined`
Custom function for formatting strings before they're matched.
**Example**
```js
// strip leading './' from strings
const format = str => str.replace(/^\.\//, '');
const isMatch = picomatch('foo/*.js', { format });
console.log(isMatch('./foo/bar.js')); //=> true
```
#### options.onMatch
```js
const onMatch = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onMatch });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
#### options.onIgnore
```js
const onIgnore = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
#### options.onResult
```js
const onResult = ({ glob, regex, input, output }) => {
console.log({ glob, regex, input, output });
};
const isMatch = picomatch('*', { onResult, ignore: 'f*' });
isMatch('foo');
isMatch('bar');
isMatch('baz');
```
<br>
<br>
node_modules\picomatch\README.md (Line 487:2 - Line 527:3), node_modules\vite\node_modules\picomatch\README.md (Line 503:2 - Line 543:11)
ng features
* [Basic globbing](#basic-globbing) (Wildcard matching)
* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
### Basic globbing
| **Character** | **Description** |
| --- | --- |
| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
#### Matching behavior vs. Bash
Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
<br>
### Advanced globbing
* [extglobs](#extglobs)
* [POSIX brackets](#posix-brackets)
* [Braces](#brace-expansion)
#### Extglobs
| **Pattern** | **Description** |
| --- | --- |
| `@(pattern)` | node_modules\picomatch\README.md (Line 529:2 - Line 616:4), node_modules\vite\node_modules\picomatch\README.md (Line 545:2 - Line 632:2)
currences of `pattern` |
| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
| `!(pattern)` | Match _anything but_ `pattern` |
**Examples**
```js
const pm = require('picomatch');
// *(pattern) matches ZERO or more of "pattern"
console.log(pm.isMatch('a', 'a*(z)')); // true
console.log(pm.isMatch('az', 'a*(z)')); // true
console.log(pm.isMatch('azzz', 'a*(z)')); // true
// +(pattern) matches ONE or more of "pattern"
console.log(pm.isMatch('a', 'a*(z)')); // true
console.log(pm.isMatch('az', 'a*(z)')); // true
console.log(pm.isMatch('azzz', 'a*(z)')); // true
// supports multiple extglobs
console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
// supports nested extglobs
console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
```
#### POSIX brackets
POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
**Enable POSIX bracket support**
```js
console.log(pm.makeRe('[[:word:]]+', { posix: true }));
//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
```
**Supported POSIX classes**
The following named POSIX bracket expressions are supported:
* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
### Braces
Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
### Matching special characters as literals
If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
**Special Characters**
Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
To match any of the following characters as literals: `$^*+?()[]
Examples:
```js
console.log(pm.makeRe('foo/bar \\(1\\)'));
console.log(pm.makeRe('foo/bar \\(1\\)'));
```
<br>
<br>
## Library Comparisons
The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackenode_modules\picomatch\README.md (Line 640:1 - Line 708:2), node_modules\vite\node_modules\picomatch\README.md (Line 670:1 - Line 738:2)
- |
<br>
<br>
## Benchmarks
Performance comparison of picomatch and minimatch.
```
# .makeRe star
picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
# .makeRe star; dot=true
picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
# .makeRe globstar
picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
# .makeRe globstars
picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
# .makeRe with leading star
picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
# .makeRe - basic braces
picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
```
<br>
<br>
## Philosophies
The goal of this library is to be blazing fast, without compromising on accuracy.
**Accuracy**
The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
**Performance**
Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
<br>
<br>
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit testnode_modules\ms\license.md (Line 5:1 - Line 21:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\motion-utils\LICENSE.md (Line 5:1 - Line 21:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\motion-dom\LICENSE.md (Line 1:1 - Line 21:10), node_modules\motion-utils\LICENSE.md (Line 1:1 - Line 135:10)
The MIT License (MIT)
Copyright (c) 2024 [Motion](https://motion.dev) B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\minimist\CHANGELOG.md (Line 169:1 - Line 177:11), node_modules\minimist\CHANGELOG.md (Line 12:1 - Line 20:4)
minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34)
- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3)
- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd)
## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10
### Commits
- add supnode_modules\minimist\CHANGELOG.md (Line 195:1 - Line 201:7), node_modules\minimist\CHANGELOG.md (Line 37:1 - Line 43:21)
) [`#15`](https://github.com/minimistjs/minimist/issues/15)
- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8)
- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9)
### Commits
- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7)
- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1)
- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982)
- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11)
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistnode_modules\minimatch\README.md (Line 110:1 - Line 150:2), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\README.md (Line 199:1 - Line 239:5)
b. If nothing is matched, and
options.nonull is set, then return a list containing the pattern itself.
```javascript
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
```
### minimatch.makeRe(pattern, options)
Make a regular expression object from the pattern.
## Options
All options are `false` by default.
### debug
Dump a ton of stuff to stderr.
### nobrace
Do not expand `{a,b}` and `{1..3}` brace sets.
### noglobstar
Disable `**` matching against multiple folder names.
### dot
Allow patterns to match fnode_modules\minimatch\README.md (Line 156:1 - Line 187:25), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\README.md (Line 265:1 - Line 296:25)
set.
### noext
Disable "extglob" style patterns like `+(a|b)`.
### nocase
Perform a case-insensitive match.
### nonull
When a match is not found by `minimatch.match`, return a list containing
the pattern itself if this option is set. When not set, an empty list
is returned if there are no matches.
### matchBase
If set, then patterns without slashes will be matched
against the basename of the path if it contains slashes. For example,
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
### nocomment
Suppress the behavior of treating `#` at the start of a pattern as a
comment.
### nonegate
Suppress the behavior of treating a leading `!` character as negation.
### flipNegate
Returns from negate expressions the same as if they were not negated.
(Ie, true on a hit, false on a miss.)
### partial
Compare a partial path to a pattern. As long as the parts of the path that
are present are not contradicted by the pattern, it will be treated as a
match. This is useful in appnode_modules\minimatch\README.md (Line 202:1 - Line 230:10), node_modules\@typescript-eslint\typescript-estree\node_modules\minimatch\README.md (Line 405:1 - Line 433:10)
use x !== a
```
### allowWindowsEscape
Windows path separator `\` is by default converted to `/`, which
prohibits the usage of `\` as a escape character. This flag skips that
behavior and allows using the escape character.
## Comparisons to other fnmatch/glob implementations
While strict compliance with the existing standards is a worthwhile
goal, some discrepancies exist between minimatch and other
implementations, and are intentional.
If the pattern starts with a `!` character, then it is negated. Set the
`nonegate` flag to suppress this behavior, and treat leading `!`
characters normally. This is perhaps relevant if you wish to start the
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
characters at the start of a pattern will negate the pattern multiple
times.
If a pattern starts with `#`, then it is treated as a comment, and
will not match anything. Use `\#` to match a literal `#` at the
start of a line, or set the `nocomment` flag to suppress this behavior.
The double-star character `**` is supported by default, unless the
`noglobstar` flag is set. This is supported in the manner of bsdglob
and bash 4.1, where `**` only has special significance if it is the only
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
`a/**b` will not.
If an escaped pattern has no matches, and the `nonull` flag is set,
then minimatch.match returns the pattern as-provided, rather than
interpreting the character escapes. For example,
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
`"*a?"`. This is aknode_modules\jsx-ast-utils\README.md (Line 92:4 - Line 102:77), node_modules\jsx-ast-utils\README.md (Line 72:4 - Line 82:78)
not in the spread.
Example: `<div {...props} />` looking for specific prop here will return false if `spreadStrict` is `true`.
<hr />
### hasEveryProp
```js
hasEveryProp(props, prop, options);
```
Returns a boolean indicating if **all** of props in `prop` argument exist on the node.
#### Props
Object - The attributes on the visited node. (Usually `node.attributes`).
#### Prop
Array<String> - An array of strings representing the props you want to check for existence.
#### Options
Objenode_modules\json5\README.md (Line 45:1 - Line 77:13), node_modules\tsconfig-paths\node_modules\json5\README.md (Line 24:1 - Line 56:6)
onal.org/ecma-262/5.1/
## Summary of Features
The following ECMAScript 5.1 features, which are not supported in JSON, have
been extended to JSON5.
### Objects
- Object keys may be an ECMAScript 5.1 _[IdentifierName]_.
- Objects may have a single trailing comma.
### Arrays
- Arrays may have a single trailing comma.
### Strings
- Strings may be single quoted.
- Strings may span multiple lines by escaping new line characters.
- Strings may include character escapes.
### Numbers
- Numbers may be hexadecimal.
- Numbers may have a leading or trailing decimal point.
- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN.
- Numbers may begin with an explicit plus sign.
### Comments
- Single and multi-line comments are allowed.
### White Space
- Additional white space characters are allowed.
[IdentifierName]: https://www.ecma-internanode_modules\json5\README.md (Line 132:1 - Line 237:3), node_modules\tsconfig-paths\node_modules\json5\README.md (Line 93:1 - Line 198:5)
eate a global `JSON5` variable. -->
<script src="https://unpkg.com/json5@2/dist/index.min.js"></script>
```
#### Modules
```html
<script type="module">
import JSON5 from 'https://unpkg.com/json5@2/dist/index.min.mjs'
</script>
```
## API
The JSON5 API is compatible with the [JSON API].
[JSON API]:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
### JSON5.parse()
Parses a JSON5 string, constructing the JavaScript value or object described by
the string. An optional reviver function can be provided to perform a
transformation on the resulting object before it is returned.
#### Syntax
JSON5.parse(text[, reviver])
#### Parameters
- `text`: The string to parse as JSON5.
- `reviver`: If a function, this prescribes how the value originally produced by
parsing is transformed, before being returned.
#### Return value
The object corresponding to the given JSON5 text.
### JSON5.stringify()
Converts a JavaScript value to a JSON5 string, optionally replacing values if a
replacer function is specified, or optionally including only the specified
properties if a replacer array is specified.
#### Syntax
JSON5.stringify(value[, replacer[, space]])
JSON5.stringify(value[, options])
#### Parameters
- `value`: The value to convert to a JSON5 string.
- `replacer`: A function that alters the behavior of the stringification
process, or an array of String and Number objects that serve as a whitelist
for selecting/filtering the properties of the value object to be included in
the JSON5 string. If this value is null or not provided, all properties of the
object are included in the resulting JSON5 string.
- `space`: A String or Number object that's used to insert white space into the
output JSON5 string for readability purposes. If this is a Number, it
indicates the number of space characters to use as white space; this number is
capped at 10 (if it is greater, the value is just 10). Values less than 1
indicate that no space should be used. If this is a String, the string (or the
first 10 characters of the string, if it's longer than that) is used as white
space. If this parameter is not provided (or is null), no white space is used.
If white space is used, trailing commas will be used in objects and arrays.
- `options`: An object with the following properties:
- `replacer`: Same as the `replacer` parameter.
- `space`: Same as the `space` parameter.
- `quote`: A String representing the quote character to use when serializing
strings.
#### Return value
A JSON5 string representing the value.
### Node.js `require()` JSON5 files
When using Node.js, you can `require()` JSON5 files by adding the following
statement.
```js
require('json5/lib/register')
```
Then you can load a JSON5 file with a Node.js `require()` statement. For
example:
```js
const config = require('./config.json5')
```
## CLI
Since JSON is more widely used than JSON5, this package includes a CLI for
converting JSON5 to JSON and for validating the syntax of JSON5 documents.
### Installation
```sh
npm install --global json5
```
### Usage
```sh
json5 [options] <file>
```
If `<file>` is not provided, then STDIN is used.
#### Options:
- `-s`, `--space`: The number of spaces to indent or `t` for tabs
- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT
- `-v`, `--validate`: Validate JSON5 but do not output JSON
- `node_modules\json5\README.md (Line 259:1 - Line 272:95), node_modules\tsconfig-paths\node_modules\json5\README.md (Line 211:1 - Line 224:61)
pt implementation**
of JSON5, please submit an issue to **_this_ repository**.
### Security Vulnerabilities and Disclosures
To report a security vulnerability, please follow the follow the guidelines
described in our [security policy](./SECURITY.md).
## License
MIT. See [LICENSE.md](./LICENSE.md) for details.
## Credits
[Aseem Kishore](https://github.com/aseemk) founded this project.
He wrote a [blog post](https://aseemk.substack.com/p/ignore-the-f-ing-haters-json5)
about the journey and lessons learned 10 years in.
[Michael Bolin](http://bolinfest.com/) independently arrived at and published
some of these same ideas with awesome explanations and detail. Recommended
reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html)
[Douglas Crockford](http://www.crockfordnode_modules\json5\LICENSE.md (Line 1:1 - Line 21:10), node_modules\tsconfig-paths\node_modules\json5\LICENSE.md (Line 1:1 - Line 135:10)
MIT License
Copyright (c) 2012-2018 Aseem Kishore, and [others].
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\jsesc\LICENSE-MIT.txt (Line 1:1 - Line 20:10), node_modules\string.prototype.repeat\LICENSE-MIT.txt (Line 1:1 - Line 135:10)
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.node_modules\is-number\README.md (Line 119:1 - Line 158:65), node_modules\word-wrap\README.md (Line 124:1 - Line 163:59)
take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail.
```
# all
v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled)
v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled)
parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled)
fastest is 'v7.0'
# string
v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled)
v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled)
parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled)
fastest is 'parseFloat,v7.0'
# number
v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled)
v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled)
parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled)
fastest is 'v6.0'
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. Younode_modules\is-glob\README.md (Line 137:1 - Line 176:51), node_modules\word-wrap\README.md (Line 124:1 - Line 163:59)
e});
isGlob('abc/!(a).js', {strict: false});
isGlob('abc/+(a).js', {strict: false});
isGlob('abc/*(a).js', {strict: false});
isGlob('abc/?(a).js', {strict: false});
//=> true
```
**False**
Escaped globs or extglobs return `false`:
```js
isGlob('\\!foo.js', {strict: false});
isGlob('\\*.js', {strict: false});
isGlob('\\*\\*/abc.js', {strict: false});
isGlob('abc/\\*.js', {strict: false});
isGlob('abc/\\(aaa|bbb).js', {strict: false});
isGlob('abc/\\[a-z].js', {strict: false});
isGlob('abc/\\{a,b}.js', {strict: false});
//=> false
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm testnode_modules\imurmurhash\README.md (Line 102:1 - Line 117:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
```
---
### MurmurHash3.prototype.reset ([seed])
Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.
---
License (MIT)
-------------
Copyright (c) 2013 Gary Court, Jens Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND node_modules\ignore\README.md (Line 38:1 - Line 128:18), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 16:1 - Line 107:18)
ignore
`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore).
`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore).
Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec.
To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`.
To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way.
### Tested on
`ignore` is fully tested, and has more than **five hundreds** of unit tests.
- Linux + Node: `0.8` - `7.x`
- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor.
Actually, `ignore` does not rely on any versions of node specially.
Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md).
## Table Of Main Contents
- [Usage](#usage)
- [`Pathname` Conventions](#pathname-conventions)
- See Also:
- [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules.
- [Upgrade Guide](#upgrade-guide)
## Install
```sh
npm i ignore
```
## Usage
```js
import ignore from 'ignore'
const ig = ignore().add(['.abc/*', '!.abc/d/'])
```
### Filter the given paths
```js
const paths = [
'.abc/a.js', // filtered out
'.abc/d/e.js' // included
]
ig.filter(paths) // ['.abc/d/e.js']
ig.ignores('.abc/a.js') // true
```
### As the filter function
```js
paths.filter(ig.createFilter()); // ['.abc/d/e.js']
```
### Win32 paths will be handled
```js
ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
// if the code above runs on windows, the result will be
// ['.abc\\d\\e.js']
```
## Why another ignore?
- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
- `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations.
- `ignore` don't cares about sub-modules of git projects.
- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
- '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'.
- '`**/foo`' should match '`foo`' anywhere.
- Prevent re-including a file if a parent directory of that file is excluded.
- Handle trailing whitespaces:
- `'a '`(one space) should nnode_modules\ignore\README.md (Line 131:1 - Line 154:8), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 111:1 - Line 134:2)
eck-ignore`.
# Methods
## .add(pattern: string | Ignore): this
## .add(patterns: Array<string | Ignore>): this
- **pattern** `String | Ignore` An ignore pattern string, or the `Ignore` instance
- **patterns** `Array<String | Ignore>` Array of ignore patterns.
Adds a rule or several rules to the current manager.
Returns `this`
Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename.
```js
ignore().add('#abc').ignores('#abc') // false
ignore().add('\\#abc').ignores('#abc') // true
```
`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignonode_modules\ignore\README.md (Line 178:1 - Line 233:4), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 146:1 - Line 201:14)
s
import fs from 'fs'
if (fs.existsSync(filename)) {
ignore().add(fs.readFileSync(filename).toString())
}
```
instead.
## .filter(paths: Array<Pathname>): Array<Pathname>
```ts
type Pathname = string
```
Filters the given array of pathnames, and returns the filtered array.
- **paths** `Array.<Pathname>` The array of `pathname`s to be filtered.
### `Pathname` Conventions:
#### 1. `Pathname` should be a `path.relative()`d pathname
`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory,
```js
// WRONG, an error will be thrown
ig.ignores('./abc')
// WRONG, for it will never happen, and an error will be thrown
// If the gitignore rule locates at the root directory,
// `'/abc'` should be changed to `'abc'`.
// ```
// path.relative('/', '/abc') -> 'abc'
// ```
ig.ignores('/abc')
// WRONG, that it is an absolute path on Windows, an error will be thrown
ig.ignores('C:\\abc')
// Right
ig.ignores('abc')
// Right
ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc'
```
In other words, eachnode_modules\ignore\README.md (Line 233:2 - Line 271:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 205:2 - Line 244:6)
`Pathname` here should be a relative path to the directory of the gitignore rules.
Suppose the dir structure is:
```
/path/to/your/repo
|-- a
| |-- a.js
|
|-- .b
|
|-- .c
|-- .DS_store
```
Then the `paths` might be like this:
```js
[
'a/a.js'
'.b',
'.c/.DS_store'
]
```
#### 2. filenames and dirnames
`node-ignore` does NO `fs.stat` during path matching, so for the example below:
```js
// First, we add a ignore pattern to ignore a directory
ig.add('config/')
// `ig` does NOT know if 'config', in the real world,
// is a normal file, directory or something.
ig.ignores('config')
// `ig` treats `config` as a file, so it returns `false`
ig.ignores('config/')
// returns `true`
```
Specially for people who develop some library based on `node-ignore`, it is important to understannode_modules\ignore\README.md (Line 329:2 - Line 382:21), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 369:2 - Line 422:21)
**NOT** used to check if an ignore pattern is valid.
```js
ignore.isPathValid('./foo') // false
```
## ignore(options)
### `options.ignorecase` since 4.0.0
Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive.
```js
const ig = ignore({
ignorecase: false
})
ig.add('*.png')
ig.ignores('*.PNG') // false
```
### `options.ignoreCase?: boolean` since 5.2.0
Which is alternative to `options.ignoreCase`
### `options.allowRelativePaths?: boolean` since 5.2.0
This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions).
However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior
```js
ignore({
allowRelativePaths: true
}).ignores('../foo/bar.js') // And it will not throw
```
****
# Upgrade Guide
## Upgrade 4.x -> 5.x
Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory.
While `ignore < 5.0.0` did not make sure what the return value was, as well as
```ts
.ignores(pathname: node_modules\ignore\README.md (Line 384:1 - Line 412:2), node_modules\@typescript-eslint\eslint-plugin\node_modules\ignore\README.md (Line 424:1 - Line 452:2)
thname): boolean
.filter(pathnames: Array<Pathname>): Array<Pathname>
.createFilter(): (pathname: Pathname) => boolean
.test(pathname: Pathname): {ignored: boolean, unignored: boolean}
```
See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details.
If there are invalid pathnames, the conversion and filtration should be done by users.
```js
import {isPathValid} from 'ignore' // introduced in 5.0.0
const paths = [
// invalid
//////////////////
'',
false,
'../foo',
'.',
//////////////////
// valid
'foo'
]
.filter(isValidPath)
ig.filter(paths)
```
## Upgrade 3.x -> 4.x
Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6:
```js
var ignore = require('ignore/legacy')
```
## Upgrade 2.x -> 3.x
- All `options` of 2.x are unnecessary and removed, so just remove them.
- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all eventsnode_modules\http-parser-js\LICENSE.md (Line 4:1 - Line 23:5), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 15:4)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Somenode_modules\http-parser-js\LICENSE.md (Line 32:2 - Line 51:4), node_modules\http-parser-js\LICENSE.md (Line 2:1 - Line 15:4)
contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""node_modules\http-parser-js\LICENSE.md (Line 66:2 - Line 87:5), node_modules\http-parser-js\LICENSE.md (Line 2:1 - Line 53:2)
contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
Thisnode_modules\http-parser-js\LICENSE.md (Line 91:2 - Line 109:4), node_modules\http-parser-js\LICENSE.md (Line 2:1 - Line 15:4)
contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""node_modules\globals\readme.md (Line 20:1 - Line 37:150), node_modules\@eslint\eslintrc\node_modules\globals\readme.md (Line 22:1 - Line 39:146)
t globals from 'globals';
console.log(globals.browser);
/*
{
addEventListener: false,
applicationCache: false,
ArrayBuffer: false,
atob: false,
…
}
*/
```
Each global is given a value of `true` or `false`. A value of `true` indicates that the variable may be overwritten. A value of `false` indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be `false` unless we hear otherwise.
For Node.js this package provides two sets of globals:
- `globals.nodeBuiltin`: Globals available to all code running in Node.js.
These will usually be available as properties on the `globalThis` object and include `process`, `Buffer`, but not CommonJnode_modules\glob-parent\README.md (Line 11:1 - Line 48:6), node_modules\fast-glob\node_modules\glob-parent\README.md (Line 11:1 - Line 48:5)
eralls-url]
Extract the non-magic parent path from a glob string.
## Usage
```js
var globParent = require('glob-parent');
globParent('path/to/*.js'); // 'path/to'
globParent('/root/path/to/*.js'); // '/root/path/to'
globParent('/*.js'); // '/'
globParent('*.js'); // '.'
globParent('**/*.js'); // '.'
globParent('path/{to,from}'); // 'path'
globParent('path/!(to|from)'); // 'path'
globParent('path/?(to|from)'); // 'path'
globParent('path/+(to|from)'); // 'path'
globParent('path/*(to|from)'); // 'path'
globParent('path/@(to|from)'); // 'path'
globParent('path/**/*'); // 'path'
// if provided a non-glob path, returns the nearest dir
globParent('path/foo/bar.js'); // 'path/foo'
globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)
```
## API
### `globParent(maybeGlobString, [options])`
Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
#### options
```js
{
// Disables the automatic conversion of snode_modules\glob-parent\README.md (Line 49:1 - Line 69:26), node_modules\fast-glob\node_modules\glob-parent\README.md (Line 49:1 - Line 69:25)
ashes for Windows
flipBackslashes: true;
}
```
## Escaping
The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
- `?` (question mark) unless used as a path segment alone
- `*` (asterisk)
- `|` (pipe)
- `(` (opening parenthesis)
- `)` (closing parenthesis)
- `{` (opening curly brace)
- `}` (closing curly brace)
- `[` (opening bracket)
- `]` (closing node_modules\glob-parent\README.md (Line 70:2 - Line 96:20), node_modules\fast-glob\node_modules\glob-parent\README.md (Line 70:2 - Line 94:19)
t('foo/[bar]/'); // 'foo'
globParent('foo/\\[bar]/'); // 'foo/[bar]'
```
## Limitations
### Braces & Brackets
This library attempts a quick and imperfect method of determining which path
parts have glob magic without fully parsing/lexing the pattern. There are some
advanced use cases that can trip it up, such as nested braces where the outer
pair is escaped and the inner one contains a path separator. If you find
yourself in the unlikely circumstance of being affected by this or need to
ensure higher-fidelity glob handling in your library, it is recommended that you
pre-process your input with [expand-braces] and/or [expand-brackets].
### Windows
Backslashes are not valid path separators for globs. If a path with backslashes
is provided anyway, for simple cases, glob-parent will replace the path
separator for you and return the non-glob parent path (now with
forward-slashes, which are still valid as Windows path separators).
This cannot be used innode_modules\function.prototype.name\CHANGELOG.md (Line 80:3 - Line 88:14), node_modules\object.fromentries\CHANGELOG.md (Line 58:3 - Line 66:9)
`, `functions-have-names`
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-strict-mode`, `tape`
* [Tests] increase coverage
* [actions] update workflows
1.1.3 / 2020-11-27
=================
* [Deps] update `es-abstract`, `functions-have-names`; use `call-bind` where applicable
* [Dev Deps] update `eslint`, `@ljharb/eslinnode_modules\framer-motion\LICENSE.md (Line 3:2 - Line 21:10), node_modules\motion-utils\LICENSE.md (Line 3:2 - Line 135:10)
B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\fill-range\README.md (Line 170:1 - Line 207:2), node_modules\word-wrap\README.md (Line 124:1 - Line 161:4)
e', { toRegex: true })); //=> '[a-e]'
// alphabetical with step
console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y'
// numerical range
console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100'
// numerical range with zero padding
console.log(fill('000001', '100000', { toRegex: true }));
//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000'
```
### options.transform
**Type**: `function`
**Default**: `undefined`
**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_.
**Example(s)**
```js
// add zero padding
console.log(fill(1, 5, value => String(value).padStart(4, '0')));
//=> ['0001', '0002', '0003', '0004', '0005']
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests anode_modules\fill-range\README.md (Line 214:2 - Line 237:29), node_modules\to-regex-range\README.md (Line 282:2 - Line 305:29)
>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 116 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [paulmillr](https://github.com/paulmillr) |
| 2 | [realityking](https://github.com/realityking) |
| 2 | [bluelovers](https://github.com/bnode_modules\faye-websocket\LICENSE.md (Line 1:2 - Line 12:9), node_modules\websocket-extensions\LICENSE.md (Line 1:2 - Line 12:9)
James Coglan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.node_modules\fastq\SECURITY.md (Line 5:1 - Line 15:2), node_modules\reusify\SECURITY.md (Line 5:1 - Line 15:2)
curity Policy
## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 1.x | :white_check_mark: |
| < 1.0 | :x: |
## Reporting a Vulnerability
Please report all vulnerabilities at [https://github.com/mconode_modules\fast-levenshtein\LICENSE.md (Line 5:1 - Line 24:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.node_modules\fast-json-stable-stringify\README.md (Line 29:1 - Line 51:39), node_modules\json-stable-stringify-without-jsonify\readme.markdown (Line 32:1 - Line 53:34)
ngify = require('fast-json-stable-stringify')
```
## var str = stringify(obj, opts)
Return a deterministic stringified string `str` from the object `obj`.
## options
### cmp
If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
function for object keys. Your function `opts.cmp` is called with these
parameters:
``` js
opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
```
For example, to sort on the object key names node_modules\fast-json-stable-stringify\README.md (Line 53:1 - Line 69:39), node_modules\json-stable-stringify-without-jsonify\readme.markdown (Line 55:1 - Line 71:34)
reverse order you could write:
``` js
var stringify = require('fast-json-stable-stringify');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
console.log(s);
```
which results in the output string:
```
{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
```
Or if you wanted to sort on the object valuenode_modules\fast-deep-equal\README.md (Line 84:31 - Line 96:74), node_modules\fast-json-stable-stringify\README.md (Line 119:42 - Line 131:85)
ttps://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
## Security contact
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure. Please do NOT report security node_modules\estraverse\README.md (Line 131:2 - Line 153:8), node_modules\esutils\README.md (Line 152:2 - Line 174:8)
ion(node) {
return Object.keys(node).filter(function(key) {
return key !== 'argument';
});
}
});
```
### License
Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation)
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONnode_modules\esrecurse\README.md (Line 150:52 - Line 171:8), node_modules\esutils\README.md (Line 153:51 - Line 174:8)
}
);
```
### License
Copyright (C) 2014 [Yusuke Suzuki](https://github.com/Constellation)
(twitter: [@Constellation](https://twitter.com/Constellation)) and other contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICnode_modules\esquery\license.txt (Line 18:2 - Line 24:8), node_modules\esutils\README.md (Line 168:2 - Line 174:8)
BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.node_modules\espree\README.md (Line 246:1 - Line 262:19), node_modules\@eslint\config-array\README.md (Line 352:1 - Line 271:19)
spree supports:
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized.
### How do you determine which experimental features to support?
In general, we do not support experimental JavaScript features. We may make exceptions from time to time depending on the maturity of the features.
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Diamond Sponsors</h3>
<p><a href="https://www.ag-grid.com/"><img src="https://images.opencollective.com/ag-grid/bec0580/logo.png" alt="AG Grid" height="128"></a></p><h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslnode_modules\eslint-visitor-keys\README.md (Line 23:1 - Line 89:57), node_modules\@eslint-community\eslint-utils\node_modules\eslint-visitor-keys\README.md (Line 24:1 - Line 90:74)
s
- [Node.js] `^18.18.0`, `^20.9.0`, or `>=21.1.0`
## 📖 Usage
To use in an ESM file:
```js
import * as evk from "eslint-visitor-keys"
```
To use in a CommonJS file:
```js
const evk = require("eslint-visitor-keys")
```
### evk.KEYS
> type: `{ [type: string]: string[] | undefined }`
Visitor keys. This keys are frozen.
This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes.
For example:
```
console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"]
```
### evk.getKeys(node)
> type: `(node: object) => string[]`
Get the visitor keys of a given AST node.
This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`.
This will be used to traverse unknown nodes.
For example:
```js
const node = {
type: "AssignmentExpression",
left: { type: "Identifier", name: "foo" },
right: { type: "Literal", value: 0 }
}
console.log(evk.getKeys(node)) // → ["type", "left", "right"]
```
### evk.unionWith(additionalKeys)
> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }`
Make the union set with `evk.KEYS` and the given keys.
- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that.
- It removes duplicated keys as keeping the first one.
For example:
```js
console.log(evk.unionWith({
MethodDefinition: ["decorators"]
})) // node_modules\eslint-visitor-keys\README.md (Line 105:1 - Line 121:19), node_modules\@eslint\config-array\README.md (Line 352:1 - Line 271:19)
age` opens the code coverage report of the previous test with your default browser.
[npm]: https://www.npmjs.com/
[Node.js]: https://nodejs.org/
[ESTree]: https://github.com/estree/estree
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Diamond Sponsors</h3>
<p><a href="https://www.ag-grid.com/"><img src="https://images.opencollective.com/ag-grid/bec0580/logo.png" alt="AG Grid" height="128"></a></p><h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a hnode_modules\eslint-scope\README.md (Line 182:1 - Line 198:19), node_modules\@eslint\config-array\README.md (Line 352:1 - Line 271:19)
/.github/blob/master/SECURITY.md).
## Build Commands
* `npm test` - run all linting and tests
* `npm run lint` - run all linting
## License
ESLint Scope is licensed under a permissive BSD 2-clause license.
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Diamond Sponsors</h3>
<p><a href="https://www.ag-grid.com/"><img src="https://images.opencollective.com/ag-grid/bec0580/logo.png" alt="AG Grid" height="128"></a></p><h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" node_modules\eslint-plugin-jsx-a11y\LICENSE.md (Line 1:1 - Line 8:10), node_modules\jsx-ast-utils\LICENSE.md (Line 1:1 - Line 135:10)
The MIT License (MIT)
Copyright (c) 2016 Ethan Cohen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.node_modules\eslint\README.md (Line 212:1 - Line 232:6), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 15:4)
des:
- Rule schemas
- Configuration schema
- Command-line options
- Node.js API
- Rule, formatter, parser, plugin APIs
According to our policy, any minor update may report more linting errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
## License
MIT License
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or snode_modules\eslint\README.md (Line 319:1 - Line 331:18), node_modules\@eslint\plugin-kit\README.md (Line 255:1 - Line 267:48)
m">
<img src="https://github.com/amareshsm.png?s=75" width="75" height="75" alt="Amaresh S M's Avatar"><br />
Amaresh S M
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/harish-sethuraman">
<img src="https://github.com/harish-sethuraman.png?s=75" width="75" height="75" alt="Harish's Avatar"><br />
Harish
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/kecrily">
<img src="https://github.com/kecrily.png?s=75" width="75" height="75" alt="Percy Ma's Avatar"><br />
Percy Ma
</a>
</td></tr></tbody></table>
<!--teamend-->
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt=node_modules\eslint\README.md (Line 331:7 - Line 336:19), node_modules\@eslint\plugin-kit\README.md (Line 267:7 - Line 271:19)
g src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution node_modules\esbuild\LICENSE.md (Line 5:1 - Line 21:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 135:10)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\es-to-primitive\CHANGELOG.md (Line 86:3 - Line 95:8), node_modules\es-to-primitive\CHANGELOG.md (Line 76:3 - Line 85:6)
rades on older node versions
* [Tests] fix testling
* [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
1.0.1 / 2016-01-03
=================
* [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2)
* [Deps] update `is-callable`, `is-date-object`
* [Dev Deps] update `eslint`, `tape`, `semvernode_modules\emoji-regex\LICENSE-MIT.txt (Line 1:1 - Line 20:10), node_modules\string.prototype.repeat\LICENSE-MIT.txt (Line 1:1 - Line 135:10)
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.node_modules\doctrine\README.md (Line 104:1 - Line 114:9), node_modules\websocket-extensions\LICENSE.md (Line 3:1 - Line 12:9)
ll need to pass just the JSDoc comment to Doctrine in order to work.
### License
#### doctrine
Copyright JS Foundation and other contributors, https://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Wnode_modules\doctrine\README.md (Line 121:49 - Line 142:8), node_modules\esutils\README.md (Line 153:51 - Line 174:8)
prima
some of functions is derived from esprima
Copyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about)
(twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)) and other contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHEnode_modules\debug\README.md (Line 2:1 - Line 244:3), node_modules\sockjs-client\node_modules\debug\README.md (Line 2:2 - Line 247:3)
debug
[](#backers)
[](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
A tiny JavaScript debugging utility modelled after Node.js core's debugging
technique. Works in Node.js and web browsers.
## Installation
```bash
$ npm install debug
```
## Usage
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
, http = require('http')
, name = 'My App';
// fake app
debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
res.end('hello\n');
}).listen(3000, function(){
debug('listening');
});
// fake worker of some kind
require('./worker');
```
Example [_worker.js_](./examples/node/worker.js):
```js
var a = require('debug')('worker:a')
, b = require('debug')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();
```
The `DEBUG` environment variable is then used to enable these based on space or
comma-delimited names.
Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows command prompt notes
##### CMD
On Windows the environment variable is set using the `set` command.
```cmd
set DEBUG=*,-not_this
```
Example:
```cmd
set DEBUG=* & node app.js
```
##### PowerShell (VS Code default)
PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
$env:DEBUG='app';node app.js
```
Then, run the program to be debugged as usual.
npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```
## Namespace Colors
Every debug instance has a color generated for it based on its namespace name.
This helps when visually parsing the debug output to identify which debug instance
a debug line belongs to.
#### Node.js
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
otherwise debug will only use a small handful of basic colors.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### Web Browser
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## Millisecond diff
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
## Conventions
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
The `*` character may be used as a wildcard. Suppose for example your library has
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
You can also exclude specific debuggers by prefixing them with a "-" character.
For example, `DEBUG=*,-connect:*` would include all debuggers except those
starting with "connect:".
## Environment Variables
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
## Formatters
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
| `%O` | Pretty-print an Object on multiple lines. |
| `%o` | Pretty-print an Object all on a single line. |
| `%s` | String. |
| `%d` | Number (both integer and float). |
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
### Custom formatters
You can add custom formatters by extending the `debug.formatters` object.
For example, if you wanted to add support for rendering a Buffer as hex with
`%h`, you could do something like:
```js
const createDebug = require('debug')
createDebug.formatters.h = (v) => {
return v.toString('hex')
}
// …elsewhere
const debug = createDebug('foo')
debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
## Browser Support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this usinode_modules\debug\README.md (Line 250:3 - Line 323:12), node_modules\sockjs-client\node_modules\debug\README.md (Line 247:3 - Line 322:6)
e, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
var error = debug('app:error');
// by default stderr is used
error('goes to stderr!');
var log = debug('app:log');
// set this namespace to log via console.log
log.log = console.log.bind(console); // don't forget to bind to console!
log('goes to stdout');
error('still goes to stderr!');
// set all output to go via console.info
// overrides all per-namespace log settings
debug.log = console.info.bind(console);
error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
## Extend
You can simply extend debugger
```js
const log = require('debug')('auth');
//creates new debug instance with extended namespace
const logSign = log.extend('sign');
const logLogin = log.extend('login');
log('hello'); // auth hello
logSign('hello'); //auth:sign hello
logLogin('hello'); //auth:login hello
```
## Set dynamically
You can also enable debug dynamically by calling the `enable()` method :
```js
let debug = require('debug');
console.log(1, debug.enabled('test'));
debug.enable('test');
console.log(2, debug.enabled('test'));
debug.disable();
console.log(3, debug.enabled('test'));
```
print :
```
1 false
2 true
3 false
```
node_modules\debug\README.md (Line 343:1 - Line 359:4), node_modules\sockjs-client\node_modules\debug\README.md (Line 322:1 - Line 339:2)
g what was enabled to begin with.
For example:
```js
let debug = require('debug');
debug.enable('foo:*,-foo:bar');
let namespaces = debug.disable();
debug.enable(namespaces);
```
Note: There is no guarantee that the string will be identical to the initial
enable string, but semantically they will be identical.
## Checkingnode_modules\debug\README.md (Line 388:1 - Line 462:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 345:1 - Line 420:11)
r = fork(WORKER_WRAP_PATH, [workerPath], {
stdio: [
/* stdin: */ 0,
/* stdout: */ 'pipe',
/* stderr: */ 'pipe',
'ipc',
],
env: Object.assign({}, process.env, {
DEBUG_COLORS: 1 // without this settings, colors won't be shown
}),
});
worker.stderr.pipe(process.stderr, { end: false });
```
## Authors
- TJ Holowaychuk
- Nathan Rajlich
- Andrew Rhyne
- Josh Junon
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/spnode_modules\debug\README.md (Line 464:1 - Line 481:10), node_modules\sockjs-client\node_modules\debug\README.md (Line 420:1 - Line 135:10)
a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
## License
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2018-2021 Josh Junon
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS node_modules\chalk\readme.md (Line 188:2 - Line 194:15), node_modules\supports-color\readme.md (Line 47:1 - Line 54:2)
nvenience.
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
Explicit 256/Truecolor mode can be enanode_modules\braces\README.md (Line 525:1 - Line 563:12), node_modules\word-wrap\README.md (Line 124:1 - Line 208:4)
ash
● expand - range (expanded)
braces x 53,167 ops/sec ±0.12% (102 runs sampled)
minimatch x 11,378 ops/sec ±0.10% (102 runs sampled)
● expand - range (optimized for regex)
braces x 373,442 ops/sec ±0.04% (100 runs sampled)
minimatch x 3,262 ops/sec ±0.18% (100 runs sampled)
● expand - nested ranges (expanded)
braces x 33,921 ops/sec ±0.09% (99 runs sampled)
minimatch x 10,855 ops/sec ±0.28% (100 runs sampled)
● expand - nested ranges (optimized for regex)
braces x 287,479 ops/sec ±0.52% (98 runs sampled)
minimatch x 3,219 ops/sec ±0.28% (101 runs sampled)
● expand - set (expanded)
braces x 238,243 ops/sec ±0.19% (97 runs sampled)
minimatch x 538,268 ops/sec ±0.31% (96 runs sampled)
● expand - set (optimized for regex)
braces x 321,844 ops/sec ±0.10% (97 runs sampled)
minimatch x 140,600 ops/sec ±0.15% (100 runs sampled)
● expand - nested sets (expanded)
braces x 165,371 ops/sec ±0.42% (96 runs sampled)
minimatch x 337,720 ops/sec ±0node_modules\brace-expansion\README.md (Line 3:1 - Line 109:6), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 3:1 - Line 109:3)
brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[](http://travis-ci.org/juliangruber/brace-expansion)
[](https://www.npmjs.org/package/brace-expansion)
[](https://greenkeeper.io/)
[](https://ci.testling.com/juliangruber/brace-expansion)
## Example
```js
var expand = require('brace-expansion');
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
var expand = require('brace-expansion');
```
### var expanded = expand(str)
Return an array of all possible and valid expansions of `str`. If none are
found, `[str]` is returned.
Valid expansions are:
```js
/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install brace-expansion
```
## Contributors
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not snode_modules\brace-expansion\README.md (Line 109:1 - Line 129:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 115:1 - Line 135:10)
Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## License
(MIT)
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT Onode_modules\balanced-match\README.md (Line 71:1 - Line 97:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 109:1 - Line 135:10)
ill match `[0, 2]`.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install balanced-match
```
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## License
(MIT)
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITYnode_modules\balanced-match\LICENSE.md (Line 1:1 - Line 21:10), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 115:1 - Line 135:10)
(MIT)
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.node_modules\axe-core\LICENSE-3RD-PARTY.txt (Line 22:1 - Line 41:78), node_modules\@typescript-eslint\typescript-estree\node_modules\brace-expansion\README.md (Line 119:1 - Line 15:4)
akmap-polyfill; Copyright (c) 2015-2021 polygonplanet
-----------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE Snode_modules\axe-core\LICENSE-3RD-PARTY.txt (Line 58:1 - Line 64:10), node_modules\tslib\LICENSE.txt (Line 6:1 - Line 12:10)
------------------------------------------------------------
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANnode_modules\aria-query\README.md (Line 27:1 - Line 41:14), node_modules\axobject-query\README.md (Line 21:1 - Line 35:10)
rsion 6.11.2 or later.
## Utilities
### Interface
These methods are available on each export from the module. The typing here in the documentation is pseudo-typed. Each export will have its own specific types for each method signature.
```javascript
{|
entries: () => Array<$Item>,
get: (key: $Key) => ?$Value,
has: (key: $Key) => boolean,
keys: () => Array<$Key>,
node_modules\ansi-styles\readme.md (Line 52:1 - Line 90:3), node_modules\chalk\readme.md (Line 212:1 - Line 250:6)
ty.
## Styles
### Modifiers
- `reset`
- `bold`
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
### Colors
- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `blackBright` (alias: `gray`, `grey`)
- `redBright`
- `greenBright`
- `yellowBright`
- `blueBright`
- `magentaBright`
- `cyanBright`
- `whiteBright`
### Background colors
- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgyaml
node_modules\fastq\.github\workflows\ci.yml (Line 1:1 - Line 14:20), node_modules\reusify\.github\workflows\ci.yml (Line 1:1 - Line 14:20)
name: ci
on: [push, pull_request]
jobs:
legacy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x]
steps:
- uses: actions/checkout@v3node_modules\fast-json-stable-stringify\.eslintrc.yml (Line 10:3 - Line 25:2), node_modules\json-schema-traverse\.eslintrc.yml (Line 12:3 - Line 27:2)
linebreak-style: [2, unix]
new-cap: 2
no-console: [2, allow: [warn, error]]
no-else-return: 2
no-eq-null: 2
no-fallthrough: 2
no-invalid-this: 2
no-return-assign: 2
no-shadow: 1
no-trailing-spaces: 2
no-use-before-define: [2, nofunc]
quotes: [2, single, avoid-escape]
semi: [2, always]
strict: [2, global]
valid-jsdoc: [2, requireReturn: false]
no-control-regex: 0powershell
node_modules\tsconfig-paths\node_modules\.bin\json5.ps1 (Line 1:1 - Line 14:22), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js"node_modules\eslint-plugin-react\node_modules\.bin\resolve.ps1 (Line 1:1 - Line 14:25), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve"node_modules\.bin\vite.ps1 (Line 1:1 - Line 14:22), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js"node_modules\.bin\update-browserslist-db.ps1 (Line 1:1 - Line 14:35), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js"node_modules\.bin\tsserver.ps1 (Line 1:1 - Line 14:29), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver"node_modules\.bin\tsconfck.ps1 (Line 1:1 - Line 14:30), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../tsconfck/bin/tsconfck.js"node_modules\.bin\tsc.ps1 (Line 1:1 - Line 14:24), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc"node_modules\.bin\semver.ps1 (Line 1:1 - Line 28:5), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 28:5)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
} else {
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
} else {
& "node$exe" "$basedir/../semver/bin/semver.js" $args
}
$ret=$LASTEXITCODE
}
exit $retnode_modules\.bin\rollup.ps1 (Line 1:1 - Line 14:28), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup"node_modules\.bin\resolve.ps1 (Line 1:1 - Line 28:5), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 28:5)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
} else {
& "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../resolve/bin/resolve" $args
} else {
& "node$exe" "$basedir/../resolve/bin/resolve" $args
}
$ret=$LASTEXITCODE
}
exit $retnode_modules\.bin\parser.ps1 (Line 1:1 - Line 14:39), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js"node_modules\.bin\node-which.ps1 (Line 1:1 - Line 14:26), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../which/bin/node-which"node_modules\.bin\nanoid.ps1 (Line 1:1 - Line 14:27), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs"node_modules\.bin\loose-envify.ps1 (Line 1:1 - Line 14:25), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../loose-envify/cli.js"node_modules\.bin\kill-port.ps1 (Line 1:1 - Line 14:22), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../kill-port/cli.js"node_modules\.bin\json5.ps1 (Line 1:1 - Line 28:5), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 28:5)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
} else {
& "node$exe" "$basedir/../json5/lib/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $retnode_modules\.bin\jsesc.ps1 (Line 1:1 - Line 14:21), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc"node_modules\.bin\js-yaml.ps1 (Line 1:1 - Line 14:28), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js"node_modules\.bin\eslint.ps1 (Line 1:1 - Line 14:26), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js"node_modules\.bin\esbuild.ps1 (Line 1:1 - Line 14:25), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild"node_modules\.bin\browserslist.ps1 (Line 1:1 - Line 14:25), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js"node_modules\.bin\acorn.ps1 (Line 1:1 - Line 14:21), node_modules\@typescript-eslint\typescript-estree\node_modules\.bin\semver.ps1 (Line 1:1 - Line 14:26)
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn"tsx
src\components\board\workspace\CanvasToolSection.tsx (Line 26:3 - Line 40:18), src\components\board\workspace\HeaderToolbar.tsx (Line 30:3 - Line 44:14)
boardName: string;
strokeColor: string;
setStrokeColor: (color: string) => void;
strokeWidth: number;
setStrokeWidth: (width: number) => void;
tool: Tool;
setTool: (tool: Tool) => void;
onUndo: () => void;
isUndoAvailable: boolean;
onRedo: () => void;
isRedoAvailable: boolean;
canvasConfig?: CanvasConfig;
}
export const CanvasToolSectionsrc\components\board\workspace\CanvasToolSection.tsx (Line 41:3 - Line 97:20), src\components\board\workspace\HeaderToolbar.tsx (Line 46:3 - Line 102:34)
boardName,
strokeColor,
setStrokeColor,
strokeWidth,
setStrokeWidth,
tool,
setTool,
onUndo,
isUndoAvailable,
onRedo,
isRedoAvailable,
canvasConfig,
}) => {
const { t } = useTranslation();
const handleDownload = useCallback(() => {
const canvas = document.querySelector('canvas') as HTMLCanvasElement;
if (!canvas) return;
const ctx = canvas.getContext('2d');
if (!ctx) return;
// Create a temporary canvas to draw the background + content
const tempCanvas = document.createElement('canvas');
tempCanvas.width = canvas.width;
tempCanvas.height = canvas.height;
const tempCtx = tempCanvas.getContext('2d');
if (!tempCtx) return;
// Fill background color
const backgroundColor = canvasConfig?.backgroundColor || '#FFFFFF';
tempCtx.fillStyle = backgroundColor;
tempCtx.fillRect(0, 0, tempCanvas.width, tempCanvas.height);
// Draw the existing canvas content on top of the background
tempCtx.drawImage(canvas, 0, 0);
// Create download link using the temporary canvas
const link = document.createElement('a');
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, -5);
link.download = `${boardName}-${timestamp}.png`;
link.href = tempCanvas.toDataURL('image/png');
link.click();
}, [boardName, canvasConfig]);
const handleToolClick = useCallback((toolName: Tool) => {
if (toolName === TOOLS.DOWNLOAD) {
handleDownload();
} else {
setTool(toolName);
}
}, [handleDownload, setTool]);
return (
<div className={styles.canvasToolSection}>
{/* Color Control */src\components\board\workspace\CanvasToolSection.tsx (Line 104:13 - Line 116:17), src\components\board\workspace\HeaderToolbar.tsx (Line 111:15 - Line 123:19)
/>
</div>
</div>
<span className={styles.toolLabel}>{t('toolbar.label.color')}</span>
</div>
{/* Size Control */}
{tool !== TOOLS.COLOR_PICKER && tool !== TOOLS.RECOLOR && tool !== TOOLS.DOWNLOAD && (
<div className={styles.toolGroup}>
<div className={styles.toolControls}>
<div className={styles.strokeControl}>
<Slider
src\components\board\details\EditFieldForm.tsx (Line 78:11 - Line 86:13), src\components\board\list\CreateBoardForm.tsx (Line 231:9 - Line 239:10)
)}
</div>
<div className={styles.buttonGroup}>
<Button type="button" onClick={onClose} disabled={isSubmitting} variant="secondary">
{t('common.button.cancel')}
</Button>
<Button type="submit" disabled={isSubmitting} variant="primary">
{isSubmittingsrc\components\board\details\CanvasSettingsSection.tsx (Line 24:1 - Line 36:2), src\components\board\list\CreateBoardForm.tsx (Line 22:2 - Line 34:2)
}) => {
const { t } = useTranslation();
const getTranslationKey = (sizeKey: string): string => {
const keyMap: Record<string, string> = {
'WIDESCREEN': 'widescreen',
'SQUARE': 'square',
'PORTRAIT': 'portrait',
'DOCUMENT': 'document',
};
return keyMap[sizeKey] || sizeKey.toLowerCase();
};
const [src\components\board\details\CanvasSettingsSection.tsx (Line 63:7 - Line 73:6), src\components\board\list\CreateBoardForm.tsx (Line 60:5 - Line 70:9)
let width, height;
if (canvasSize === 'custom') {
width = customWidth;
height = customHeight;
} else {
const preset = CANVAS_CONFIG.CANVAS_SIZE_PRESETS[canvasSize as keyof typeof CANVAS_CONFIG.CANVAS_SIZE_PRESETS];
width = preset.width;
height = preset.height;
}
awaitsrc\components\board\details\CanvasSettingsSection.tsx (Line 147:35 - Line 160:11), src\components\board\list\CreateBoardForm.tsx (Line 157:35 - Line 171:10)
)}</label>
<div className={styles.sizeOptions}>
{/* Canvas Size Presets */}
<div className={styles.sizeGroup}>
{CANVAS_CONFIG.PRESET_ORDER.map((size) => {
const preset = CANVAS_CONFIG.CANVAS_SIZE_PRESETS[size];
return (
<label key={size} className={styles.radioOption}>
<input
type="radio"
value={size}
checked={canvasSize === size}
onChange={(e) => setCanvasSize(e.target.value as typeof canvasSize)}
disabled={isUpdatingsrc\components\board\details\CanvasSettingsSection.tsx (Line 160:11 - Line 180:21), src\components\board\list\CreateBoardForm.tsx (Line 171:10 - Line 191:17)
}
aria-label={`${t(`canvasSize.presets.${getTranslationKey(size)}.label`)} (${preset.ratio}) - ${preset.width}×${preset.height}`}
/>
<div className={styles.presetLabel}>
<span className={styles.presetName}>
{t(`canvasSize.presets.${getTranslationKey(size)}.label`)}
</span>
<span className={styles.presetInfo}>
({preset.ratio}) - {preset.width}×{preset.height}
</span>
</div>
</label>
);
})}
</div>
{/* Custom Option */}
<div className={styles.sizeGroup}>
<label className={styles.radioOption}>
<input
src\components\board\details\CanvasSettingsSection.tsx (Line 186:19 - Line 200:19), src\components\board\list\CreateBoardForm.tsx (Line 197:15 - Line 211:15)
/>
<div className={styles.presetLabel}>
<span className={styles.presetName}>
{t('canvasSize.custom.label')}
</span>
<span className={styles.presetInfo}>
</span>
</div>
</label>
</div>
</div>
{canvasSize === 'custom' && (
<div className={styles.customSizeInputs}>
<Input
src\components\board\details\CanvasSettingsSection.tsx (Line 245:9 - Line 267:2), src\components\board\details\CanvasSettingsSection.tsx (Line 89:9 - Line 111:3)
<div className={styles.readOnlySettings}>
<div className={styles.settingRow}>
<span className={styles.settingLabel}>{t('boardDetails.canvasSettings.backgroundColor')}:</span>
<div
className={styles.colorPreview}
style={{ backgroundColor: boardDetails.canvasBackgroundColor }}
title={boardDetails.canvasBackgroundColor}
/>
<span className={styles.settingValue}>
{(() => {
const colorName = getColorName(boardDetails.canvasBackgroundColor);
return colorName ? t(`colors.${colorName}`) : boardDetails.canvasBackgroundColor;
})()}
</span>
</div>
<div className={styles.settingRow}>
<span className={styles.settingLabel}>{t('boardDetails.canvasSettings.size')}:</span>
<span className={styles.settingValue}>
{boardDetails.canvasWidth} × {boardDetails.canvasHeight} {t('boardDetails.canvasSettings.pixels')}
</span>
</div>
</div>
)src\components\common\PictureManager.tsx (Line 41:13 - Line 55:2), src\components\settings\ProfilePictureManager.tsx (Line 26:17 - Line 40:2)
;
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const file = event.target.files?.[0];
if (file) {
onUpload(file);
}
};
const triggerFileInput = () => {
fileInputRef.current?.click();
};
return (
<src\components\common\PasswordInput.tsx (Line 38:11 - Line 50:101), src\components\common\PasswordInput.tsx (Line 21:8 - Line 33:45)
: React.FC<{ className?: string }> = ({ className }) => (
<svg
className={className}
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94L6 6l15 15-3.06-3.06Zsrc\context\CanvasPreferencesContext.tsx (Line 45:2 - Line 53:21), src\context\ToolPreferencesContext.tsx (Line 43:2 - Line 51:14)
=> {
switch (action.type) {
case 'LOAD_START':
return { ...state, isLoading: true, error: null };
case 'LOAD_SUCCESS':
return { ...state, isLoading: false, preferences: action.payload, error: null };
case 'LOAD_ERROR':
return { ...state, isLoading: false, error: action.payload };
case 'UPDATE_SPLIT_RATIO'css
src\components\board\workspace\HeaderToolbar.module.css (Line 189:2 - Line 197:23), src\components\board\workspace\HeaderToolbar.module.css (Line 78:2 - Line 86:21)
{
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.95);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.dropdownButton.activesrc\components\board\workspace\HeaderToolbar.module.css (Line 197:2 - Line 204:17), src\components\board\workspace\HeaderToolbar.module.css (Line 91:2 - Line 98:20)
{
background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.15));
color: #fff;
border-color: rgba(59, 130, 246, 0.4);
box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
.dropdownContentsrc\components\board\workspace\CanvasToolSection.module.css (Line 8:1 - Line 33:6), src\components\board\workspace\HeaderToolbar.module.css (Line 29:1 - Line 54:17)
}
.toolGroup {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 8px 14px;
position: relative;
min-height: 56px;
border-radius: 8px;
transition: background-color 0.2s ease;
}
.toolGroup:hover {
background-color: rgba(255, 255, 255, 0.03);
}
.toolGroup:hover .toolLabel {
color: rgba(255, 255, 255, 0.7);
}
.toolGroup:not(:last-child)::after {
content: '';
position: absolute;
rightsrc\components\board\workspace\CanvasToolSection.module.css (Line 33:6 - Line 111:11), src\components\board\workspace\HeaderToolbar.module.css (Line 54:17 - Line 132:12)
: 0;
top: 50%;
transform: translateY(-50%);
height: 32px;
width: 1px;
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.iconButton {
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.06);
color: rgba(255, 255, 255, 0.65);
cursor: pointer;
padding: 8px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
min-width: 36px;
min-height: 36px;
position: relative;
}
.iconButton:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.95);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.iconButton:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.iconButton.active {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.15));
color: #fff;
border-color: rgba(59, 130, 246, 0.4);
box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
.colorPickerWrapper {
display: inline-flex;
align-items: center;
height: 36px;
}
.colorPickerWrapper :global(.colorPickerContainer) {
height: 36px;
}
.colorPickerWrapper :global(.swatch) {
width: 36px;
height: 36px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.colorPickerWrapper :global(.swatch):hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
border-color: rgba(255, 255, 255, 0.2);
}
.strokeControl {
display: inline-flex;
align-items: center;
min-width: 120px;
height: 36px;
padding: 0 8px;
background: rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 6px;
}
.toolLabelsrc\components\board\workspace\CanvasToolSection.module.css (Line 108:4 - Line 130:52), src\components\board\workspace\HeaderToolbar.module.css (Line 248:5 - Line 270:39)
;
}
.toolLabel {
font-size: 10px;
font-weight: 400;
color: rgba(255, 255, 255, 0.55);
white-space: nowrap;
text-transform: uppercase;
letter-spacing: 0.8px;
margin-top: 6px;
transition: color 0.2s ease;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.toolControls {
display: flex;
gap: 6px;
align-items: center;
justify-content: center;
}
/* Mobile CSS removed - desktop-only application */src\components\common\UniversalToolbar.module.css (Line 9:3 - Line 16:5), src\components\board\workspace\HeaderToolbar.module.css (Line 7:3 - Line 14:5)
background: linear-gradient(to bottom, rgba(40, 40, 40, 0.98), rgba(35, 35, 35, 0.98));
backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24pxsrc\components\common\UniversalToolbar.module.css (Line 80:2 - Line 88:24), src\components\board\workspace\HeaderToolbar.module.css (Line 78:2 - Line 86:21)
{
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.95);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toolbarButton.disabledsrc\components\common\CommonForm.module.css (Line 167:8 - Line 181:5), src\components\board\details\CanvasSettingsSection.module.css (Line 106:7 - Line 120:8)
;
font-weight: 600;
margin: 0 0 0.25rem 0;
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 1px solid #444;
padding-bottom: 0.25rem;
}
.radioOption {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
color: #fffsrc\components\common\CommonForm.module.css (Line 181:5 - Line 202:8), src\components\board\details\CanvasSettingsSection.module.css (Line 120:8 - Line 141:6)
;
font-size: 0.9rem;
padding: 0.25rem 0;
}
.radioOption input[type="radio"] {
width: 1rem;
height: 1rem;
accent-color: #3b82f6;
cursor: pointer;
}
.radioOption:hover {
color: #e5e5e5;
}
.customSizeInputs {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
paddingsrc\components\common\Button.module.css (Line 31:2 - Line 38:30), src\components\common\UniversalToolbar.module.css (Line 93:2 - Line 100:44)
{
background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.2));
color: #fff;
border-color: rgba(59, 130, 246, 0.4);
box-shadow: 0 0 8px rgba(59, 130, 246, 0.1);
}
.primary:hover:not(:disabled)src\components\common\Button.module.css (Line 53:2 - Line 60:34), src\components\common\UniversalToolbar.module.css (Line 106:2 - Line 113:48)
{
background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(220, 38, 38, 0.2));
color: #fff;
border-color: rgba(220, 38, 38, 0.4);
box-shadow: 0 0 8px rgba(220, 38, 38, 0.1);
}
.destructive:hover:not(:disabled)src\components\auth\LoginForm.module.css (Line 1:1 - Line 28:20), src\components\auth\RegistrationForm.module.css (Line 1:1 - Line 28:39)
/* Form Styling - Match Settings page patterns */
.form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Form Fields */
.field {
margin-bottom: 1rem;
}
.field label {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
color: #ccc;
font-weight: 500;
font-size: 0.875rem;
}
/* Center text in inputs */
.field input {
text-align: center;
}
/* Error Styling */src\components\auth\LoginForm.module.css (Line 25:7 - Line 47:14), src\components\auth\RegistrationForm.module.css (Line 56:8 - Line 78:17)
;
}
/* Error Styling */
.error {
background-color: rgba(220, 38, 38, 0.1);
border: 1px solid rgba(220, 38, 38, 0.3);
color: #f87171;
padding: 0.75rem;
border-radius: 6px;
font-size: 0.875rem;
margin-bottom: 1rem;
}
/* Submit Button */
.submitButton {
margin-top: 0.5rem;
width: 50%;
align-self: center;
justify-content: center;
}
/* Divider */src\pages\SettingsPage.module.css (Line 38:6 - Line 67:7), src\components\board\details\BoardDetailsHeader.module.css (Line 15:7 - Line 44:26)
;
}
/* RTL override for section headers */
[dir="rtl"] .sectionHeader {
text-align: right;
direction: rtl;
}
.sectionTitle {
color: rgba(255, 255, 255, 0.9);
font-size: 1.25rem;
font-weight: 600;
margin: 0;
text-align: start;
}
/* RTL override for section title */
[dir="rtl"] .sectionTitle {
text-align: right;
direction: rtl;
}
.editButton {
font-size: 0.9rem !important;
padding: 0.25rem 0.75rem !important;
}
.fieldsrc\pages\SettingsPage.module.css (Line 132:1 - Line 152:11), src\components\auth\RegistrationForm.module.css (Line 39:1 - Line 59:20)
.radioGroup {
display: flex;
gap: 1rem;
margin-top: 0.5rem;
}
.radioLabel {
display: flex;
align-items: center;
gap: 0.5rem;
color: #ccc;
font-size: 0.875rem;
cursor: pointer;
}
.radioLabel input[type="radio"] {
margin: 0;
accent-color: #3b82f6;
}
.dateInputsrc\pages\SettingsPage.module.css (Line 149:8 - Line 183:61), src\components\common\CommonForm.module.css (Line 89:8 - Line 123:14)
;
}
.dateInput {
width: 100%;
padding: 12px;
margin-top: 4px;
box-sizing: border-box;
background-color: #333;
border: 1px solid #555;
border-radius: 6px;
color: #fff;
font-family: inherit;
font-size: 1rem;
transition: border-color 0.2s ease;
}
.dateInput:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.dateInput::-webkit-calendar-picker-indicator {
cursor: pointer;
filter: invert(1);
opacity: 0.7;
transition: opacity 0.2s ease;
}
.dateInput::-webkit-calendar-picker-indicator:hover {
opacity: 1;
}
/* Desktop-only design - no mobile responsive code needed */python
php
markup
index.html (Line 1:1 - Line 8:3), dist\index.html (Line 1:1 - Line 8:2)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/synchboard-logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SynchBoard</title>
</